Need Help Analyzing PML Log File for Sudden Termination of VB6 EXE
Hello VB6 Community,
I'm facing a perplexing issue with a VB6 application that quits unexpectedly with a ding.wav sound upon startup, but this only happens when run on any machine other than the developer machine. The application doesn't even reach Sub Main.
The application is substantial, featuring:
About 20 OCXs
15 UserControl instances
10 ActiveX EXEs
5 Type Libraries (TLBs)
Numerous enums, including one with roughly 2000 enumerators
Troubleshooting this issue is challenging due to the application’s size. Dismantling and testing it component by component could potentially take up to five days.
Here’s what I’ve tried so far:
Utilizing Process Explorer, which failed as the application terminates too quickly to track.
Implementing a global exception handler, which has had no effect since Sub Main isn't even initiated.
I have now managed to capture a Process Monitor log (PML file) during one of these sudden terminations. I’m attaching the PML log here for analysis. Could anyone recommend tools or methods to analyze this log to pinpoint where and why the termination occurs? Any insights or guidance on how to proceed would be greatly appreciated.
Thank you in advance for your assistance!
[Attachment: Logfile.pml as zip as .pml did not work]
Last edited by tmighty2; Aug 25th, 2024 at 06:12 PM.
Re: Need Help Analyzing PML Log File for Sudden Termination of VB6 EXE
Quitting with a ding can also be a sign of an error in your side-by-side manifest but those errors definitely get logged in the Event Viewer so this may not be the issue you're experiencing...
Re: Need Help Analyzing PML Log File for Sudden Termination of VB6 EXE
at the end of the day for something that big and complex. you are going to want to hire someone local to sit down at the PC and really take a log hard look at it. It could probably be done over a remote session. If the dev you have is not the dev who created it especially.
You will need an installer app to transfer it between machines andf make sure everything is registered properly. You will have to search to make sure each dll/ocx etc does not have additional dependencies which are failing. data files, databases, DSNs / ODBC connectors etc could be missing.
if you set some filters this might be a place to start. You might have resolve issues in layers as one fix unlocks the next level error. I would expect it to take a while even in skilled hands.
If you have the source, I would install vb6 on the test machine and try to load the source. The IDE will give good error messages while loading about missing components. (Some like the TLBs wont be required on machines which only run the exe but it would still help alert on others not working right).
Re: Need Help Analyzing PML Log File for Sudden Termination of VB6 EXE
Please suspend believe, and try these tests:
1 - Rename Main() into Main1(), and add empty one like so:
Public Sub Main()
End Sub
Run the project, and you should get no errors, because no code runs. Why this test? Main could run and crash on the first MsgBox or so, so you you might think it's not running.
2 - Add a simple MsgBox to Main above, do you see it when you run the program?
3 - If you have VC6(not VB6), then follow this method to pinpoint the source of a crash. However, if even Main doesn't run, then it's somewhat pointless.
Also, you can use an external Debug viewer to see messages when running in the EXE. You call OutputDebugString() to send text to it. I wrapped it in an easy to use routine, DebugPrint:
Private Declare Sub OutputDebugString Lib "kernel32" Alias "OutputDebugStringA" (ByVal lpOutputString As String)
Code:
Public Sub DebugPrint(msg As String)
OutputDebugString msg & vbCrLf ' Send to DebugView
Debug.Print msg ' If running in the IDE
End Sub
Re: Need Help Analyzing PML Log File for Sudden Termination of VB6 EXE
After looking at the log file with Process Monitor, it seems that one DLL is missing, VB6DE.DLL, which is a German language DLL according to this article:
Re: Need Help Analyzing PML Log File for Sudden Termination of VB6 EXE
At the end, my app would not even compile anymore, a telling me about invalid syntax but not jumping to the point the source code.
VB6 would crash during compilation.
What helped me to get to know the failing situation was to use "VB6 /make myapp.vbp".
When I used cmd to build the app, vb6 would finally tell me where the error was (in a form missing a control).