Jump to content
  • Advertisement
Sign in to follow this  
samv

[SlimDX] DetectDoubleDispose and exceptions in constructors

This topic is 3498 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 trying to create a large VolumeTexture and the constructor of this class throws an exception, reporting that there is not enough video memory. Now I would like to catch that exception. However, this doesn't seem to work when the DetectDoubleDispose feature of SlimDX is used. As far as I can tell this is because: 1. The constructor of VolumeTexture is aborted before calling Construct 2. The resources base destructor of ComObject is called 3. A false positive "double dispose" is detected because of 1. 4. An ObjectDisposedException is thrown 5. My catch block is not invoked (because the original exception is dropped?) Does this sound correct? Is this a known problem?

Share this post


Link to post
Share on other sites
Advertisement
Any progress?

I again see this same problem when trying to create D3DEx. The constructor is supposed to fail on XP and throw Direct3D9Exception, but that is hidden by a false positive ObjectDisposedException when using the DetectDoubleDispose feature.

BTW should I post such issues here or on the SlimDX google code site or both or ...?

Share this post


Link to post
Share on other sites
It looks like Promit forgot about this again [grin]

Filing the issue on our tracker was definitely the right way to go, and we should have advised you to do that earlier. When bugs aren't filed, we tend to forget about them. It's too difficult to keep track of forum threads for very long.

Anyways, you can listen to that issue and subscribe to be notified of any updates we make to it.

Share this post


Link to post
Share on other sites
I forgot to mention this, but I basically know why this occurs, I just haven't decided how exactly to fix it yet.

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!