Odd Win32Exception from within Forms ToolStrip control

A

Andi

Hi,

In the app where I'm working on, every once in a while it crashes and
the unhandled exception handler catches the following exception:

System.ComponentModel.Win32Exception: Error creating window handle.
at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
at System.Windows.Forms.Timer.TimerNativeWindow.EnsureHandle()
at System.Windows.Forms.Timer.TimerNativeWindow.StartTimer(Int32
interval)
at System.Windows.Forms.Timer.set_Enabled(Boolean value)
at System.Windows.Forms.MouseHoverTimer.Start(ToolStripItem item)
at System.Windows.Forms.ToolStrip.OnMouseMove(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseMove(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.MenuStrip.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage
(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc
(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32
msg, IntPtr wparam, IntPtr lparam)

The stacktrace doesn't show any of our own classes and we've been
trying to get to the bottom of this for well over week now.
Unfortunately we can't reproduce it and don't know exactly what's
causing it. If the app is running for a while, then suddenly it throws
that exception and the client exits.
We don't think that we're running out of available window handles as
our app doesn't create that many to begin with.

Any hints are appreciated.

Thanks.
Andi
 
A

Andi

I have had many problems when I have created an infinite loop on a
subroutine that gives really strange errors like the above.   I run out
of memory and then other things get affected.

Ken

Today we got the same 'Error creating window handle' in a bunch of
different places after doing some performance load tests. Therefore I
did some more profiling of the app and the possibility of the app
running low or out of memory is there. I've found a couple of memory
leaks already. It makes kind of sense that if there isn't enough
memory available, then it will fail to allocate any mem for a new
handle. If that's the problem then it's just very unfortunate that the
exception doesn't mention anything regarding running out of memory.

Andi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top