It looks like you are getting some unhandled exceptions. If a .NET application encounters an exception which is not caught by a Try/Catch block and there is no debugger to display it, the application will terminate.
Add some exception handling and logging to your application so that you can see all the details of the exception. I recommend using the exception object's ToString
method when you display or log it because that will show the exception type, message, and stack trace for the exception and all of its inner exceptions as well. Once you have that information, it should be easier to determine what's going wrong and how to fix it.
To add the exception handling, if you are using VB's application framework, then go to the "Application" tab of your project properties page and click the "View Application Events" button. In the MyApplication
class, add an event handler for the UnhandledException
event, such as:
Private Sub MyApplication_UnhandledException(ByVal sender As Object, ByVal e As UnhandledExceptionEventArgs) Handles Me.UnhandledException
MyLog.WriteEntry(e.Exception.ToString())
End Sub
If, however, you do not use the application framework, go to your application's entry point metion (Sub Main
) and put a Try/Catch block around all the code in that method, such as:
Public Sub Main
Try
' ...
Catch ex As Exception
MyLog.WriteEntry(ex.ToString())
End Try
End Sub
These examples assume you have a MyLog
class with a shared WriteEntry
method. Obviously you would need to implement your own logging in such a class.