|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Application Unexpectedly TerminatingThe 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 "Martin" <Mar***@discussions.microsoft.com> wrote [Application Terminating on Windows Mobile]> My question is, what is the best way to isolate this error. I have tried In a standard .Net application I would:> 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. - 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/default.asp?url=/library/en-us/wcewatson5/html/wce50conErrorReportingOverview.asp .... it looks like a similar process would be feasable on Windows Mobile. -- Chris Mullins Thanks for the input.
I decided to rebuild the project from scratch with the same source code and that worked. Show quote "Chris Mullins" wrote: > "Martin" <Mar***@discussions.microsoft.com> wrote > > [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/default.asp?url=/library/en-us/wcewatson5/html/wce50conErrorReportingOverview.asp > > .... it looks like a similar process would be feasable on Windows Mobile. > > -- > Chris Mullins > > > Have you tried an unhandled exception handler to at least get notified?
Other then that, Chris's suggestion is a good one. Show quote "Martin" <Mar***@discussions.microsoft.com> wrote in message news:B0166983-FA09-481B-97C7-E07FD95EAEAC@microsoft.com... >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 |
|||||||||||||||||||||||