Jump to content
  • Advertisement
Sign in to follow this  
DarkRonin

Exception thrown (in debug pane) when exiting fullscreen

This topic is 1069 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 guys,

I get the following errors in the debug pane in my DirectX 11 based application, which only show up on exit.

This only happens in full screen mode.

Exception thrown at 0x74DB3E28 in DirectX11.exe: Microsoft C++ exception: _com_error at memory location 0x0067AA20.
Exception thrown at 0x74DB3E28 in DirectX11.exe: Microsoft C++ exception: _com_error at memory location 0x0067B63C.
Exception thrown at 0x74DB3E28 in DirectX11.exe: Microsoft C++ exception: _com_error at memory location 0x0067B898.
Exception thrown at 0x74DB3E28 in DirectX11.exe: Microsoft C++ exception: _com_error at memory location 0x0067BA50.
Exception thrown at 0x74DB3E28 in DirectX11.exe: Microsoft C++ exception: _com_error at memory location 0x0067AA20.
Exception thrown at 0x74DB3E28 in DirectX11.exe: Microsoft C++ exception: _com_error at memory location 0x0067B63C.
Exception thrown at 0x74DB3E28 in DirectX11.exe: Microsoft C++ exception: _com_error at memory location 0x0067B898.
Exception thrown at 0x74DB3E28 in DirectX11.exe: Microsoft C++ exception: _com_error at memory location 0x0067BA50.


Windowed mode has no errors at all.

The only difference in my code (for either mode) is the following;

swapChainDesc.Windowed = true;  // or false
So, I am at a loss as to why this issue may be happening.

I read that if you are in full screen mode you need to do the following before clean up. But this doesn't seem to have an effect on the problem.

d3dSwapChain->SetFullscreenState(FALSE, NULL);
Any ideas would be awesome smile.png

Share this post


Link to post
Share on other sites
Advertisement
Sure thing smile.png

	DXGI_SWAP_CHAIN_DESC swapChainDesc;
	ZeroMemory(&swapChainDesc, sizeof(swapChainDesc));
	swapChainDesc.BufferCount = 1;
	swapChainDesc.BufferDesc.Width = nWidth;
	swapChainDesc.BufferDesc.Height = nHeight;
	swapChainDesc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
	swapChainDesc.BufferDesc.RefreshRate.Numerator = 60;
	swapChainDesc.BufferDesc.RefreshRate.Denominator = 1;
	swapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
	swapChainDesc.OutputWindow = hWnd;
	swapChainDesc.Windowed = !bFullscreen;
	swapChainDesc.SampleDesc.Count = 8;
	swapChainDesc.SampleDesc.Quality = 0;
	swapChainDesc.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH;

Share this post


Link to post
Share on other sites

I get the following errors in the debug pane in my DirectX 11 based application, which only show up on exit.


Those don't look like errors, they look like debugger messages indicating that an exception was thrown and caught. The VC++ debugger will always output a message when this happens, even if it's a normal and expected part of program execution. If it's not your code that's throwing and catching the exception, then it might be occurring within the D3D or DXGI DLL's.

Share this post


Link to post
Share on other sites
You can set the debugger to break on all exceptions, not just uncaught ones. Then look at the callstack.

Share this post


Link to post
Share on other sites

Hmmm. Exceptions can't be a good thing though, right?

 

It's a c++ exception and it was caught, so it's likely that it was expected; I doubt DirectX puts trycatch blocks around everything just in case.

Share this post


Link to post
Share on other sites

Hmmm. Exceptions can't be a good thing though, right?


Who knows. Exceptions aren't inherently bad, they're just a mechanism. A lot of times they're using to indicate critical errors, but not always. In this case it might be an exception that's totally expected, and that's why the runtime catches it. I've seen third-party programs and DLL's that throw exceptions all over the place.

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!