Jump to content
  • Advertisement

DX11 Debug mode - Device Release is crashing

Recommended Posts


I have a Terrain rendering demo that is running and rendering OK, but when I run it in Debug mode (Device debug flag on and Visual studio debug build), the Device Release() method is crashing, I don't know why and I couldn't find a way to track the reason. Is there something that can tell me why the Device fail to Release?

I don't know what exactly to show you so I'll just post the App final destructor, which is trivial:

	SAFE_DELETE( mBackBuffer );
	ReleaseCOM( mSwapChain );

    if ( mDebug )

	ReleaseCOM(md3dDevice); --> Crashing here

#if defined(DEBUG) || defined(_DEBUG)

ReleaseCom( x ) is a simple SAFE_RELEASE kind of method, means if ( x ) { x->Release(); x = nullptr; }

SAFE_DELETE is same but deleting an object (mBackBuffer is of a wrapper TextureHandle class that wraps all my textures)

I also used our SVN server to try and track where the problem started, but it's a very slow process as running a debug session here takes ~6-7 minutes each time, and I saw it goes long back down the SVN path so not really practical to find where the problem started. However, I'm almost sure there is some better way to know why D3D isn't able to close properly.


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!