Excel crash issues

Add-in Express™ Support Service
That's what is more important than anything else

Excel crash issues
Getting excel crashes. 
Ashim Mishra


Guest


Hi Team,

Recently our client has started getting crash issues because of our excel addin. We did some debugging around it and came across the source of the crash.
We are getting Access Violation Exception while doing ExcelApp.CalculateFull().


We do have COMExceptionHandling for this but still it's crashing the excel. We also have AddinModule_OnError() where we are setting the ADXErrorEventArgs.Handled as true but still this is happening.

We also collected some crash dumps for the same:

I am adding details of the event viewer logs and crash dump analysis.
Please note that we are having this issue on different systems and different excel versions.

Event Viewer logs:

[img]https://imgur.com/ISlVoRO[/img]

[img]https://imgur.com/RKrFt4Y[/img]

Crash dump analysis report:

0:012> !analyze -v
*******************************************************************************
* *
* Exception Analysis *
* *
*******************************************************************************

*** WARNING: Unable to verify checksum for System.ni.dll
Failed to request MethodData, not in JIT code range

KEY_VALUES_STRING: 1

Key : AV.Dereference
Value: NullPtr

Key : AV.Fault
Value: Read

Key : Analysis.CPU.mSec
Value: 132640

Key : Analysis.DebugAnalysisProvider.CPP
Value: Create: 8007007e on userAMachine

Key : Analysis.DebugData
Value: CreateObject

Key : Analysis.DebugModel
Value: CreateObject

Key : Analysis.Elapsed.mSec
Value: 150796

Key : Analysis.Memory.CommitPeak.Mb
Value: 289

Key : Analysis.System
Value: CreateObject

Key : CLR.BuiltBy
Value: NET48REL1LAST_C

Key : CLR.Engine
Value: CLR

Key : CLR.Version
Value: 4.8.4150.0

Key : Timeline.OS.Boot.DeltaSec
Value: 156991

Key : Timeline.Process.Start.DeltaSec
Value: 248

Key : WER.OS.Branch
Value: rs4_release

Key : WER.OS.Timestamp
Value: 2018-04-10T18:04:00Z

Key : WER.OS.Version
Value: 10.0.17134.1

Key : WER.Process.Version
Value: 16.0.4266.1001


ADDITIONAL_XML: 1

OS_BUILD_LAYERS: 1

COMMENT:
*** "C:\Dumps\procdump.exe" -accepteula -ma -j "c:/dumps" 19828 120 0000026C01340000
*** Just-In-Time debugger. PID: 19828 Event Handle: 120 JIT Context: .jdinfo 0x26c01340000

NTGLOBALFLAG: 0

PROCESS_BAM_CURRENT_THROTTLED: 0

PROCESS_BAM_PREVIOUS_THROTTLED: 0

APPLICATION_VERIFIER_FLAGS: 0

CONTEXT: (.ecxr)
rax=0000026c33ede67c rbx=0000026c33ed94a0 rcx=0000000000000008
rdx=0000000000000005 rsi=0000000000000000 rdi=0000026c25ba30f8
rip=00007ff6f6f19e64 rsp=000000db43cffa90 rbp=0000000000000000
r8=0000000000000005 r9=0000000000000f00 r10=0000000000000500
r11=000000db43cff990 r12=0000000000000000 r13=0000000000000000
r14=0000000000000000 r15=0000026c25be4d48
iopl=0 nv up ei pl nz na po nc
cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010204
EXCEL!Ordinal43+0x129e64:
00007ff6`f6f19e64 0fb70e movzx ecx,word ptr [rsi] ds:00000000`00000000=????
Resetting default scope

EXCEPTION_RECORD: (.exr -1)
ExceptionAddress: 00007ff6f6f19e64 (EXCEL!Ordinal43+0x0000000000129e64)
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 0000000000000000
Parameter[1]: 0000000000000000
Attempt to read from address 0000000000000000

PROCESS_NAME: EXCEL.EXE

READ_ADDRESS: 0000000000000000

ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s.

EXCEPTION_CODE_STR: c0000005

EXCEPTION_PARAMETER1: 0000000000000000

EXCEPTION_PARAMETER2: 0000000000000000

MISSING_CLR_SYMBOL: 0

STACK_TEXT:
000000db`43cffa90 00007ff6`f6f1af92 : 0000026c`37edc880 0000026c`37edc880 000000db`43cffb40 000000db`43cffb30 : EXCEL!Ordinal43+0x129e64
000000db`43cffb00 00007ff6`f6f1aac9 : 0000026c`33ed94a0 00000000`00000000 00000000`00000000 0000026c`33ed94a0 : EXCEL!Ordinal43+0x12af92
000000db`43cfff20 00007ffe`0a7e3034 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : EXCEL!Ordinal43+0x12aac9
000000db`43cfff60 00007ffe`0d241431 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!BaseThreadInitThunk+0x14
000000db`43cfff90 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x21


SYMBOL_NAME: EXCEL!Ordinal43+129e64

MODULE_NAME: EXCEL

IMAGE_NAME: EXCEL.EXE

STACK_COMMAND: ~12s ; .ecxr ; kb

FAILURE_BUCKET_ID: NULL_POINTER_READ_c0000005_EXCEL.EXE!Ordinal43

OS_VERSION: 10.0.17134.1

BUILDLAB_STR: rs4_release

OSPLATFORM_TYPE: x64

OSNAME: Windows 10

IMAGE_VERSION: 16.0.4266.1001

FAILURE_ID_HASH: {e551bb8f-6311-dfcc-e908-907b80bc2de1}

Followup: MachineOwner
Posted 11 Sep, 2020 05:10:20 Top
Ashim Mishra


Guest


While debugging using WinDbg i am continuously getting unhandled exception at

(4ed4.4af0): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
EXCEL!Ordinal43+0x129e64:
00007ff6`f6f19e64 0fb70e movzx ecx,word ptr [rsi] ds:00000000`00000000=????

Is it helpful to find the root cause of the issue ?
Posted 11 Sep, 2020 05:33:48 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Ashim,

Thank you for the detailed description.

Please provide more details about your environment and add-in:
- What Excel versions and bitness are affected?
- What Add-in Express version do you use?
- Which Add-in Express modules, components and panes do you use in your code?
- What other COM Add-ins and/or XLL/UDFs are installed in Excel?
- Is the issue reproducible with empty Excel workbooks?

We will try to reproduce the issue on our side.
Posted 11 Sep, 2020 07:43:31 Top
Ashim Mishra


Guest


Hi Dmitry,


Please find the detail as:

1) Excel Version: Excel 2013, Excel 2016 64 bit.
2) Addinexpress version: 9.4.4644.0
3) We use XLL + COM + RTD + Automation Addin as the components.
4) Most of our users have bloomberg addin. As far as my system is concern i have Analysis ToolPak, Team Foundation Add-in, VSTO Office Design Time Adaptor for Excel and our own addin. Tookpak one i have disabled.
5) No the issue is only reproducible when we open the sheet containing the UDF formula that we have created.


We have both XLL and Excel Automation based UDF, does this create any issues ?

I also have disabled other addin like analysis.tookpak etc and have only our addin enabled, still i am getting the same crash issue.

c20.406c): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
EXCEL!Ordinal43+0x129e64:
00007ff6`f6f19e64 0fb70e movzx ecx, word ptr [rsi] ds:00000000`00000000=????

Let me know if you want any other details from my side.
Posted 11 Sep, 2020 09:14:43 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Ashim,

Thank you.

We have both XLL and Excel Automation based UDF, does this create any issues ?


I don't think so. Nevertheless, I am afraid we will need some code sample from your side. I doubt you will be able to send your whole solution to us for testing. Could you please provide to us your COM, XLL and Automation modules without your business logic, with empty/dummy event handlers?
Posted 11 Sep, 2020 09:40:37 Top