ReportLiveDeviceObjects throws exception

Started by
4 comments, last by Key_C0de 1 year, 7 months ago

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.

None

Advertisement

Do you call ID3D11InfoQueue::SetBreakOnSeverity to tell the debug layer to break into the debugger when it emits a warning?

Yes.

	m_pDxgiInfoQueue->SetBreakOnSeverity( ms_msgProducer,
		DXGI_INFO_QUEUE_MESSAGE_SEVERITY_ERROR,
		true );
	m_pDxgiInfoQueue->SetBreakOnSeverity( ms_msgProducer,
		DXGI_INFO_QUEUE_MESSAGE_SEVERITY_CORRUPTION,
		true );
	m_pDxgiInfoQueue->SetBreakOnSeverity( ms_msgProducer,
		DXGI_INFO_QUEUE_MESSAGE_SEVERITY_WARNING,
		true );
	m_pDxgiInfoQueue->SetBreakOnSeverity( ms_msgProducer,
		DXGI_INFO_QUEUE_MESSAGE_SEVERITY_MESSAGE,
		true );
	m_pDxgiInfoQueue->SetBreakOnSeverity( ms_msgProducer,
		DXGI_INFO_QUEUE_MESSAGE_SEVERITY_INFO,
		true );

where ms_msgProducer is a static const DXGI_DEBUG_ID equal to DXGI_DEBUG_ALL.

None

deleted

None

I have solved this.

Apparently everything was ok with my Info Queue. The problem was another member being improperly destructed in my engine and was messing things up. It was a hurdle finding it, but it was a good exercise.

None

This topic is closed to new replies.

Advertisement