Jump to content

  • Log In with Google      Sign In   
  • Create Account


D3d9 reset issue


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
2 replies to this topic

#1 Modeerfx   Members   -  Reputation: 106

Like
0Likes
Like

Posted 10 July 2012 - 09:09 PM

Hi all.

I'm working on a device lost debugging, I opened the Debug version of Direct3D9, when IDirect3DDevice9::Reset was called, the VS console output this:

Direct3D9: (ERROR) :All user created D3DPOOL_DEFAULT surfaces must be freed before ResetEx can succeed. ResetEx Fails.
Direct3D9: (ERROR) :ResetEx failed and ResetEx/TestCooperativeLevel/Release are the only legal APIs to be called subsequently


But I'm not using a IDirect3DDevice9Ex::ResetEx, why 'ResetEx' came out? I have tested both versions of 'DXSDK June 2010' and 'DXSDK April 2007', the output texts are same. Even though, the interface of IDirect3DDevice9Ex was not included in DXSDK April 2007, but it came out anyway! That's weird, can this caused by my system version? I'm using windows7 64-bit.

What I expect is this:

Direct3D9: (ERROR) :The following D3DPOOL_DEFAULT surfaces/buffers/textures still exist
Direct3D9: (ERROR) : D3DRTYPE_TEXTURE
Direct3D9: (ERROR) : Memory Address: 00d67738 lAllocID=1837 dwSize=00000050, (pid=00000714)
Direct3D9: (ERROR) : Stack Back Trace
Direct3D9: (ERROR) : [0] : Address 00FC7CE6
Direct3D9: (ERROR) : [1] : Address 0109BBC3
Direct3D9: (ERROR) : [2] : Address 00FDFAF7
Direct3D9: (ERROR) : [3] : Address 00FDF4A2
Direct3D9: (ERROR) : [4] : Address 00FF4A40
Direct3D9: (ERROR) : [5] : Address 004023CF
Direct3D9: (ERROR) : [6] : Address 00421331
Direct3D9: (ERROR) : [7] : Address 0042165B
Direct3D9: (ERROR) : [8] : Address 004216FC
Direct3D9: (ERROR) : [9] : Address 0041C1F5
Direct3D9: (ERROR) : [10] : Address 7C816FD7
Direct3D9: (ERROR) : [11] : Address 00000000
Direct3D9: (ERROR) : [12] : Address 00000000
Direct3D9: (ERROR) : [13] : Address 00000000
Direct3D9: (ERROR) : [14] : Address 00000000
Direct3D9: (ERROR) : [15] : Address 00000000
Direct3D9: (ERROR) :All user created D3DPOOL_DEFAULT surfaces must be freed before Reset can succeed. Reset Fails.
Direct3D9: (ERROR) :Reset failed and Reset/TestCooperativeLevel/Release are the only legal APIs to be called subsequently


I just wonder how to enable the D3D creation stack trace when resource leak on device reset? I have set EnableCreationStack to 1 in system registry, that can't solve this.

Thanks for any help.

Edited by Modeerfx, 10 July 2012 - 09:28 PM.


Sponsor:

#2 mhagain   Crossbones+   -  Reputation: 7453

Like
0Likes
Like

Posted 11 July 2012 - 02:10 AM

Not a direct answer to your specific questions, but if you're wondering which resource has leaked, there's a very high likelihood that you've created some D3DX objects (Sprite, Font or Effect are the most likely) but haven't called OnLostDevice on them. You'll need to call OnResetDevice when the device is back too.

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#3 Modeerfx   Members   -  Reputation: 106

Like
0Likes
Like

Posted 11 July 2012 - 02:33 AM

Not a direct answer to your specific questions, but if you're wondering which resource has leaked, there's a very high likelihood that you've created some D3DX objects (Sprite, Font or Effect are the most likely) but haven't called OnLostDevice on them. You'll need to call OnResetDevice when the device is back too.


Too many potential resource leak positions, finding them manually without a stack trace is a too huge work.




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