Solved

GDI Leaks

Posted on 2009-05-06
14
708 Views
Last Modified: 2012-08-14
Is there tool I can use to track the source of GDI memory leaks?  I am using WinXP, and have a lot of programs running.
0
Comment
Question by:mraeryceos
  • 7
  • 4
  • 2
14 Comments
 
LVL 7

Expert Comment

by:spamster
ID: 24317799
0
 
LVL 1

Author Comment

by:mraeryceos
ID: 24317900
This doesn't help, because I think it is for debugging a program.  I have a dozen background programs running, and want to find the offender.
0
 
LVL 7

Expert Comment

by:spamster
ID: 24317942
Ahh, misunderstood :)
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
LVL 24

Expert Comment

by:Kenneniah
ID: 24318465
Task Manager. Open it as normal, then on the Processes tab go to View | Select Columns.
Place a check next to USER Objects and GDI Objects and hit OK.
Then look for process that seem to be using an excessive amount.
0
 
LVL 1

Author Comment

by:mraeryceos
ID: 24318552
I have a program called TaskInfo, which is what clued me in on which program is using too much GDI.  The problem is that it is Explorer.exe, so it isn't very helpful.  I think it may be something that is riding on top of Explorer, so I need something a little more sophisticated than Task Manager.  In Task Manager, Explorer is only using 21MB.  But TaskInfo has it using 2000+ GDI objects.  Sometimes it goes higher than 6000, at which time my system is using close to 10000, and I have to close some apps and restart.
0
 
LVL 24

Expert Comment

by:Kenneniah
ID: 24318628
Then Process Explorer from Technet.
http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx
Same thing, View | Select Columns.
It will show Child processes under Explorer.exe if there are any.
Most likely when it's in Explorer.exe it's items in the Systray (area next to the clock).
0
 
LVL 1

Author Comment

by:mraeryceos
ID: 24318776
Ok, I got the GDI column showing in Process Explorer, but everything is a child of Explorer!  Take a look at attached.  Don't laugh.  I like all those programs.  Just need to find out which has the GDI leak.  Right now, things are going well, but eventually I will have probs.
process-explorer.jpg
0
 
LVL 1

Author Comment

by:mraeryceos
ID: 24318807
Is there not a tool for finding GDI Leaks related to Explorer?
0
 
LVL 24

Expert Comment

by:Kenneniah
ID: 24319070
Well yes, since Explorer.exe is the Windows shell most processes will be child processes of it. 2000ish isn't uncommon, but when it hits the 6000+ range you mentioned, Process Explorer should be able to point out the biggest users. There isn't much in explorer.exe itself that's likely, with the possible exception of .dll based shell extensions.
Unfortunately I'm not aware of a way to see the GDI objects of each individual DLL file. You can however select explorer.exe, and in the bottom window of Process Explorer have it display the dlls in use. Under View | Select Columns you can go to the DLL tab and check Mapped Size, WS Total Bytes etc. to get an idea of memory usage of each.
0
 
LVL 1

Author Comment

by:mraeryceos
ID: 24319380
Which of those columns is for GDI?  How does memory use relate?
explorer-threads.jpg
dlls.jpg
0
 
LVL 24

Accepted Solution

by:
Kenneniah earned 100 total points
ID: 24320431
Unfortunately there is no GDI related column for DLLs. The only reason I brought it up is sometimes a memory leak and a GDI leak go hand in hand, so if you see one DLL using a lot of memory it might point at least in the right direction.

Unfortunately if it is in the explorer.exe process, it's very very hard to track down. I'm not aware of any tool that can show GDI objects for the child DLLs. The most likely culprits are applications that run in the systray, context menu addons (things that add to the right-click menus), toolbars and/or taskbar addons/replacements, and programs that modify Windows XP themes.  It boils down to a process of elimination, which of course is a pain :(
0
 
LVL 1

Author Comment

by:mraeryceos
ID: 24321190
"Detect and Plug GDI Leaks in Your Code with Two Powerful Tools for Windows XP"
http://msdn.microsoft.com/en-us/magazine/cc188782.aspx
I found an executable within the download.  I ran it and it instantaneously crashed my system, with a win32k.sys blue screen of death.
0
 
LVL 1

Author Comment

by:mraeryceos
ID: 24767778
I found the software causing the problem by the process of elimination.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Disclosure: Use this tutorial only when no other options helps to get Windows XP running without any problems and you don't want to format the drive. The back up of the data is the responsible of the user, however there is a description of how t…
Migration of Exchange mailbox can be done with the ExProfre.exe tool. But at times, when the ExProfre.exe tool migrates the Exchange Server user profile, it results in numerous synchronization problems. Synchronization error messages appear in the e…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question