We are working on a optimization of process built in Excel and experiencing a recurring issue with Excel crashing after loading a specific file that contains many worksheets and extensive VBA code. The crash occurs after the WorkbookOpen event has been processed. The Excel file occasionally crashes without any error message when reloaded, even after add-ins have been disabled.
I analyzed the crash dumps using Windbg, and the consistent error across all dumps is an Access Violation (c0000005) in the VBE7.DLL module, specifically in the CEcTypeComp::LookupMember function. This suggests a possible pointer issue or corruption within the VBA environment.
Summed up:
I have tried disabling all Excel add-ins, but the crash still occurs. I also reviewed the VBA code and ensured that no obvious errors were present. The expectation was that either disabling the add-ins or correcting any VBA code issues would prevent the crash, but the problem persists. Additionally, I expected that analyzing the crash dumps with Windbg would help pinpoint the exact cause of the crash, but while it indicates an issue in VBE7.DLL, I’m still unclear on how to proceed to resolve it.
The dumps were created using
procdump -ma -e EXCEL.EXE
during the crash.
My question is:
- How can I further diagnose or narrow down the root cause of this crash?
- Are there specific debugging steps or tools within Excel/VBA that can help isolate the problem?
- Could this be related to corrupted VBA references or a memory management issue, and how can I address it?
Any insights or suggestions would be greatly appreciated!
Here’s one example of the crash dump:
0:000> !analyze -v
*******************************************************************************
* *
* Exception Analysis *
* *
*******************************************************************************
*** WARNING: Check Image - Checksum mismatch - Dump: 0x42c2c9f, File: 0x42cc8a8 - C:ProgramDataDbgsymEXCEL.EXE668C50FC42d5000EXCEL.EXE
KEY_VALUES_STRING: 1
Key : AV.Fault
Value: Read
Key : Analysis.CPU.mSec
Value: 4171
Key : Analysis.Elapsed.mSec
Value: 5286
Key : Analysis.IO.Other.Mb
Value: 0
Key : Analysis.IO.Read.Mb
Value: 1
Key : Analysis.IO.Write.Mb
Value: 0
Key : Analysis.Init.CPU.mSec
Value: 484
Key : Analysis.Init.Elapsed.mSec
Value: 51827
Key : Analysis.Memory.CommitPeak.Mb
Value: 305
Key : Failure.Bucket
Value: INVALID_POINTER_READ_c0000005_EXCEL.EXE!_tailMerge_mso30win32client_dll
Key : Failure.Hash
Value: {3c90ba06-fc72-d981-b986-358ee28f987a}
Key : Timeline.OS.Boot.DeltaSec
Value: 1359697
Key : Timeline.Process.Start.DeltaSec
Value: 27
Key : WER.OS.Branch
Value: vb_release
Key : WER.OS.Version
Value: 10.0.19041.1
Key : WER.Process.Version
Value: 16.0.17726.20160
FILE_IN_CAB: EXCEL.EXE_240731_112540.dmp
COMMENT:
*** procdump -ma -e EXCEL.EXE
*** Unhandled exception: C0000005.ACCESS_VIOLATION
NTGLOBALFLAG: 0
APPLICATION_VERIFIER_FLAGS: 0
CONTEXT: (.ecxr)
rax=00007ff66cad95a0 rbx=000000606b3867f0 rcx=0000000000792c64
rdx=00007ff66c8f08d8 rsi=0000000000000000 rdi=0000000000000001
rip=00007ff668ff24e1 rsp=000000606b385388 rbp=000000606b3855a0
r8=00007ff66c8efab0 r9=0000000000000202 r10=000000000000fdff
r11=0000000000002200 r12=0000000000000000 r13=000000606b3856e0
r14=0000020c1255def8 r15=0000000000000001
iopl=0 nv up ei pl nz ac po nc
cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010214
EXCEL!_tailMerge_mso30win32client_dll+0x18:
00007ff6`68ff24e1 660f7f442420 movdqa xmmword ptr [rsp+20h],xmm0 ss:00000060`6b3853a8=0000000000000000000000606b3856e0
Resetting default scope
EXCEPTION_RECORD: (.exr -1)
ExceptionAddress: 00007ff668ff24e1 (EXCEL!_tailMerge_mso30win32client_dll+0x0000000000000018)
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 0000000000000000
Parameter[1]: ffffffffffffffff
Attempt to read from address ffffffffffffffff
PROCESS_NAME: EXCEL.EXE
READ_ADDRESS: ffffffffffffffff
ERROR_CODE: (NTSTATUS) 0xc0000005 - Die Anweisung in 0x%p verwies auf Arbeitsspeicher bei 0x%p. Der Vorgang %s konnte im Arbeitsspeicher nicht durchgef hrt werden.
EXCEPTION_CODE_STR: c0000005
EXCEPTION_PARAMETER1: 0000000000000000
EXCEPTION_PARAMETER2: ffffffffffffffff
STACK_TEXT:
00000060`6b385388 00007ff6`69ef4c51 : 00000000`00792c64 00007ff6`6c8f08d8 00007ff6`6c8efab0 00000000`00000202 : EXCEL!_tailMerge_mso30win32client_dll+0x18
00000060`6b3853f8 00007ff6`6b21f1d7 : 00007ffa`bd46f6f0 00000060`6b385638 0000020c`5d9d33e0 00000000`00000001 : EXCEL!XlMsoRecoveryMockable::DisableRecoveryAutoLoad+0x31
00000060`6b385428 0000020c`03aa9490 : 00000060`6b3867f0 00000060`00000407 00007ffa`bd413fc0 00000000`00002196 : EXCEL!ProcessNonRecoveryBootCases+0xaa
00000060`6b385468 00000060`6b3867f0 : 00000060`00000407 00007ffa`bd413fc0 00000000`00002196 0000020c`15158e48 : 0x0000020c`03aa9490
00000060`6b385470 00000060`00000407 : 00007ffa`bd413fc0 00000000`00002196 0000020c`15158e48 00000000`05f169d0 : 0x00000060`6b3867f0
00000060`6b385478 00007ffa`bd413fc0 : 00000000`00002196 0000020c`15158e48 00000000`05f169d0 00000000`00000001 : 0x00000060`00000407
00000060`6b385480 864a519a`bd415076 : 0000020c`1515a4c8 00000001`00000000 00000008`00000000 0000020c`00000001 : VBE7!UIAPP::CommitAll+0x3c
00000060`6b3854c0 0000020c`1515a4c8 : 00000001`00000000 00000008`00000000 0000020c`00000001 0000020c`0f569090 : 0x864a519a`bd415076
00000060`6b3854c8 00000001`00000000 : 00000008`00000000 0000020c`00000001 0000020c`0f569090 00007ffa`bd49ab36 : 0x0000020c`1515a4c8
00000060`6b3854d0 00000008`00000000 : 0000020c`00000001 0000020c`0f569090 00007ffa`bd49ab36 00000060`6b385530 : 0x00000001`00000000
00000060`6b3854d8 0000020c`00000001 : 0000020c`0f569090 00007ffa`bd49ab36 00000060`6b385530 00007ffa`bd46fd53 : 0x00000008`00000000
00000060`6b3854e0 0000020c`0f569090 : 00007ffa`bd49ab36 00000060`6b385530 00007ffa`bd46fd53 0000020c`5fe6ce70 : 0x0000020c`00000001
00000060`6b3854e8 00007ffa`bd49ab36 : 00000060`6b385530 00007ffa`bd46fd53 0000020c`5fe6ce70 0000020c`00000001 : 0x0000020c`0f569090
00000060`6b3854f0 00007ffa`bd4061ae : 00000060`6b385638 0000020c`15157c48 0000020c`1515a830 00007ffa`00000001 : VBE7!BASIC_TYPEROOT::GetNamMgr+0x36
00000060`6b385530 00007ffa`bd46fb6f : 00000060`6b385638 0000020c`5d99c120 00000060`00000003 00007ffa`bd406190 : VBE7!EPIBIND::`scalar deleting destructor'+0xe
00000060`6b385560 00007ffa`bd470da7 : 0000020c`5d99c168 0000020c`03aa9490 00000000`00000001 00000000`0010c548 : VBE7!EPIBIND::CopyContextFrom+0xaf
00000060`6b3855b0 00007ffa`bd4730d1 : 0000020c`5d99c168 0000020c`03aa9490 00000000`00000001 00000000`0010c548 : VBE7!CEcTypeComp::LookupMemberWithBases+0x127
00000060`6b385690 00007ffa`bd471db8 : 0000020c`5f9eff98 0000020c`03aa9490 0000020c`00000001 00000060`0010c548 : VBE7!CEcProjTypeComp::LookupMember+0x7a9
00000060`6b385f20 00007ffa`bd4726c7 : 0000020c`5f9eff98 0000020c`03aa9490 00000000`00000001 00000000`0010c548 : VBE7!CEcProjTypeComp::LookupFromContext+0x14c
00000060`6b3860d0 00007ffa`bd4876eb : 0000020c`5f9eff98 0000020c`03aa9490 00000060`6b380001 00007ffa`00000002 : VBE7!CEcProjTypeComp::LookupNames+0x49f
00000060`6b386180 00007ffa`bd39208f : 0000020c`5dddc4d0 00000060`6b3867f0 00000000`00000001 00000060`6b386810 : VBE7!GEN_PROJECT::Bind+0x1ff
00000060`6b3867c0 00007ff6`6964bb99 : 00000000`00000000 00000000`00000001 00000060`6b386b70 00007ff6`6943126c : VBE7!CVbeProcs::BindProcDisp+0x1c3
00000060`6b3868c0 00007ff6`696171d7 : 0000020c`1255def8 00000000`00000000 00000060`6b386a10 0000020c`5c34fcf0 : EXCEL!HrVbpBindProcDisp+0x79
00000060`6b386910 00007ff6`6a9fc647 : 00000060`6b386e88 00007ff6`68ea4bb5 00000000`00000000 00007ffa`00000000 : EXCEL!FFindOBName+0x430
00000060`6b386de0 00007ff6`690e0311 : 0000020c`15024450 00000000`00000000 00000000`00000000 00007ff6`694a06b2 : EXCEL!HrLoadOBName+0xfb
00000060`6b386e20 00007ff6`690e5439 : 00000000`00000001 00000000`00000000 0000020c`1594c7c0 0000020c`14cae5a0 : EXCEL!HrQueueOB+0xc5
00000060`6b386e80 00007ff6`690ebc25 : 0000020c`15024450 00000060`00000000 00000060`6b386fb0 0000020c`14cae5a0 : EXCEL!HrBookLoadReferences+0x67
00000060`6b386eb0 00007ff6`690d00b8 : 00000000`00000000 00000000`00000001 00000060`6b387470 0000020c`14ea1610 : EXCEL!HrBookLoadComplete+0x645
00000060`6b387310 00007ff6`690c277b : 00000000`00000000 00000000`00000f88 00000060`00000000 0000020c`15057bb0 : EXCEL!HrFileLoadEx+0xb40c
00000060`6b397b00 00007ff6`69bf62ea : 00000000`00000000 0000020c`6dff2dd0 00000000`00000000 00000060`00000000 : EXCEL!HrFileLoadWithCoauth+0xdb
00000060`6b397c20 00007ff6`6b21c735 : 00000000`0000103a 00000000`0000103a 0000020c`6dff2dd0 00000000`00000040 : EXCEL!HrFileLoadWithCoauth+0xaa
00000060`6b397ce0 00007ff6`69b0dba5 : 00000000`0000003b 0000020c`00000001 00000000`00000000 0000020c`15056ea0 : EXCEL!HighlightAndScrollToDrp+0x7d5
00000060`6b39c290 00007ff6`68fcf8b5 : 00000000`00000130 0000020c`05c96490 00000000`00000000 00000000`00000001 : EXCEL!FLoadRecoveredFiles+0x8e5
00000060`6b39ce60 00007ff6`690365f4 : 0000020c`6dff394c 00000060`6b39cfa0 0000020c`05c96490 0000020c`00000015 : EXCEL!Excel::XlBoot::SetupDocRecovery+0xb5
00000060`6b39cea0 00007ff6`68f5ab8e : 00000000`00000130 00000000`00000003 00000000`00000130 00000000`00000130 : EXCEL!FMainInit+0x2b3a
00000060`6b39f300 00007ff6`6907afd8 : 00000000`00000000 00000000`00000000 00007ff6`6c8efdc8 00000060`6b39f6c0 : EXCEL!FWinInit+0x3ce
00000060`6b39f5c0 00007ff6`68fefab9 : 00000000`00000001 00000000`00000000 00000000`00000000 00000000`00000000 : EXCEL!WinMain+0x958
00000060`6b39f8a0 00007ffb`17a47374 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : EXCEL!_imp_load_RmGetList+0x20d
00000060`6b39f8e0 00007ffb`187bcc91 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!BaseThreadInitThunk+0x14
00000060`6b39f910 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x21
SYMBOL_NAME: EXCEL!_tailMerge_mso30win32client_dll+18
MODULE_NAME: EXCEL
IMAGE_NAME: EXCEL.EXE
STACK_COMMAND: dt ntdll!LdrpLastDllInitializer BaseDllName ; dt ntdll!LdrpFailureData ; ~0s; .ecxr ; kb
FAILURE_BUCKET_ID: INVALID_POINTER_READ_c0000005_EXCEL.EXE!_tailMerge_mso30win32client_dll
OS_VERSION: 10.0.19041.1
BUILDLAB_STR: vb_release
OSPLATFORM_TYPE: x64
OSNAME: Windows 10
IMAGE_VERSION: 16.0.17726.20160
FAILURE_ID_HASH: {3c90ba06-fc72-d981-b986-358ee28f987a}
Followup: MachineOwner
---------
Kind Regards,
Alexander