Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excel_Toolkit: Excel crashing and restarting on shutdown #233

Closed
pawelbaran opened this issue Jun 19, 2020 · 10 comments · Fixed by #243 or #296
Closed

Excel_Toolkit: Excel crashing and restarting on shutdown #233

pawelbaran opened this issue Jun 19, 2020 · 10 comments · Fixed by #243 or #296
Assignees
Labels
severity:critical No workaround exists. Essential to continue type:bug Error or unexpected behaviour

Comments

@pawelbaran
Copy link
Member

Description:

Excel still keeps on behaving weirdly. Steps taken by me today, one by one:

  • installed today's installer
  • opened Excel, blank workbook
  • filled a few cells randomly with non-bhom content (just random strings and numbers)
  • left Excel running for an hour without touching it at all
  • closed Excel with upper-right cross button, refused to save the doc
  • Excel looks like it is closing, but then something starts processing and the following shows up:
    image
  • after 1st restart, tried to close again - restarts again
  • after 2nd restart, tried to close again - success, BUT yesterday some leftover of the process was still alive and was blocking my BHoM assemblies (needed to track it down and kill via task manager -> background processes)

I am curious if that is something particular to my build or a more widespread issue.

@al-fisher @rwemay FYI

@pawelbaran pawelbaran added severity:critical No workaround exists. Essential to continue type:bug Error or unexpected behaviour labels Jun 19, 2020
@pawelbaran
Copy link
Member Author

A possible hint, in case if that issue was specific to my machine only: I was building Excel from source at some point and registered the addin manually by clicking through the options etc. Maybe that causes some conflict with the installer?

@rwemay
Copy link
Member

rwemay commented Jun 19, 2020

Thanks Pawel, a lot has been done this week trying to address with some good testing, so good to explore if this is a machine specific issue, particularly as you’ve got previous build etc. Maybe worth double checking no dlls hanging around, and worth removing all addins manually before reinstalling.

@adecler
Copy link
Member

adecler commented Sep 1, 2020

Since the problem is still happening, I thought I will start documenting what I found here.
Looking at the Event Viewer, this is the error log I am getting:

Faulting application name: EXCEL.EXE, version: 16.0.12527.20988, time stamp: 0x5f2c939c
Faulting module name: ntdll.dll, version: 10.0.17763.1192, time stamp: 0x5854f5da
Exception code: 0xc0000409
Fault offset: 0x00000000000a4740
Faulting process ID: 0x1760
Faulting application start time: 0x01d68008b17d7e70
Faulting application path: C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE
Faulting module path: C:\WINDOWS\SYSTEM32\ntdll.dll
Report ID: 4e1c3ce2-ebfa-4e61-a25a-d7a6533723bf
Faulting package full name: 
Faulting package-relative application ID: 

The error reporting section gives me this:

Fault bucket 1776449669094047255, type 5
Event Name: BEX64
Response: Not available
Cab Id: 0

Problem signature:
P1: EXCEL.EXE
P2: 16.0.12527.20988
P3: 5f2c939c
P4: ntdll.dll
P5: 10.0.17763.1192
P6: 5854f5da
P7: 00000000000a4740
P8: c0000409
P9: 000000000000000a
P10: 

Attached files:
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER5B73.tmp.dmp
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER619E.tmp.WERInternalMetadata.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER61AF.tmp.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER61AD.tmp.csv
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER61CD.tmp.txt

These files may be available here:
\\?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_EXCEL.EXE_1737e2a12f5fbb3bed7c81fbba095fa679a5d3_c49b9ece_5eaf833f

Analysis symbol: 
Rechecking for solution: 0
Report Id: 4e1c3ce2-ebfa-4e61-a25a-d7a6533723bf
Report Status: 268435456
Hashed bucket: 13f3fc836f7a199b98a7378fdfb5fe17
Cab Guid: 0

And, finally, the error log file gives me (I skipped the section on loaded modules as it is super long and not very relevant):

Version=1
EventType=BEX64
EventTime=132434014607698504
ReportType=2
Consent=1
UploadTime=132434014624693574
ReportStatus=268435456
ReportIdentifier=39dc1c98-66fa-4556-991a-affa18b308dc
IntegratorReportIdentifier=4e1c3ce2-ebfa-4e61-a25a-d7a6533723bf
Wow64Host=34404
NsAppName=EXCEL.EXE
OriginalFilename=Excel.exe
AppSessionGuid=00001760-0005-0035-707e-7db10880d601
TargetAppId=W:00065120d8adee3495bf7fe357e5d3abc45400000000!00008cc30240d8f0de6c191742bbaea1ea92968104e5!EXCEL.EXE
TargetAppVer=2020//08//06:23:34:52!35a6577!EXCEL.EXE
BootId=4294967295
TargetAsId=47467
UserImpactVector=808452912
IsFatal=1
EtwNonCollectReason=1
Response.BucketId=13f3fc836f7a199b98a7378fdfb5fe17
Response.BucketTable=5
Response.LegacyBucketId=1776449669094047255
Response.type=4
Sig[0].Name=Application Name
Sig[0].Value=EXCEL.EXE
Sig[1].Name=Application Version
Sig[1].Value=16.0.12527.20988
Sig[2].Name=Application Timestamp
Sig[2].Value=5f2c939c
Sig[3].Name=Fault Module Name
Sig[3].Value=ntdll.dll
Sig[4].Name=Fault Module Version
Sig[4].Value=10.0.17763.1192
Sig[5].Name=Fault Module Timestamp
Sig[5].Value=5854f5da
Sig[6].Name=Exception Offset
Sig[6].Value=00000000000a4740
Sig[7].Name=Exception Code
Sig[7].Value=c0000409
Sig[8].Name=Exception Data
Sig[8].Value=000000000000000a
DynamicSig[1].Name=OS Version
DynamicSig[1].Value=10.0.17763.2.0.0.256.4
DynamicSig[2].Name=Locale ID
DynamicSig[2].Value=1033
DynamicSig[22].Name=Additional Information 1
DynamicSig[22].Value=f00c
DynamicSig[23].Name=Additional Information 2
DynamicSig[23].Value=f00ceb8b937467ce9f02b76ff4186112
DynamicSig[24].Name=Additional Information 3
DynamicSig[24].Value=cb93
DynamicSig[25].Name=Additional Information 4
DynamicSig[25].Value=cb93789e6d3a8e463d5b73694e16b124
UI[2]=C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE
UI[3]=Microsoft Excel has stopped working
UI[4]=Windows can check online for a solution to the problem and try to restart the program.
UI[5]=Check online for a solution and restart the program
UI[6]=Check online for a solution later and close the program
UI[7]=Close the program

@adecler
Copy link
Member

adecler commented Sep 1, 2020

OK, the problem is caused by ExcelDNA intellisense server. So it is now down to trying to fix that.

@adecler
Copy link
Member

adecler commented Sep 5, 2020

Should finally be fixed in https://github.com/BHoM/Excel_Toolkit/pull/243

@JosefTaylor
Copy link
Contributor

It's happening again!

@JosefTaylor JosefTaylor reopened this Oct 27, 2020
@adecler
Copy link
Member

adecler commented May 18, 2021

@JosefTaylor, lets try to figure this one out once and for all.
Personally, Excel hasn't crashed on me despite my increased usage those last few months. But it might just be that my usage patterns are different than yours. Were you able to identify patterns when the crash might occur ?

I know from BHoM/BHoM_UI#390 that Excel is not too good at handling open threads when closing. Right now we don't have unmanaged thread left in BHoM_UI nor Excel_UI though.

If the crashes still happen in a manner that doesn't make sense to you, it might be good to have a chat.

@adecler
Copy link
Member

adecler commented May 18, 2021

@michaelhoehn , I actually managed to get the error after trying as many files as I could find.

Looking at my reliability history, I got 2 possible error codes:

  • c0020001
  • c000041d
# for hex 0xc0020001 / decimal -1073610751
  RPC_NT_INVALID_STRING_BINDING                                  ntstatus.h
# The string binding is invalid.
# for hex 0xc000041d / decimal -1073740771
  STATUS_FATAL_USER_CALLBACK_EXCEPTION                           ntstatus.h
# An unhandled exception was encountered during a user
# callback.

As I mentioned before, the second one is linked to an issue with threads no properly handled but not sure what the first one is related to.

Do you mind looking at your own reliability history (search in windows task bar to access it) and let me know what code you are getting ?

@pawelbaran
Copy link
Member Author

I just realised that recently Excel crashed again for me as well. In my case it was Exception code: 0xc0020001.

@adecler
Copy link
Member

adecler commented May 20, 2021

It appears that ExcelDNA IntellisenseServer was the cause of the issue. I got systematic crashes with it enabled and none once turned off. I'll do a PR soon to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity:critical No workaround exists. Essential to continue type:bug Error or unexpected behaviour
Projects
None yet
6 participants