Jump to content
  • Advertisement
Sign in to follow this  

EnumObjects generates unahled exception

This topic is 2338 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm doing some discovery on my stick (X-52) and I'm getting an unhandled exception when I attempt to enumerate the objects on it. The drivers are the MS installed ones (as soon as I plug in my stick it installs them). I can't at this time install the Saitek drivers over it, so I'm stuck here now.

The callback prototype:


The call:

if( FAILED(hr = joystick->EnumObjects( ObjectCallback, NULL, DIDFT_ALL )))
return hr;

The callback function:


JSControlData *jscinstance = new JSControlData;

memcpy( jscinstance, ObjectInstance, sizeof( JSControlData ));


// keep going until we get them all.

The error:
Unhandled exception at 0x01342e73 in jsfind.exe: 0xC0000005: Access violation reading location 0xccccccd0.

It's happening in xutility, in the _Adopt function of the _Iterator_base12 structure. The parent is going in NULL, but I can't determine why.

If I build in release, it will get one object, then stop responding. And, yes, DI and the stick get created with no errors and I can get the capabilities as well, but I can't get info on each object.

Does anyone have any insight on this problem?

PS: Make that "unhandled" exception. I can't go back and edit the title. Edited by jfalstaff

Share this post

Link to post
Share on other sites
Solved. For some reason, STL is choking it. I'll look into this more, but I'll have to use straight C for this quick implementation. Edited by jfalstaff

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!