DIrectX9 error shows up only in debugger
-
I'm working on a C++ native code graphics application using DirectX9. I use the latest version of Visual Studio Community 2019. When working in the IDE the application crashes from time to time with a message like "Exception thrown at 0x00007FF9762975D6 (nvd3dumx.dll) in NNetSimu.exe: 0xC0000005: Access violation reading location 0x000001B388FE1A3E." So far I could not reproduce the error, it happens once in while. The strange thing is: If I call the application directly, it runs very stable, the problem occurs only in the IDE. The crash happens always during the end of a frame, typically during swapChain->Present. My code:
void D3D_driver::EndFrame( HWND const hwnd )
{
HRESULT hres;
hres = m_d3d_device->EndScene(); assert(hres == D3D_OK);
hres = m_d3d_swapChain->Present( nullptr, nullptr, hwnd, nullptr, 0 ); assert(hres == D3D_OK);
m_id3dx_font->Release();
}I could live with the situation, the app runs smoothly without IDE, but it is annoying during development. Any ideas how I could further investigate the problem?
-
I'm working on a C++ native code graphics application using DirectX9. I use the latest version of Visual Studio Community 2019. When working in the IDE the application crashes from time to time with a message like "Exception thrown at 0x00007FF9762975D6 (nvd3dumx.dll) in NNetSimu.exe: 0xC0000005: Access violation reading location 0x000001B388FE1A3E." So far I could not reproduce the error, it happens once in while. The strange thing is: If I call the application directly, it runs very stable, the problem occurs only in the IDE. The crash happens always during the end of a frame, typically during swapChain->Present. My code:
void D3D_driver::EndFrame( HWND const hwnd )
{
HRESULT hres;
hres = m_d3d_device->EndScene(); assert(hres == D3D_OK);
hres = m_d3d_swapChain->Present( nullptr, nullptr, hwnd, nullptr, 0 ); assert(hres == D3D_OK);
m_id3dx_font->Release();
}I could live with the situation, the app runs smoothly without IDE, but it is annoying during development. Any ideas how I could further investigate the problem?