views:

715

answers:

2

I have a crash dump of an application that is supposedly leaking GDI. The app is running on XP and I have no problems loading it into WinDbg to look at it. Previously we have use the Gdikdx.dll extension to look at Gdi information but this extension is not supported on XP or Vista.

Does anyone have any pointers for finding GDI object usage in WinDbg.

Alternatively, I do have access to the failing program (and its stress testing suite) so I can reproduce on a running system if you know of any 'live' debugging tools for XP and Vista (or Windows 2000 though this is not our target).

+4  A: 

There was a MSDN Magazine article from several years ago that talked about GDI leaks. This points to several different places with good information.

http://msdn.microsoft.com/en-us/magazine/cc188782.aspx

In WinDbg, you may also try the !poolused command for some information.

Finding resource leaks in from a crash dump (post-mortem) can be difficult -- if it was always the same place, using the same variable that leaks the memory, and you're lucky, you could see the last place that it will be leaked, etc. It would probably be much easier with a live program running under the debugger.

You can also try using [Microsoft Detours][1], but the license doesn't always work out. It's also a bit more invasive and advanced.

[1]: http://research.microsoft.com/sn/detours/ Microsoft Detours

Kris Kumler
+2  A: