Jump to content
  • Advertisement
Sign in to follow this  
Annoyed

DeviceReset event problems

This topic is 3972 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

Hey, I'm having issues with the DeviceReset event. It fires, against my expectations, when I'm closing the window/application. The problem it self lies in that a Null reference Exception is thrown without any indication as to where it occurs (Even while debugging in VS2005). I'm suspecting that is the a List object that stores some of my render objects that load some resources upon device reset. As far as I know that is quite common. I can verify this, since if I don't subscribe to the event then no exception. Can anyone point me in some direction as to how to overcome this unfortunate feature? :)

Share this post


Link to post
Share on other sites
Advertisement
No I'm basicly not doing anything.

I'm lazy and toying with my Managed DirectX. And by that I had this weird idea that I'm not supposed to release anything =P

Share this post


Link to post
Share on other sites
Ok, I found one solution and I guess it will do.
I'm subscribing to the FormClosing event available on the windows form instance.

What I'm doing in the event is to detach from the DeviceReset event and I'm home safe.

Should also be a bit more thorough and perform a proper cleanup, but is for another time :)

Thanks for the tip.

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!