Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET Exception Kills VB6 App

I have a VB6 app. It's calling .NET code. The .NET code occasionally throws an Exception by design.

VB6 has an On Error Goto Statement in the Function calling the .NET code. When .NET throws an exception, the VB6 code should handle the error (in the Goto block), write the Err.Description to a log, and calls Err.Clear, and should proceed along it's way.

This works fine and as expected (as described above) when running the VB6 app from Visual Studio 6.0. When I run the VB6 app from a compiled exe, I see the expected error in my VB6 log file...but after the error occurs, the VB6 app hangs for a moment, then crashes unexpectedly. There isn't even an APPCRASH report in the Event Viewer.

Any ideas on how to troubleshoot this?

like image 411
Jeff Avatar asked Nov 13 '22 04:11

Jeff


1 Answers

It does sound like a threading issue, even though you are saying that it's not the case. I'd start with a tool like Process Explorer and monitor what threads get created when the call is made. It could be inadvertent.

Secondly, I'd log the successful return from the .NET code as well - it is possible that the error occurs in your code.

like image 179
AngryHacker Avatar answered Dec 16 '22 02:12

AngryHacker