Debug information

Started by
4 comments, last by c_back 19 years, 3 months ago
Is there a way(function?) to use this information to find out which objects have not been released?
Direct3D9: (ERROR) :Memory still allocated!  Alloc count = 117
Direct3D9: (ERROR) :Current Process (pid) = 00000940
Direct3D9: (ERROR) :Memory Address: 00c34bac lAllocID=1 dwSize=000047f8, ReturnAddr=00db3796 (pid=00000940)
Direct3D9: (ERROR) :Memory Address: 00c3b3f4 lAllocID=9 dwSize=000011b8, ReturnAddr=00dae1e9 (pid=00000940)
Direct3D9: (ERROR) :Memory Address: 00c3b31c lAllocID=10 dwSize=00000008, ReturnAddr=00dae289 (pid=00000940)
Direct3D9: (ERROR) :Memory Address: 00c3c5e4 lAllocID=11 dwSize=00000e00, ReturnAddr=00db2f45 (pid=00000940)
Direct3D9: (ERROR) :Memory Address: 00c3d6b4 lAllocID=20 dwSize=000006bc, ReturnAddr=00dbf12f (pid=00000940)
Direct3D9: (ERROR) :Memory Address: 00c393dc lAllocID=22 dwSize=00001584, ReturnAddr=00db478b (pid=00000940)
Direct3D9: (ERROR) :Memory Address: 00c3dda4 lAllocID=24 dwSize=00000008, ReturnAddr=00db48bc (pid=00000940)
Direct3D9: (ERROR) :Memory Address: 00f70064 lAllocID=26 dwSize=00003500, ReturnAddr=00db3796 (pid=00000940)
Direct3D9: (ERROR) :Memory Address: 00c3dde4 lAllocID=27 dwSize=00000198, ReturnAddr=00db3796 (pid=00000940)
Direct3D9: (ERROR) :Memory Address: 00c3dfb4 lAllocID=28 dwSize=00000030, ReturnAddr=00db3796 (pid=00000940)
Direct3D9: (ERROR) :Memory Address: 00f7359c lAllocID=29 dwSize=00001020, ReturnAddr=00db3796 (pid=00000940)
Direct3D9: (ERROR) :Total Memory Unfreed From Current Process = 51944 bytes
Advertisement
One simple, yet not very good method is to remove rendered objects and add them back until the first memory leak occurs.
I'd be interested in a good answer to this question, too, btw. Anyone?
The debug version of Direct3D allows you to break on a certain allocation given the ID. Use the "Break On AllocID" from the Direct3D options in Control Panel -> DirectX. Then using the lAllocID that are leaking, it will generate a breakpoint when they are allocated so you'll be able to track them. Allocations ID 1 and 9 are probably the IDirect3D9 and IDirect3DDevice9, so you should look into the others before trying to fix those two.
The DirectX control panel offers under the Direct3D tab the option to "Break On AllocID <value>" ... when you insert for instance 1 (the allocID of your first leak) then execution will halt when this object is allocated.

Hope that helps!
Thanks a lot! I totally forgot about that option [oh]
Thanks all :)

This topic is closed to new replies.

Advertisement