Question

an old VB6 developed application having run on all previous Windows Versions since Windows 2000 crashes on Windows 8. It uses the ComCtl32.ocx library (Version 6.0.81.5) as a component.

When the app is running and I open an arbitary form with a ComCtl32.ListView with containing items on it, the app crashes as soon as one of those listview items have been clicked by mouse. I'm 100% sure the problem centers somewhere around the ListView control. For that reason I created a dummy app which upon a button click opens a from with a listview control on it. Clicking one of the items leads to the crash.

The listview itself is of type report and contains two columns. Please see the only code that loads data into the listview control:

Private Sub Form_Load()
    With Me.lvMaskSelect
        .ColumnHeaders.Item(1).Text = "Type"
        .ColumnHeaders.Item(2).Text = "Description"

        .ListItems.Add 1, "", "Value - 1"
        .ListItems.Add 2, "", "Value - 2"
        .ListItems.Add 3, "", "Value - 3"
        .ListItems.Add 4, "", "Value - 4"
        .ListItems.Add 5, "", "Value - 5"
        .ListItems.Add 6, "", "Value - 6"
    End With
End Sub

I tried to analyze what is going on here but I didn't succeed.

EVENTLOG

Please find below the corresponding event log entry written by Windows.

Name der fehlerhaften Anwendung: CrashTestListView.exe, Version: 1.0.0.0, Zeitstempel: 0x53429714 Name des fehlerhaften Moduls: COMCTL32.OCX, Version: 6.0.81.5, Zeitstempel: 0x3802598b Ausnahmecode: 0xc0000005 ' ACCESS VIOLATION Fehleroffset: 0x00020f51 ID des fehlerhaften Prozesses: 0xfcc Startzeit der fehlerhaften Anwendung: 0x01cf525b6beeb81a Pfad der fehlerhaften Anwendung: C:\Users\Customer\Desktop\CrashTestListView.exe Pfad des fehlerhaften Moduls: C:\Windows\SYSTEM32\COMCTL32.OCX Berichtskennung: aaca0d08-be4e-11e3-8253-000c29df5c6e Vollständiger Name des fehlerhaften Pakets: Anwendungs-ID, die relativ zum fehlerhaften Paket ist:

WINDBG

I also created a memory dump and analyzed it with WinDbg which shows the following Output:

WARNING: Unable to verify timestamp for msvbvm60.dll ERROR: Module load completed but symbols could not be loaded for msvbvm60.dll

FAULTING_IP: COMCTL32_202b0000+20f51 202d0f51 c6400100 mov byte ptr [eax+1],0

EXCEPTION_RECORD: ffffffff -- (.exr ffffffffffffffff) ExceptionAddress: 202d0f51 (COMCTL32_202b0000+0x00020f51) ExceptionCode: c0000005 (Access violation) ExceptionFlags: 00000000 NumberParameters: 2 Parameter[0]: 00000001 Parameter[1]: 00000001 Attempt to write to address 00000001

PROCESS_NAME: CrashTestListView.exe

ERROR_CODE: (NTSTATUS) 0xc0000005 - Die Anweisung in 0x%08lx verweist auf Speicher 0x%08lx. Der Vorgang %s konnte nicht im Speicher durchgef hrt werden.

WRITE_ADDRESS: 00000001

BUGCHECK_STR: ACCESS_VIOLATION

DEFAULT_BUCKET_ID: NULL_CLASS_PTR_DEREFERENCE

LAST_CONTROL_TRANSFER: from 202bc537 to 202d0f51

STACK_TEXT:

WARNING: Stack unwind information not available. Following frames may be wrong.
0018c774 202bc537 00000000 0018d008 0018c790 COMCTL32_202b0000+0x20f51
0018c794 202b319f 0000204e 00000000 0018d008 COMCTL32_202b0000+0xc537
0018c810 7679775e 00060634 0000204e 00000000 COMCTL32_202b0000+0x319f
0018c83c 76798c2a 202b3142 00060634 0000204e user32!_InternalCallWinProc+0x23
0018c8cc 7679d7d8 202b3142 00000000 0000204e user32!UserCallWinProcCheckWow+0x184
0018c904 744341ae ffff04e3 00060634 0000204e user32!CallWindowProcW+0x83
0018c97c 7443418f 0000204e 00000000 0018d008 comctl32!CallNextSubclassProc+0xf1
0018c99c 744340d8 00060634 0000204e 00000000 comctl32!DefSubclassProc+0x56
0018ca10 74433f69 0000204e 00000000 0018d008 comctl32!CallNextSubclassProc+0xf1
0018ca6c 7679775e 00060634 0000204e 00000000 comctl32!MasterSubclassProc+0xa1
0018ca98 76798c2a 74433ec4 00060634 0000204e user32!_InternalCallWinProc+0x23
0018cb28 76798dd6 74433ec4 00000000 0000204e user32!UserCallWinProcCheckWow+0x184
0018cb88 76798f78 00a40130 00000000 0000204e user32!DispatchClientMessage+0xdc
0018cbc0 76fcd792 0018cbd8 00000000 0018cdb0 user32!__fnDWORD+0x36
0018cc44 7679775e 00000000 74433ec4 80000000 ntdll!KiUserCallbackDispatcher+0x2e
0018cc5c 767c1e6d 00a40130 00000000 0018d008 user32!_InternalCallWinProc+0x23
0018cc78 6605ccd5 00060634 0000204e 00000000 user32!SendMessageA+0x6c
0018cca4 6605f967 006c62cc 00050660 0000004e msvbvm60+0x5ccd5
0018cd04 7679775e 00050660 0000004e 00000000 msvbvm60+0x5f967
0018cd30 76798c2a 6605f74e 00050660 0000004e user32!_InternalCallWinProc+0x23
0018cdc0 76798dd6 6605f74e 00000000 0000004e user32!UserCallWinProcCheckWow+0x184
0018ce20 76798f78 00a3d9b0 00000000 0000004e user32!DispatchClientMessage+0xdc
0018ce58 76fcd792 0018ce70 00000000 0018d394 user32!__fnDWORD+0x36
0018ce8c 7679e7c5 00050660 0000004e 00000000 ntdll!KiUserCallbackDispatcher+0x2e
0018cef0 7679e8fe 00a3d9b0 00000000 0018d008 user32!SendMessageWorker+0x117
0018cf24 74424b12 00050660 0000004e 00000000 user32!SendMessageW+0x12b
0018cfbc 74412e9b 0018d008 0018d9c8 0000104b comctl32!CCSendNotify+0x145
0018d114 744289a9 0018d9c8 0000104b 005f06b8 comctl32!CLVItemStore::OnGetItem+0x30a
0018d2c4 74428811 00060634 0000104b 00000000 comctl32!CListView::WndProc+0x16c
0018d2e8 7679775e 00060634 0000104b 00000000 comctl32!CListView::s_WndProc+0x4b
0018d314 76798c2a 744287c2 00060634 0000104b user32!_InternalCallWinProc+0x23
0018d3a4 767c2155 744287c2 00000000 0000104b user32!UserCallWinProcCheckWow+0x184
0018d3dc 202b3349 ffff02d1 00060634 0000104b user32!CallWindowProcA+0x82
0018d420 202bc576 0000104b 00000000 0018d9c8 COMCTL32_202b0000+0x3349
0018d444 202b319f 0000104b 00000000 0018d9c8 COMCTL32_202b0000+0xc576
0018d4c0 7679775e 00060634 0000104b 00000000 COMCTL32_202b0000+0x319f
0018d4ec 76798c2a 202b3142 00060634 0000104b user32!_InternalCallWinProc+0x23
0018d57c 7679d7d8 202b3142 00000000 0000104b user32!UserCallWinProcCheckWow+0x184
0018d5b4 744341ae ffff04e3 00060634 0000104b user32!CallWindowProcW+0x83
0018d62c 7443418f 0000104b 00000000 0018d9c8 comctl32!CallNextSubclassProc+0xf1
0018d64c 744340d8 00060634 0000104b 00000000 comctl32!DefSubclassProc+0x56
0018d6c0 74433f69 0000104b 00000000 0018d9c8 comctl32!CallNextSubclassProc+0xf1
0018d71c 7679775e 00060634 0000104b 00000000 comctl32!MasterSubclassProc+0xa1
0018d748 76798c2a 74433ec4 00060634 0000104b user32!_InternalCallWinProc+0x23
0018d7d8 76798dd6 74433ec4 00000000 0000104b user32!UserCallWinProcCheckWow+0x184
0018d838 76798f78 00a40130 00000000 0000104b user32!DispatchClientMessage+0xdc
0018d870 76fcd792 0018d888 00000000 0018dbe8 user32!__fnDWORD+0x36
0018d938 7480e76c 00060634 0000104b 00000000 ntdll!KiUserCallbackDispatcher+0x2e
0018d9ac 7480eba6 00000000 0018d9c8 0000003c oleacc!XSend_ListView_GetItem+0x4d
0018da04 7480ea89 0018da28 00000010 7480e650 oleacc!LVGetImageIndex+0x34
0018da3c 74801c63 005e0a08 00000003 00000000 oleacc!CListView32::get_accState+0x135
0018da60 74803263 005f8dd8 00000003 00000000 oleacc!AccWrap_Base::get_accState+0x31
0018db6c 74856eb7 005f8dd8 00000003 00000000 oleacc!AccWrap_Annotate::get_accState+0x30a
0018dbf4 74856fe7 700115f9 0018dc0f 76799e20 tiptsf!CARET::UpdateMSAAEditFieldState+0x1d9
0018dc28 74853fe4 00000001 dc1e9e18 005e1be8 tiptsf!CARET::UpdateEditFieldState+0x2d
0018e120 74851ba5 00008005 fffffffc 00000001 tiptsf!CARET::_ProcessCaretEvents+0x797
0018e17c 7679b402 01920257 00008005 00060634 tiptsf!CARET::ProcessCaretEvents+0x71
0018e1bc 76fcd792 0018e1d4 00000000 0018e4f8 user32!__ClientCallWinEventProc+0x2e
0018e1f0 7440fe46 00008005 00060634 fffffffc ntdll!KiUserCallbackDispatcher+0x2e
0018e220 7440fdea 00008005 00000000 00000000 comctl32!    CLVAccessibilityManager::_NotifyWinEventWorker+0x4a
0018e248 74410607 00008005 00000000 00000000 comctl32!    CLVAccessibilityManager::NotifyWinEvent+0x2a
0018e268 744102e9 00000000 00000007 0018e428 comctl32!CListView::NotifyFocusEvent+0x5c
0018e278 74410260 005e7e78 00070636 00000007 comctl32!CListView::OnSetFocus+0x6b
0018e428 74428811 00060634 00000007 00070636 comctl32!CListView::WndProc+0x1293
0018e44c 7679775e 00060634 00000007 00070636 comctl32!CListView::s_WndProc+0x4b
0018e478 76798c2a 744287c2 00060634 00000007 user32!_InternalCallWinProc+0x23
0018e508 767c2155 744287c2 00000000 00000007 user32!UserCallWinProcCheckWow+0x184
0018e540 202b3349 ffff02d1 00060634 00000007 user32!CallWindowProcA+0x82
0018e584 202bc576 00000007 00070636 00000000 COMCTL32_202b0000+0x3349
0018e5a8 202b319f 00000007 00070636 00000000 COMCTL32_202b0000+0xc576
0018e624 7679775e 00060634 00000007 00070636 COMCTL32_202b0000+0x319f
0018e650 76798c2a 202b3142 00060634 00000007 user32!_InternalCallWinProc+0x23
0018e6e0 7679d7d8 202b3142 00000000 00000007 user32!UserCallWinProcCheckWow+0x184
0018e718 744341ae ffff04e3 00060634 00000007 user32!CallWindowProcW+0x83
0018e790 7443418f 00000007 00070636 00000000 comctl32!CallNextSubclassProc+0xf1

STACK_COMMAND: ~0s; .ecxr ; kb

FAULTING_THREAD: 00000050

FOLLOWUP_IP: COMCTL32_202b0000+20f51 202d0f51 c6400100 mov byte ptr [eax+1],0

SYMBOL_STACK_INDEX: 0 SYMBOL_NAME: COMCTL32_202b0000+20f51 FOLLOWUP_NAME: MachineOwner MODULE_NAME: COMCTL32_202b0000 IMAGE_NAME: COMCTL32.OCX DEBUG_FLR_IMAGE_TIMESTAMP: 3802598b FAILURE_BUCKET_ID: ACCESS_VIOLATION_COMCTL32_202b0000+20f51 BUCKET_ID: ACCESS_VIOLATION_COMCTL32_202b0000+20f51 Followup: MachineOwner

MANIFEST

The application incorporates a manifest file which looks like this:

<?xml version="1.0" encoding="utf-8" standalone="yes"?
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
        <assemblyIdentity type="win32" name="CrashTestListView" version="1.0.0.0" processorArchitecture="*"></assemblyIdentity>
        <description>
            CrashTestListView
        </description>
        <dependency>
            <dependentAssembly>
                <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" publicKeyToken="6595b64144ccf1df" language="*" processorArchitecture="*"></assemblyIdentity>
            </dependentAssembly>
        </dependency>
        <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
            <security>
                <requestedPrivileges>
                    <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
                </requestedPrivileges>
            </security>
        </trustInfo>
</assembly>

FINALLY

Do you have some hints or web references to solve this problem? Maybe someone who has faced a similar problem before?

Was it helpful?

Solution

Make sure you installed the lates VB6RuntimeSP6 on the machine. http://www.microsoft.com/en-us/download/details.aspx?id=7030

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top