I have an app that once compiled runs perfectly fine. However, if I start it in VB6 environment, it crashes the IDE constantly and pretty randomly, but only when I take action with the application (e.g. move mouse over it, click on something, move a window, etc...)

The application does a lot of things that one does not associate with VB6: SIP, virtual sound card interfaces, audio encoding/decoding, etc...so it could be that, but the crashes seems so random.

The crash always occurs in the vba6.dll module (at least that's what the crash dialog says). Given that MS no longer supports VB6, what can I do to debug it?

I've tried it on XP and Win7 with the same results.

link|flag

I suppose you have applied VB6 service pack 6? Are there any "foreign" or unknown DLL injected in the VB6 process that could do harm, like anti-virus, addons, 3rd parties, etc.? – Simon Mourier 4 hours ago
@Simon Mourier Yes, VB6 SP6. And yes, a bunch of 3rd party components. – AngryHacker 4 hours ago
@AngryHacker - maybe you could try on a a fresh install with just VB6, if possible – Simon Mourier 4 hours ago

1 Answer

It is quite possible that some API/DLL functions are not compatible with VB IDE. We sometimes write different code for IDE and EXE, so are our windows subclassing and API drawing functions located in another dll (or ocx) to avoid crashing. In addition we use GPF handler (SetUnhandledExceptionFilter and related API functions) in our software, but this is turned on only in EXE - doesn't work in IDE anyway. Our GPFs occured mostly in EXE either :)

For debugging you can just exclude some code paths, esp related to windows messaging/subclassing, global hooks, drawing and API callbacks. You can install some better debugger (even VC is usable) to see call stack - sometimes this includes system function names, hinting to erroneus operation.

link|flag

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.