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 crash with AccessViolation on shutdown with IntelliSense and no Workbook #716

Open
govert opened this issue Sep 1, 2024 · 3 comments

Comments

@govert
Copy link
Member

govert commented Sep 1, 2024

From https://groups.google.com/g/exceldna/c/QoIb9BkqvJI

While I was going quite successful, last night I came across a strange situation for the first time to find out that if I debug the Excel Dna AddIn, enable the same at the launch of Excel Application, but close the Excel right away without carrying on or opening a book, I face the error:

System.AccessViolationException
HResult=0x80004003
Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source=
StackTrace:

Interestingly it is only if I have in my project file the following package installed:

With simple AddIn file:

Public Class ExcelDnaAddIn
Implements IExcelAddIn

Public Sub AutoOpen() Implements IExcelAddIn.AutoOpen
    IntelliSenseServer.Install()
End Sub

Public Sub AutoClose() Implements IExcelAddIn.AutoClose
    IntelliSenseServer.Uninstall()
End Sub

End Class

Any reason and way to resolve the said problem?

@jacobneroth
Copy link

Hi govert,
I have similar problems as well.
AppName EXCEL.EXE
AppVersion 16.0.17328.20588
AppTimeStamp 66de8549
ModuleName KERNELBASE.dll
ModuleVersion 10.0.22621.3296
ModuleTimeStamp 71c4f65c
ExceptionCode e0434352
FaultingOffset 00149542
ProcessId 0x1674
ProcessCreationTime 0x1db1b298ee37e3a
AppPath C:\Program Files (x86)\Microsoft Office\root\Office16\EXCEL.EXE
ModulePath C:\WINDOWS\System32\KERNELBASE.dll
IntegratorReportId cd8dba3d-a514-4b9a-af37-f85553a25e50
PackageFullName
PackageRelativeAppId

What fixed it was removing the intellsense install and uninstall.
What is weird is, it only happens for certain PC's at work.

  • We tried .net 8, .net472
    -These are the packages we use



@govert
Copy link
Member Author

govert commented Oct 14, 2024

Can you confirm this with the latest Excel-DNA packages version 1.9.0-alpha2 ?
We did try to mitigate some related problems recently - maybe this is already addressed.

Are you seeing this without a debugger attached?
I have been seeing crashes when the debugger is attached, but not exactly as you describe.

@jacobneroth
Copy link

jacobneroth commented Oct 21, 2024

let me try with the 1.9.0-alpha2, sorry was away for a while. just got back. We are seeing it without the debugger attached. we are seeing it when people open the excel sheet. was able to mitigate the problem by creating a feature flag to not run the Intellisense Install or Uninstall. WHat is weird is, it only has a problem in certain pcs even though the Office Build and the Windows build is the same. a sample size of 3 has this problem, while 18 others didnt have any issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants