Jump to content

  • Log In with Google      Sign In   
  • Create Account


ReportLiveObjects() isn't giving me enough information.


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 Gavin Williams   Members   -  Reputation: 652

Like
0Likes
Like

Posted 25 April 2014 - 11:00 PM

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 ?



Sponsor:

#2 xoofx   Members   -  Reputation: 870

Like
1Likes
Like

Posted 26 April 2014 - 12:20 AM

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?



#3 Gavin Williams   Members   -  Reputation: 652

Like
0Likes
Like

Posted 26 April 2014 - 05:44 PM

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, 26 April 2014 - 05:49 PM.


#4 Mona2000   Members   -  Reputation: 590

Like
2Likes
Like

Posted 26 April 2014 - 06:32 PM

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.



#5 Gavin Williams   Members   -  Reputation: 652

Like
0Likes
Like

Posted 26 April 2014 - 07:05 PM

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.



#6 Gavin Williams   Members   -  Reputation: 652

Like
1Likes
Like

Posted 26 April 2014 - 07:17 PM

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, 26 April 2014 - 08:27 PM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS