Jump to content
  • Advertisement
Sign in to follow this  
Tubos

[SlimDX] Exception despite AlwaysIgnore (Out of Memory)

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

Hi, I'm using D3D9 and SlimDX (August 09). I'd like to handle out-of-memory without using exceptions. Init code:
Configuration.EnableObjectTracking = true;
Configuration.ThrowOnError = false;
Configuration.AddResultWatch(ResultCode.OutOfVideoMemory, ResultWatchFlags.AlwaysIgnore);
However, when I allocate too much GPU memory, SlimDX still throws:
Quote:
SlimDX.Direct3D9.Direct3D9Exception {"E_OUTOFMEMORY: Ran out of memory (-2147024882)"}
I have verified that at the moment of the allocation, Configuration.m_Watches[ResultCode.OutOfVideoMemory] is set to AlwaysIgnore and ThrowOnError==false. How can I disable this exception?

Share this post


Link to post
Share on other sites
Advertisement
If this is inside a constructor, you'll have to resort to catching the exception, since we force them to always throw so that you don't get partially initialized objects.

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!