Application Unexpectedly Terminating

G

Guest

I am running a c# application on WM5 using .NET 2.0 CF with the latest SP.
The code was written in VS 2005. I have tried this on multiple devices and
get the same results.

Upon hitting the following line of codes the application unexpectedly
terminates. The below code snippet is part of a class that is used in
multiple applications without a problem. In fact, the same application runs
perfectly on PPC 2003 device.

SqlCeCommand cmd = Conn.CreateCommand();
cmd.CommandText = SQL;
RowsAffected = cmd.ExecuteNonQuery(); <<< Application Exits HERE

I have tried debugging, but I get "The remote connection to the device has
been lost. Please verify the device connection and restart debugging." when
the application exits. The SQL command I use does not matter and the error
does not happen right away. For example, if I call the same SQL command in a
previous method in may run fine, then it will crash later.

My question is, what is the best way to isolate this error. I have tried
using try/catch/finally blocks, try/finally blocks, no exception handling. I
just can't seem to get enough info on the error to isolate it.

Thanks for any input
 
C

Chris Mullins

[Application Terminating on Windows Mobile]
My question is, what is the best way to isolate this error. I have tried
using try/catch/finally blocks, try/finally blocks, no exception handling.
I
just can't seem to get enough info on the error to isolate it.

In a standard .Net application I would:

- download the Debugging Tools for Windows
- start the process
- configure ADPlus to generate a minidump on a 2nd chance exception, and
then run ADPlus
- load the resulting dump into WinDbg and Son Of Strike
- poke at the dump until I figured out what was wrong.

Based on the info at:
http://msdn.microsoft.com/library/d...tson5/html/wce50conErrorReportingOverview.asp

.... it looks like a similar process would be feasable on Windows Mobile.
 
D

David Levine

Have you tried an unhandled exception handler to at least get notified?

Other then that, Chris's suggestion is a good one.
 
G

Guest

Thanks for the input.

I decided to rebuild the project from scratch with the same source code and
that worked.

Chris Mullins said:
[Application Terminating on Windows Mobile]
My question is, what is the best way to isolate this error. I have tried
using try/catch/finally blocks, try/finally blocks, no exception handling.
I
just can't seem to get enough info on the error to isolate it.

In a standard .Net application I would:

- download the Debugging Tools for Windows
- start the process
- configure ADPlus to generate a minidump on a 2nd chance exception, and
then run ADPlus
- load the resulting dump into WinDbg and Son Of Strike
- poke at the dump until I figured out what was wrong.

Based on the info at:
http://msdn.microsoft.com/library/d...tson5/html/wce50conErrorReportingOverview.asp

.... it looks like a similar process would be feasable on Windows Mobile.
 

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