Jump to content
  • Advertisement
Sign in to follow this  
Modeerfx

D3d9 reset issue

This topic is 2170 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 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[/quote]

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
[/quote]

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

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites

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.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!