I have searched far and wide for recommendations on how to try and capture all errors, but I did not find anything I didn't already try.
This is a Visual Basic .NET (.NET 3.5) application that I inherited recently at work. They have had this problem for awhile where the application will just crash with no error -- the program just closes/disappears.
The application was already handling MyApplication.UnhandledException
which wasn't catching the issue. I added a handler for AppDomain.CurrentDomain.UnhandledException
to see if that would catch the issue, but no luck and I am handling the fact that System.UnahndledExceptionEventArgs.ExceptionObject
may not be of type Exception
.
There are no other threads being created and no other AppDomains being created. It seems to crash anywhere between 3-5+ hours of use and is not dependent on the action the user took.
With all that said, is there anything else I can hook into to try and capture these errors? All my expertise revolve around C# so I am not sure if there is anything else I could possibly hook into with VB.NET or if I missed something else.
My other question is: What's the proper way to log errors inside these events? I normally attempt to log to file, however, the existing code and myself quickly trying to capture the unhandled AppDomain exceptions are firing off a MessageBox. As I write this, I can see this possibly as a reason I am not being informed of errors.
Thanks
Update 1
I was finally able to get it to crash for me (not in the IDE) and saw what appeared to be a MessageBox window outline quickly appear and disappear before the contents were drawn. I have modified my unhandled exception handling to log to a file on the user's desktop instead. I guess at this point it is more of a waiting game since I cannot get it to crash in the IDE.