Solved

GDI Leaks

Posted on 2009-05-06
14
706 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
 
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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

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…
Ok I have been working on this for some time having learned and gained certification in XenDesktop 4 along came version 5 which was released last month. Since then I have been working to deploy XenDesktop 5 in a small environment with only 2 virt…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now