Solved

GDI Leaks

Posted on 2009-05-06
14
711 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Can I legally transfer my OEM version of Windows to another PC?  (AKA - Can I put a new systemboard in my OEM PC?) Few of us are both IT and legal experts but we all have our own views of Microsoft's licensing rules and how they apply.  There are…
If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
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…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

751 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