.Net application crashes

My.Net application exits unexpectedly on certain computers (this is a desktop application). I tried to catch the exception, but the operator catch

I was using just cannot catch the exception that was happening.

Any ideas how to solve or diagnose this problem?

Note. This exception only occurs on the client machine, release mode, where we don't have a debugging tool.

Note 2: The application event log does not contain any errors.

0


a source to share


4 answers


You can try adding an event handler to System.Windows.Forms.Application.ThreadException and System.AppDomain.CurrentDomain.UnhandledException to see if you can see which exception (if any) causes your application to terminate.



+2


a source


From the Debug dropdown menu in Visual Studio, select exceptions and check all the check boxes. This should stop the application on any unhandled exceptions. Study it and give us the results.



0


a source


Can you check the application event logs on the client machine if the .NET runtime is recording something?

0


a source


This is almost always caused by a COM / PInvoke issue where the native code you are using throws a Win32 exception. Under certain circumstances, Windows will choose to simply abort the process rather than just terminate it when it is severe government damage such as an invalid stack pointer.

If you can determine what specific behavior precedes the shutdown, you can narrow your search for the / PInvokes controls that might be causing the problem.

0


a source







All Articles