[SlimDX] DetectDoubleDispose and exceptions in constructors
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?
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 ...?
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 ...?
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.
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.
I forgot to mention this, but I basically know why this occurs, I just haven't decided how exactly to fix it yet.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement