Does this info tell you anything about why my app hangs the operating system?

M

MCM

Windows CE 5.0 (Eurotech BitsyXb) system running a heavily graphical
application with several user-drawn controls.

The application is a C# (.NET CF 2.0) application written in Visual Studio
2008 with some OpenNETCF.

After about 4 hours, the application freezes and Windows is frozen as well -
the only thing I can do is power down. (The mouse pointer won't move and
ActiveSync won't let me access the device.)

Threads (that I know of):
1. A Keypad monitoring thread (OpenNETCF thread)
2. A thread watching for Sleep mode (OpenNETCF thread)
3. A thread that is doing ModBus (RS-232) communication (not sure the
origin, though I think System.Threading)
4 Main Application thread (three timers running; one of which is a timer
running in an animation control)

Output Window Excerpts:
A first chance exception of type 'System.NullReferenceException' occurred in
System.Drawing.dll
A first chance exception of type 'System.InvalidCastException' occurred in
System.Drawing.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred
in mscorlib.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred
in mscorlib.dll
A first chance exception of type 'System.UnauthorizedAccessException'
occurred in mscorlib.dll
'MyApp.exe' (Managed): Loaded
'c:\myapps\myapp\myapp\bin\release\OpenNETCF.WindowsCE.dll'
'MyApp.exe' (Managed): Loaded
'c:\myapps\myap\myapp\bin\release\OpenNETCF.WindowsCE.Messaging.dll'
The thread 0xc1e15b9a has exited with code 0 (0x0). // I get tons of
these
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread '<No Name>' (0xc1e15b9a) has exited with code 0 (0x0). // with
some of these mixed in
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread '<No Name>' (0xc1e15b9a) has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread '<No Name>' (0xc1e15b9a) has exited with code 0 (0x0).
The thread '<No Name>' (0xc1e15b9a) has exited with code 0 (0x0).
The thread '<No Name>' (0xc1e15b9a) has exited with code 0 (0x0).
The thread '<No Name>' (0xc1e15b9a) has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread '<No Name>' (0xc1e15b9a) has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread '<No Name>' (0xc1e15b9a) has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
// at this point I closed the application via the user interface
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0x1d2cf2a has exited with code 0 (0x0).
The thread 0x67004fce has exited with code 0 (0x0).
The thread 0xe7004b52 has exited with code 0 (0x0).
The thread 0xc1d859de has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
A first chance exception of type 'System.Threading.ThreadAbortException'
occurred in OpenNETCF.WindowsCE.Messaging.dll
The thread 0x67004176 has exited with code 0 (0x0).
The program '[0xC6E106C6] MyApp.exe: Managed' has exited with code 0 (0x0).


Remote Performance Monitor (3.5) highlights:
Managed Bytes Allocated - rising
Managed Objects Allocated - rising
Managed Bytes in Use after GC - stable
Total Bytes in Use after GC - stable
Bytes of String Objects Allocated - rising
Boxed Value Types - rising
Uncontested Monitor.Enter Calls - rising
Bitmaps Created - rising (due to drawing owner drawn controls to bitmap,
then using DrawImage)
Scheduled Timers - rising
Process Heap - up and down occaisionally, but always returns to same value


I've been fighting this for almost a week and cannot find the solution - any
advice will be greatly appreciated.

- MM
 
P

Paul G. Tobey [eMVP]

The obvious first step is to disable each thread, one at a time, and see
which causes the problem to go away or change its behavior. Why do you have
a keypad monitoring thread? Doesn't the keypad send suitable WM_ messages
for its keys via its driver? I'd start with that one...

Paul T.

MCM said:
Windows CE 5.0 (Eurotech BitsyXb) system running a heavily graphical
application with several user-drawn controls.

The application is a C# (.NET CF 2.0) application written in Visual Studio
2008 with some OpenNETCF.

After about 4 hours, the application freezes and Windows is frozen as
well - the only thing I can do is power down. (The mouse pointer won't
move and ActiveSync won't let me access the device.)

Threads (that I know of):
1. A Keypad monitoring thread (OpenNETCF thread)
2. A thread watching for Sleep mode (OpenNETCF thread)
3. A thread that is doing ModBus (RS-232) communication (not sure the
origin, though I think System.Threading)
4 Main Application thread (three timers running; one of which is a timer
running in an animation control)

Output Window Excerpts:
A first chance exception of type 'System.NullReferenceException' occurred
in System.Drawing.dll
A first chance exception of type 'System.InvalidCastException' occurred in
System.Drawing.dll
A first chance exception of type 'System.IO.FileNotFoundException'
occurred in mscorlib.dll
A first chance exception of type 'System.IO.FileNotFoundException'
occurred in mscorlib.dll
A first chance exception of type 'System.UnauthorizedAccessException'
occurred in mscorlib.dll
'MyApp.exe' (Managed): Loaded
'c:\myapps\myapp\myapp\bin\release\OpenNETCF.WindowsCE.dll'
'MyApp.exe' (Managed): Loaded
'c:\myapps\myap\myapp\bin\release\OpenNETCF.WindowsCE.Messaging.dll'
The thread 0xc1e15b9a has exited with code 0 (0x0). // I get tons of
these
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread '<No Name>' (0xc1e15b9a) has exited with code 0 (0x0). // with
some of these mixed in
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread '<No Name>' (0xc1e15b9a) has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread '<No Name>' (0xc1e15b9a) has exited with code 0 (0x0).
The thread '<No Name>' (0xc1e15b9a) has exited with code 0 (0x0).
The thread '<No Name>' (0xc1e15b9a) has exited with code 0 (0x0).
The thread '<No Name>' (0xc1e15b9a) has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread '<No Name>' (0xc1e15b9a) has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread '<No Name>' (0xc1e15b9a) has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
// at this point I closed the application via the user interface
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0x1d2cf2a has exited with code 0 (0x0).
The thread 0x67004fce has exited with code 0 (0x0).
The thread 0xe7004b52 has exited with code 0 (0x0).
The thread 0xc1d859de has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
A first chance exception of type 'System.Threading.ThreadAbortException'
occurred in OpenNETCF.WindowsCE.Messaging.dll
The thread 0x67004176 has exited with code 0 (0x0).
The program '[0xC6E106C6] MyApp.exe: Managed' has exited with code 0
(0x0).


Remote Performance Monitor (3.5) highlights:
Managed Bytes Allocated - rising
Managed Objects Allocated - rising
Managed Bytes in Use after GC - stable
Total Bytes in Use after GC - stable
Bytes of String Objects Allocated - rising
Boxed Value Types - rising
Uncontested Monitor.Enter Calls - rising
Bitmaps Created - rising (due to drawing owner drawn controls to bitmap,
then using DrawImage)
Scheduled Timers - rising
Process Heap - up and down occaisionally, but always returns to same value


I've been fighting this for almost a week and cannot find the solution -
any advice will be greatly appreciated.

- MM
 
C

Chris Tacke, eMVP

The "lots of these" threads are a short-lived worker. I can't definitvely
say what they are without more info, but they wouldn't casue me concern
unless you don't expect workers to be running. The ThreadAbortException is
what you should be concerned about. What is calling Thread.Abort()? I just
checked and it's not called anywhere in the OpenNETCF.WindowsCE.Messaging
assembly.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com


MCM said:
Windows CE 5.0 (Eurotech BitsyXb) system running a heavily graphical
application with several user-drawn controls.

The application is a C# (.NET CF 2.0) application written in Visual Studio
2008 with some OpenNETCF.

After about 4 hours, the application freezes and Windows is frozen as
well - the only thing I can do is power down. (The mouse pointer won't
move and ActiveSync won't let me access the device.)

Threads (that I know of):
1. A Keypad monitoring thread (OpenNETCF thread)
2. A thread watching for Sleep mode (OpenNETCF thread)
3. A thread that is doing ModBus (RS-232) communication (not sure the
origin, though I think System.Threading)
4 Main Application thread (three timers running; one of which is a timer
running in an animation control)

Output Window Excerpts:
A first chance exception of type 'System.NullReferenceException' occurred
in System.Drawing.dll
A first chance exception of type 'System.InvalidCastException' occurred in
System.Drawing.dll
A first chance exception of type 'System.IO.FileNotFoundException'
occurred in mscorlib.dll
A first chance exception of type 'System.IO.FileNotFoundException'
occurred in mscorlib.dll
A first chance exception of type 'System.UnauthorizedAccessException'
occurred in mscorlib.dll
'MyApp.exe' (Managed): Loaded
'c:\myapps\myapp\myapp\bin\release\OpenNETCF.WindowsCE.dll'
'MyApp.exe' (Managed): Loaded
'c:\myapps\myap\myapp\bin\release\OpenNETCF.WindowsCE.Messaging.dll'
The thread 0xc1e15b9a has exited with code 0 (0x0). // I get tons of
these
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread '<No Name>' (0xc1e15b9a) has exited with code 0 (0x0). // with
some of these mixed in
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread '<No Name>' (0xc1e15b9a) has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread '<No Name>' (0xc1e15b9a) has exited with code 0 (0x0).
The thread '<No Name>' (0xc1e15b9a) has exited with code 0 (0x0).
The thread '<No Name>' (0xc1e15b9a) has exited with code 0 (0x0).
The thread '<No Name>' (0xc1e15b9a) has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread '<No Name>' (0xc1e15b9a) has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread '<No Name>' (0xc1e15b9a) has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
// at this point I closed the application via the user interface
The thread 0xc1e15b9a has exited with code 0 (0x0).
The thread 0x1d2cf2a has exited with code 0 (0x0).
The thread 0x67004fce has exited with code 0 (0x0).
The thread 0xe7004b52 has exited with code 0 (0x0).
The thread 0xc1d859de has exited with code 0 (0x0).
The thread 0xc1e15b9a has exited with code 0 (0x0).
A first chance exception of type 'System.Threading.ThreadAbortException'
occurred in OpenNETCF.WindowsCE.Messaging.dll
The thread 0x67004176 has exited with code 0 (0x0).
The program '[0xC6E106C6] MyApp.exe: Managed' has exited with code 0
(0x0).


Remote Performance Monitor (3.5) highlights:
Managed Bytes Allocated - rising
Managed Objects Allocated - rising
Managed Bytes in Use after GC - stable
Total Bytes in Use after GC - stable
Bytes of String Objects Allocated - rising
Boxed Value Types - rising
Uncontested Monitor.Enter Calls - rising
Bitmaps Created - rising (due to drawing owner drawn controls to bitmap,
then using DrawImage)
Scheduled Timers - rising
Process Heap - up and down occaisionally, but always returns to same value


I've been fighting this for almost a week and cannot find the solution -
any advice will be greatly appreciated.

- MM
 

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