Continuous System.AccessViolationExceptions after upgrade

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

Continuous System.AccessViolationExceptions after upgrade
 
Benjamin Leppard




Posts: 1
Joined: 2017-12-04
After I upgraded to version 9.0.4610 all XLL add-ins cause continual System.AccessViolationExceptions whenever the add-in is loaded in Excel using the VS debugger.

This happens even with a blank XLL project created using the project creating wizard.

The exception I am getting is:
System.AccessViolationException
  HResult=0x80004003
  Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
  Source=<Cannot evaluate the exception source>
  StackTrace:
<Cannot evaluate the exception stack trace>


When I tell Visual Studio to continue after the exception I get two different repeating call stacks the first is:
 	[Managed to Native Transition]	
>	AddinExpress.MSO.2005.dll!AddinExpress.MSO.ADXXLLModule.AllocUnmanagedMemory(ulong cBytes)	Unknown
 	AddinExpress.MSO.2005.dll!AddinExpress.MSO.XLOPER.create_XLOPER(System.IntPtr pNative, AddinExpress.MSO.ADXExcelType type)	Unknown
 	AddinExpress.MSO.2005.dll!AddinExpress.MSO.ExcelAPI.TryExcel12(int xlFunction, out object result, bool freeOperationMemory, object[] parameters)	Unknown
 	AddinExpress.MSO.2005.dll!AddinExpress.MSO.ExcelAPI.Excel(int xlFunction, bool freeOperationMemory, object[] parameters)	Unknown
 	AddinExpress.MSO.2005.dll!AddinExpress.MSO.ExcelHost.WindowHandle.get()	Unknown
 	AddinExpress.MSO.2005.dll!AddinExpress.MSO.ExcelHost.GetApplicationFromWindow()	Unknown
 	AddinExpress.MSO.2005.dll!AddinExpress.MSO.ADXXLLModule.HostTimer_Tick(object sender, System.EventArgs e)	Unknown
 	System.Windows.Forms.dll!System.Windows.Forms.Timer.OnTick(System.EventArgs e) Line 241	C#
 	System.Windows.Forms.dll!System.Windows.Forms.Timer.TimerNativeWindow.WndProc(ref System.Windows.Forms.Message m) Line 469	C#
 	System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam) Line 780	C#
 	[AppDomain Transition]	


And the second is:
 	[Managed to Native Transition]	
>	AddinExpress.MSO.2005.dll!AddinExpress.MSO.ADXXLLModule.FreeUnmanagedMemory()	Unknown
 	AddinExpress.MSO.2005.dll!AddinExpress.MSO.ExcelAPI.TryExcel12(int xlFunction, out object result, bool freeOperationMemory, object[] parameters)	Unknown
 	AddinExpress.MSO.2005.dll!AddinExpress.MSO.ExcelAPI.Excel(int xlFunction, bool freeOperationMemory, object[] parameters)	Unknown
 	AddinExpress.MSO.2005.dll!AddinExpress.MSO.ExcelHost.WindowHandle.get()	Unknown
 	AddinExpress.MSO.2005.dll!AddinExpress.MSO.ExcelHost.GetApplicationFromWindow()	Unknown
 	AddinExpress.MSO.2005.dll!AddinExpress.MSO.ADXXLLModule.HostTimer_Tick(object sender, System.EventArgs e)	Unknown
 	System.Windows.Forms.dll!System.Windows.Forms.Timer.OnTick(System.EventArgs e) Line 241	C#
 	System.Windows.Forms.dll!System.Windows.Forms.Timer.TimerNativeWindow.WndProc(ref System.Windows.Forms.Message m) Line 469	C#
 	System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam) Line 780	C#
 	[AppDomain Transition]	
Posted 10 May, 2018 14:58:05 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Benjamin,

Please download this Loader: http://temp.add-in-express.com/support/test/Loader4612.90.zip. Before you unzip the file, right-click it and choose Properties on the context menu; then select Unlock on the General tab of the Properties window.

Unzip the files, copy them to the loader folder of your add-in, rename them to replace the existing loader files, and re-register your add-in project.

Does it work for you?

If yes, and if you need new projects to use this loader, replace the loader files in {Add-in Express}\Redistributables.


Andrei Smolin
Add-in Express Team Leader
Posted 11 May, 2018 03:28:19 Top