Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging VB6 Crash Dump

Tags:

vb6

windbg

I have a VB6 app that runs on thousands of machines. On a very small number of these I'm getting a "This application has stopped working" error. I've seen it on Vista, Windows 7 (x32 and x64) and Windows 8.1.

I've narrowed it down to occurring sometime between the first form_resize event and the actual painting of the form during the first redraw of the main window. It's happening somewhere out of my VB6 code somewhere as I cannot catch the error and all the logging I've put in is useless. For example, if the application starts up with the main window visible it crashes. If it starts up minimized it runs run until you activate the window and then it crashes. Today I managed to get a crash dump off of a clients computer (because, of course we can never get it to crash on our dev machines). Here's what WinDBG is telling me. I'd appreciate (ANY) help as I've been trying to get to the bottom of this since 2012 (!!!!!!).

    FOLLOWUP_IP: 
msvbvm60!Zombie_Release+1233b
72960d94 8901            mov     dword ptr [ecx],eax

APP:  timeclockmts.exe

ANALYSIS_VERSION: 6.3.9600.16384 (debuggers(dbg).130821-1623) x86fre

PRIMARY_PROBLEM_CLASS:  WRONG_SYMBOLS

BUGCHECK_STR:  APPLICATION_FAULT_WRONG_SYMBOLS

LAST_CONTROL_TRANSFER:  from 72a09a7b to 72960d94

STACK_TEXT:  
WARNING: Stack unwind information not available. Following frames may be wrong.
00097504 72a09a7b 01396b8c 4fb934ec 60030053 msvbvm60!Zombie_Release+0x1233b
00097544 72a09c2c 01396b8c 00000009 00000000 msvbvm60!BASIC_DISPINTERFACE_GetTypeInfo+0x2aa
00097574 758c370d 01396b8c 00000009 75870630 msvbvm60!EVENT_SINK_Invoke+0x50
000975cc 7589c30e 00000000 000273c9 0b0dcb40 oleaut32!VarMonthName+0x11350
000975e0 758c41e5 00000001 00000002 00000000 oleaut32!VarDecNeg+0x5d45
000975f4 729932c4 0b0dcb40 000273c9 00000000 oleaut32!VarMonthName+0x11e28
00097628 72973db1 0523c0dc 00000012 4180923a msvbvm60!IID_IVbaHost+0x24c84
0009767c 729c1e19 0000000d 4180923a 0523bebc msvbvm60!IID_IVbaHost+0x5771
000976b8 729acdb0 0000000d 4180923a 05221380 msvbvm60!IID_IVbaHost+0x537d9
000976f4 729ad0a1 0523c0dc 0000000d 4180923a msvbvm60!IID_IVbaHost+0x3e770
00097728 72980eed 034a0904 0000000d 00000001 msvbvm60!IID_IVbaHost+0x3ea61
00097988 4fbadfdb 01396a70 000979fc 000979f4 msvbvm60!IID_IVbaHost+0x128ad
00097a20 4fbaa41a 01396a70 0009834c 00098478 ciaXPLabel30!DllCanUnloadNow+0x10efd
00097a5c 75873e75 01396a70 0b0ee654 00000000 ciaXPLabel30!DllCanUnloadNow+0xd33c
00097a78 72a16ef5 01396b8c 0000001c 00000004 oleaut32!DispCallFunc+0xa6
000983d4 72a09a7b 01396b8c 4fb934ec 60030053 msvbvm60!_vbaAptOffset+0x68b
00098414 72a09c2c 01396b8c 00000009 00000000 msvbvm60!BASIC_DISPINTERFACE_GetTypeInfo+0x2aa
00098444 758c370d 01396b8c 00000009 75870630 msvbvm60!EVENT_SINK_Invoke+0x50
0009849c 7589c30e 00000000 000273c9 0b0dcb40 oleaut32!VarMonthName+0x11350
000984b0 758c41e5 00000001 00000002 00000000 oleaut32!VarDecNeg+0x5d45
000984c4 729932c4 0b0dcb40 000273c9 00000000 oleaut32!VarMonthName+0x11e28
000984f8 72973db1 0523c0dc 00000012 4180923a msvbvm60!IID_IVbaHost+0x24c84
like image 990
nemmy Avatar asked Oct 20 '22 00:10

nemmy


1 Answers

Thanks to blabb who taught me how to fix up my symbols and re-run the analysis the reason for my crash became obvious. Unfortunately I'd already worked that out myself by trial and error (removing controls from a form one at a time until the crash stopped occurring). Here's the lines of the crash dump that told me what was happening:

00097a20 4fbaa41a 01396a70 0009834c 00098478 ciaXPLabel30!DllCanUnloadNow+0x10efd
00097a5c 75873e75 01396a70 0b0ee654 00000000 ciaXPLabel30!DllCanUnloadNow+0xd33c

The complete log looks like an endless loop of this control trying to dispose of itself. I've ditched the control and now things are working nicely.

like image 122
nemmy Avatar answered Nov 15 '22 12:11

nemmy