Exception thrown (in debug pane) when exiting fullscreen

Started by
15 comments, last by vinterberg 8 years, 5 months ago
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
Advertisement

I have the same problem.

Can you post your swapChainDesc code?
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;

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.

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

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

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.

Could it be related to your cleanup (the order in which you Release(), close windows etc.)?

.:vinterberg:.

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.

This topic is closed to new replies.

Advertisement