.NET Exception kills VB6 application

I have a VB6 application. It calls the .NET code. .NET code sometimes throws a design exception.

VB6 has an On Error Goto statement in a function that calls .NET code. When .NET throws an exception, VB6 code must handle the error (in the Goto block), write the Err.Description message to the log, and call Err.Clear and follow it.

This works fine and as expected (as described above) when starting the VB6 application from Visual Studio 6.0. When I launch a VB6 application from a compiled exe, I see the expected error in my VB6 log file ... but after an error occurs, the VB6 application freezes for a moment and then unexpectedly crashes. Event Viewer doesn't even have an APPCRASH report.

Any troubleshooting ideas?

+4
source share
1 answer

This sounds like a threading issue, although you say it is not. I would start with a tool like Process Explorer and keep track of which threads are created when called. This may be unintentional.

Secondly, I would successfully register a successful return from .NET code - it is possible that an error occurs in your code.

+1
source

All Articles