S
steve.fillingham
Windows CE 6, .NET Compact Framework 2 (no service pack)
I have a problem whereby my application runs for various periods of
time before throwing a NotSupportedException, the application is
currently deployed into 500+ units which generally run ok but
occasionally need resetting due to this exception. Since the units
would normally get turned on and off on a daily basis the application
is generally not running for more than 24 hours or so, most of the
these sessions run without issue however some sessions generate the
NotSupportedException and eventually require a unit reset.
I have encountered this exception before from a few different
scenarios, the main one generates a Message
Control.Invoke must be used to interact with controls created on a
separate thread.
These have normally been easy to find and fix by using Control.Invoke
as the message suggests. No problem, however my logs show a
NotSupportedException with a Message of
NotSupportedException
Not very helpful message. Not only that but looking at the stack
trace shows methods which have worked millions of times before without
error, they also occur throughout the code base not always in the same
code path, however once a particular code path throws this exception
it will always throw another exception when executed again (without a
reset). The exception is thrown from different threads aswell, the UI
thread, communications threads it even sometimes throws within our
logging code producing a Windows Exception dialog and quitting the
app.
At the moment I am at a complete loss as to what is causing the
exceptions to be thrown, the message and stack data feel like red
herrings.
I have checked that it is not caused by low memory, the application
generally will have 50% of the 128MB free it may go up and down by a
few MB during usage but it is well clear of running out of memory. I
have even simulated low memory conditions whilst the application runs
by having a background thread just eat memory, eventually an
OutOfMemoryException is thrown and the application ofcourse crashes.
The logs contain plenty of OutOfMemoryExceptions but no instance of
NotSupportedException so I think it is not memory related, it has a
different signature.
Googling this particular signature of NotSupportedException has turned
up nothing.
Our application uses a 3rd party unmanaged DLL which performs CPU
intensive operations such as mapping and speech. My current thoughts
are that if the unmanaged DLL is perhaps occasionally trashing managed
memory (stack, JITed code) that it may cause the managed code to act
this way, is this possible ? We are currently trialling some units
with the managed DLL disabled and are yet to see any instance of the
error, but this will not confirm anything for a few weeks since it
does not occur frequently enough.
I will also be trialling an updated CE 6 image with latest service
packs and also .NET CF SP2.
Any ideas anyone ??
Steve
I have a problem whereby my application runs for various periods of
time before throwing a NotSupportedException, the application is
currently deployed into 500+ units which generally run ok but
occasionally need resetting due to this exception. Since the units
would normally get turned on and off on a daily basis the application
is generally not running for more than 24 hours or so, most of the
these sessions run without issue however some sessions generate the
NotSupportedException and eventually require a unit reset.
I have encountered this exception before from a few different
scenarios, the main one generates a Message
Control.Invoke must be used to interact with controls created on a
separate thread.
These have normally been easy to find and fix by using Control.Invoke
as the message suggests. No problem, however my logs show a
NotSupportedException with a Message of
NotSupportedException
Not very helpful message. Not only that but looking at the stack
trace shows methods which have worked millions of times before without
error, they also occur throughout the code base not always in the same
code path, however once a particular code path throws this exception
it will always throw another exception when executed again (without a
reset). The exception is thrown from different threads aswell, the UI
thread, communications threads it even sometimes throws within our
logging code producing a Windows Exception dialog and quitting the
app.
At the moment I am at a complete loss as to what is causing the
exceptions to be thrown, the message and stack data feel like red
herrings.
I have checked that it is not caused by low memory, the application
generally will have 50% of the 128MB free it may go up and down by a
few MB during usage but it is well clear of running out of memory. I
have even simulated low memory conditions whilst the application runs
by having a background thread just eat memory, eventually an
OutOfMemoryException is thrown and the application ofcourse crashes.
The logs contain plenty of OutOfMemoryExceptions but no instance of
NotSupportedException so I think it is not memory related, it has a
different signature.
Googling this particular signature of NotSupportedException has turned
up nothing.
Our application uses a 3rd party unmanaged DLL which performs CPU
intensive operations such as mapping and speech. My current thoughts
are that if the unmanaged DLL is perhaps occasionally trashing managed
memory (stack, JITed code) that it may cause the managed code to act
this way, is this possible ? We are currently trialling some units
with the managed DLL disabled and are yet to see any instance of the
error, but this will not confirm anything for a few weeks since it
does not occur frequently enough.
I will also be trialling an updated CE 6 image with latest service
packs and also .NET CF SP2.
Any ideas anyone ??
Steve