B
Bernd Rausch
Hello,
I have a strange problem im my application. Unfortunatly the app is
rather complex, so I cannot post a simple demo app or source code, but I
will try to explain what happens.
My application is standard Windows.Forms, Visual Studio 2005 (.Net 2.0).
It has several forms and reacts to tcp messages. Everything works fine,
but at some time (usually after a few hours of opening and closing
forms) the ui seems to be frozen. Everything I do programmatically (like
opening a new form as reaction to a tcp message) works, but everything
that is related to user input (like mouse clicks) does not work. The
state lasts for several minutes or up to an hour, then the application
starts reacting to user input again and it seems that all the previous
events were cached and are now processed in rapid succession.
Things I tried:
- When I pause the app in visual studio while it is frozen, the ui
thread is at Application.Run( ... )
- The processor load is ok
- All Control.Invoke calls to change to the ui thread work fine (so
there is obviously nothing that blocks the ui thread for a long time)
- I've overriden DefWndProc and I see that events are processed. I get
for example WM_NCACTIVATE, WM_NCPAINT and WM_WINDOWPOSCHANGED. I do not
get MOUSE events
- Same if I use WinSpector. I see that events are processed, but no
MOUSE events
- The first event after the freeze was a WM_PARENTNOTIFY with lparam
WM_LBUTTONDOWN
- Nothing special happened before the freeze, no exception, no error.
I know this question is rather broad and unspecific, but perhaps you
have any idea what I can do to find the error. Are there any tools that
help with this sort of problem? Can I add any debug output that would help?
Thanks in advance,
Bernd Rausch
I have a strange problem im my application. Unfortunatly the app is
rather complex, so I cannot post a simple demo app or source code, but I
will try to explain what happens.
My application is standard Windows.Forms, Visual Studio 2005 (.Net 2.0).
It has several forms and reacts to tcp messages. Everything works fine,
but at some time (usually after a few hours of opening and closing
forms) the ui seems to be frozen. Everything I do programmatically (like
opening a new form as reaction to a tcp message) works, but everything
that is related to user input (like mouse clicks) does not work. The
state lasts for several minutes or up to an hour, then the application
starts reacting to user input again and it seems that all the previous
events were cached and are now processed in rapid succession.
Things I tried:
- When I pause the app in visual studio while it is frozen, the ui
thread is at Application.Run( ... )
- The processor load is ok
- All Control.Invoke calls to change to the ui thread work fine (so
there is obviously nothing that blocks the ui thread for a long time)
- I've overriden DefWndProc and I see that events are processed. I get
for example WM_NCACTIVATE, WM_NCPAINT and WM_WINDOWPOSCHANGED. I do not
get MOUSE events
- Same if I use WinSpector. I see that events are processed, but no
MOUSE events
- The first event after the freeze was a WM_PARENTNOTIFY with lparam
WM_LBUTTONDOWN
- Nothing special happened before the freeze, no exception, no error.
I know this question is rather broad and unspecific, but perhaps you
have any idea what I can do to find the error. Are there any tools that
help with this sort of problem? Can I add any debug output that would help?
Thanks in advance,
Bernd Rausch