In the destructor of my `Graphics` class where I have the device, context & other d3d related objects I call
m_pDebug->ReportLiveDeviceObjects( D3D11_RLDO_DETAIL );
Where m_pDebug
is my Graphics
class object.
ATL::CComPtr<ID3D11Debug> m_pDebug;
I initialize it right before calling ReportLiveDeviceObjects
like so:
HRESULT hres;
hres = m_pDevice->QueryInterface( __uuidof( ID3D11Debug ),
reinterpret_cast<void**>( &m_pDebug ) );
ASSERT_HRES_IF_FAILED;
I get exception:
D3D11 WARNING: Live ID3D11Device at 0x000000741AB64790, Refcount: 954 [ STATE_CREATION WARNING #441: LIVE_DEVICE]
D3D11: **BREAK** enabled for the previous message, which was: [ WARNING STATE_CREATION #441: LIVE_DEVICE ]
Exception thrown at 0x00007FFA744C7AFC (KernelBase.dll) in program.exe: 0x0000087A (parameters: 0x0000000000000002, 0x000000741AA7BFE8, 0x000000741AA7CE70).
Unhandled exception at 0x00007FFA744C7AFC (KernelBase.dll) in program.exe: 0x0000087A (parameters: 0x0000000000000002, 0x000000741AA7BFE8, 0x000000741AA7CE70).
I can't figure out why this is happening? Is it possibly because there are too many live objects?
I step through the debugger and the exception trigger immediately upon reaching ReportLiveDeviceObjects (It doesn't even let me “step in” the function). I've checked `m_pDebug` it's not nullptr..
I have another simpler project where I'm doing something very similar and ReportLiveObjects works 100%.
If you have any ideas kindly share. I'd appreciate it.