• Advertisement
Sign in to follow this  

ReportLiveObjects() isn't giving me enough information.

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

 

I just notices a post in which someone included there output for ReportLiveObjects() and it looked like this:
 

D3D11 WARNING: Live ID3D11Device at 0x007A201C, Refcount: 2 [ STATE_CREATION WARNING #441: LIVE_DEVICE]
D3D11 WARNING: Live ID3D11Context at 0x007A3620, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #2097226: LIVE_CONTEXT]
D3D11 WARNING: Live ID3DDeviceContextState at 0x007ADBB0, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #3145742: LIVE_DEVICECONTEXTSTATE]
D3D11 WARNING: Live ID3D11BlendState at 0x007B3D84, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #435: LIVE_BLENDSTATE]
D3D11 WARNING: Live ID3D11DepthStencilState at 0x007B3ECC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #436: LIVE_DEPTHSTENCILSTATE]
D3D11 WARNING: Live ID3D11RasterizerState at 0x007B403C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #437: LIVE_RASTERIZERSTATE]

 

While my output looks like this:

 

D3D11 WARNING: Process is terminating. Using simple reporting. Please call ReportLiveObjects() at runtime for standard reporting. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: Live Producer at 0x00A2E43C, Refcount: 35. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING:     Live Object at 0x00A307D8, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING:     Live Object at 0x00A3E300, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING:     Live Object at 0x00A3C944, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING:     Live Object at 0x00A4422C, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]

 

As you can see, my version is sadly lacking, and particularly unhelpful. Is there something I need to do to get the correct information ?

Share this post


Link to post
Share on other sites
Advertisement

I have the same problem here. I suspect a recent update but don't recall last time I used the debug output and it was valid.

I have installed recently the VS2013 Update 2 RC, so It might be this install that messed up things here... If there is someone else with Windows8.1 but without VS2013 Update 2 RC to confirm this?

Share this post


Link to post
Share on other sites

Well, I have Update 2 RC as well. But I can't remember Debug output ever giving me that much information, it has always just given me "live object" rather than "live BlendState" for instance, as far as I remember. I will report this to Microsoft as well.

Tracking down live objects has always been a nightmare with such limited information, I spent many hours yesterday digging them up.

Edited by Gavin Williams

Share this post


Link to post
Share on other sites

What you pasted is not the output from ReportLiveObjects, it's the simple report that gets generated when the applications exits.

Try placing a breakpoint right after you call ReportLiveObjects and check what gets printed.

Share this post


Link to post
Share on other sites

Ok, so my code:

 

    List<ObjectReference> liveObjects = ObjectTracker.FindActiveObjects();
    System.Diagnostics.Debug.WriteLine(liveObjects.Count + " live objects");
    System.Diagnostics.Debug.WriteLine(ObjectTracker.ReportActiveObjects())

outputs:

0 live objects

Count per Type:

And that's it.

PS. This is the way I've been told to get the objects, as there is no ReportLiveObjects on the device in SharpDX.

Share this post


Link to post
Share on other sites

Ok, so something I have never realized, is that a second (debug) device needs to be created in order to use reporting.

device3DDebug = new DeviceDebug(Device3D);

Then:

device3DDebug.ReportLiveDeviceObjects(ReportingLevel.Detail);

Gives the proper output. Thanks Mona2000

 

Edit: Some useful references

 

http://blogs.msdn.com/b/chuckw/archive/2012/11/30/direct3d-sdk-debug-layer-tricks.aspx

http://seanmiddleditch.com/journal/2014/02/direct3d-11-debug-api-tricks/

Edited by Gavin Williams

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement