Solved

GDI Leaks

Posted on 2009-05-06
14
707 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to fix BSOD 21 146
Blue screen when trying to install xp on hd 22 130
Event ID: 1202 / Source: SceCli 6 88
Exchange & AD management console 2 91
Most of the time we are in fix when all of sudden our systems behave weirdly.  Such problems cost time and effort... so it's best to take some preventive actions so that we can avoid such issues or overcome such problems more easily. Preventive M…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

920 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

14 Experts available now in Live!

Get 1:1 Help Now