Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

GDI Leaks

Posted on 2009-05-06
14
Medium Priority
?
714 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 400 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Step by step guide to Clean and Sort your windows registry! Introduction: Always remember: A Clean registry = Better performance = Save your invaluable time In this article we're going to clear our registry manually! Yes, manually! The e…
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…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

719 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