GDI resource shortage in Windows XP (?)

  • Thread starter Thread starter Aandi Inston
  • Start date Start date
A

Aandi Inston

I have a particular Windows XP system that shows symptoms very like
those I was used to in Windows 98, when GDI and/or user handles became
short. Applications may silently refuse to start, or refuse to show
menus; toolbars may be missing; occasionally, at these times, odd
crashes. Windows Explorer is affected, it may not show any menus.

Some background: this is a fast PC with 1 GB of memory, and normally
performs excellently. It is used mainly for development in Visual C++
6.0. Office 2003 is used sometimes, and Adobe graphics applications
and Acrobat. Web browsing. That's about it.

I have read something of the catch-all Windows XP concept of "handles"
and them running out around 16,000. I have seen this effect on
machines where I have had, perhaps, 40 IE browser windows open, but
that isn't what's happening here.

Right now a right-click in Windows explorer isn't working on this
machine. I can close an app and things work, but start another one and
it goes bad again, so I am obviously close to some limit. Here is the
data from Task Manager.

Handles 11710
Threads 506
Processes 43

Commit charge (don't know what that is)
Total 382612
Limit 2523420
Peak 643762

Physical memory
Total 1047536
Available 559400
System cache 708708

Kernel memory
Total 111940
Pages 65900
Nonpaged 46040

The frustrating thing is that I have no idea what could be running
out. I'd really appreciate some pointers on "hidden" resources that
could run out (and how to monitor them). I'm going to leave this
machine overnight, so I can try out any suggestions, but I'll need to
reboot it in the morning (and it will take a while to get bad again).
 
Aandi said:
I have a particular Windows XP system that shows symptoms very like
those I was used to in Windows 98, when GDI and/or user handles became
short. Applications may silently refuse to start, or refuse to show
menus; toolbars may be missing; occasionally, at these times, odd
crashes. Windows Explorer is affected, it may not show any menus.

Some background: this is a fast PC with 1 GB of memory, and normally
performs excellently. It is used mainly for development in Visual C++
6.0. Office 2003 is used sometimes, and Adobe graphics applications
and Acrobat. Web browsing. That's about it.

I have read something of the catch-all Windows XP concept of "handles"
and them running out around 16,000. I have seen this effect on
machines where I have had, perhaps, 40 IE browser windows open, but
that isn't what's happening here.

Right now a right-click in Windows explorer isn't working on this
machine. I can close an app and things work, but start another one and
it goes bad again, so I am obviously close to some limit. Here is the
data from Task Manager.

Handles 11710
Threads 506
Processes 43

Commit charge (don't know what that is)
Total 382612
Limit 2523420
Peak 643762

Physical memory
Total 1047536
Available 559400
System cache 708708

Kernel memory
Total 111940
Pages 65900
Nonpaged 46040

The frustrating thing is that I have no idea what could be running
out. I'd really appreciate some pointers on "hidden" resources that
could run out (and how to monitor them). I'm going to leave this
machine overnight, so I can try out any suggestions, but I'll need to
reboot it in the morning (and it will take a while to get bad again).

I don't think GDI problems at all. These are extremely rare in XP. I
suspect that there is a hardware problem - overheating is my first
thought - probably the video card which is simply giving up because it
is too hot. A failing power supply with voltages approaching brownout
is second. I don't think CPU, HD, or RAM since these will either BSD or
suddenly shut down the computer without warning.

Q
 
GDI problems will only affect Win 3.1 programs. Just like on Win 3.1 (windows 95 stayed with 3.1 for compatability reasons).

You aren't very specific but at a guess I'd say your swap file is too small. Symptoms are
Applications may silently refuse to start

But in a monolithic application the other symptoms don't happen (menus load when the app loads). But explorer is many applications and is loading and unloading stuff depending on what folder you open and what you click on and then negoiating menus between explorer and the dlls that are loaded at that point in time..
 
Quaoar said:
I don't think GDI problems at all. These are extremely rare in XP. I
suspect that there is a hardware problem - overheating is my first
thought - probably the video card which is simply giving up because it
is too hot.

Thanks for the reply.

An interesting idea, though difficult to analyse. I've certainly seen
some odd hardware effecst. But... . I feel it's unlikely because I can
do this (just trying it now).

- system is working (can right click in Explorer)
- start an IE window. It appears though oddly without a menu bar at
all (maybe coincidence)
- start another IE window. It opens but is completely white in the
browser area
- can no longer right click in explorer
- closed newest IE window (it responded to a click on the 'X')
- can right click again in IE.

I wouldn't expect hardware problems to be relieved by software actions
so consistently.
 
David Candy said:
You aren't very specific but at a guess I'd say your swap file is too =
small. Symptoms are
Applications may silently refuse to start

I'd like to be specific, but I've exhausted my knowledge of what to
look for.

The System Control Panel says Virtual memory: Total paging file size
for all drives: 1536 MB. Maximum size 3072K. 75 GB remain free on the
disk.

So I can't see that it's the swap (or, if it is, I don't know how to
deal with it).
But in a monolithic application the other symptoms don't happen (menus =
load when the app loads). But explorer is many applications and is =
loading and unloading stuff depending on what folder you open and what =
you click on and then negoiating menus between explorer and the dlls =
that are loaded at that point in time..

This makes sense, in terms of the symptoms, but not the cause. Just
what system resources are needed to get a menu to display...
 
I have a particular Windows XP system that shows symptoms very like
those I was used to in Windows 98, when GDI and/or user handles became
short. Applications may silently refuse to start, or refuse to show
menus; toolbars may be missing; occasionally, at these times, odd
crashes. Windows Explorer is affected, it may not show any menus.

Some background: this is a fast PC with 1 GB of memory, and normally
performs excellently. It is used mainly for development in Visual C++
6.0. Office 2003 is used sometimes, and Adobe graphics applications
and Acrobat. Web browsing. That's about it.

Supplementary information... I'm reading about the desktop heap, and
that sounds as if it is a possibility. Does anyone know how to measure
how much is in use?

Probably not relevant but this system is driving 2 x 1280 x 1024
monitors. Hmm, I wonder if the video driver is consuming memory. In
Windows NT terms, it shouldn't be process related, since I am closing
processes and that should be freeing any per-process resources....
something is leaking.
 
That is ample memory for normal users. Make sure you don't have a rogue program chewing up memory.

Use Task Manager's process tab and sort on memory. Also the performance tab tells you what the state of memory is (unlike System).
 
David Candy said:
That is ample memory for normal users. Make sure you don't have a rogue =
program chewing up memory.

Use Task Manager's process tab and sort on memory. Also the performance =
tab tells you what the state of memory is (unlike System).

Memory doesn't seem to be the problem. There is half a GB of free
memory, and the performance is fine, until it stops.
 
Go to performance logs and read the help file. Post back in a few weeks what you discover.
 
Memory doesn't seem to be the problem. There is half a GB of free
memory, and the performance is fine, until it stops.

Footnote: I killed explorer, which didn't show a lot of memory usage;
there were 10 Windows explorer windows open. The handles and memory
hardly changed, but I could then immediately open Photoshop, Visual
C++, Acrobat, and 24 Internet Explorer windows.

So, provisionally, I'd have to say - memory leak in Explorer. The
machine hasn't been running long - a few weeks.
 
Provisionally I'd say you are spywear infected. They like to worm into explorer. As explorer is designed to allow programs to worm into it (as a file display does - explorer can't show files by itself) they do. Explorer is the Internet Browser too (under the hood) but can't show a web page without an addin, which can't display HTML without using another addin, and so it goes.

If using Pro type

tasklist /m /fi "imagename eq explorer.exe"

so see what dlls explorer has open.

Or use Loaded Modules in System Information and sort on Manufacturers Name and examine all files not by MS (amazing spywear/viruses never claim they are legit files) by examining the file's Properties - Version tab, the folder it's in, what else is in that folder, opening it in notepad and look for messages to guess as to it's purpose.
 
I have a particular Windows XP system that shows symptoms very like
those I was used to in Windows 98, when GDI and/or user handles became
short. Applications may silently refuse to start, or refuse to show
menus; toolbars may be missing; occasionally, at these times, odd
crashes. Windows Explorer is affected, it may not show any menus.

Windows XP uses 32 bit Resource Heaps. The GDI Resource Heap can
increase to meet whatever requirements exist, up to a maximum size of
4gb or the total installed RAM, whichever comes first.

Something else must be causing your problems.

Good luck


Ron Martell Duncan B.C. Canada
--
Microsoft MVP
On-Line Help Computer Service
http://onlinehelp.bc.ca

"The reason computer chips are so small is computers don't eat much."
 
David Candy said:
Provisionally I'd say you are spywear infected. ..
tasklist /m /fi "imagename eq explorer.exe"

Thank you for the suggestion, and teaching a useful new command. I
can't see any problems there (comparing against another machine) but I
will watch out for that idea.

I'd particularly like to follow up the idea that the desktop heap may
be growing uncontrollably, but I haven't found any tools to do it. The
Windows 2000 Resource Kit had Heapmon, but it doesn't seem to work in
XP. I observe several people in this group have asked about a tool to
measure desktop heap, but I didn't see a reply.
 
I was having the same problems as you reported(windows not drawing after
opening many appications-MSWindows should handle this more gracefully or give
some more info about what resource was used up!!). Originally I had thought I
hit the GDI or USER object Limits. I found an increase to the USER object
limit was available with a registry
edit:http://support.microsoft.com/default.aspx?kbid=326591

This helped when 1 big process was reaching the USER object limit, but
sometimes the system still acted funny when I was below the limit.

Finally I found some info on the desktop heap and I think I have fixed my
problem!
The desktop heap size is set to 3MB by default on 2k and XP.
To increase this size change the registry setting:
HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session
Manager\\SubSystems

The "Windows" key is a big string. Change the "SharedSection=xxxx,yyyy,zzzz"
part. Originally: Windows SharedSection=1024,3072,512
Modified to: Windows SharedSection=1024,8192,512

This will increase the desktop heap to 8MB and hopefully you see some better
results.
James

ps.
Thanks to Kevin Dente for this!
http://weblogs.asp.net/kdente/archive/2004/06/04/148145.aspx
 
Back
Top