Add-In Express 8 with Excel 2010: exception thrown

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

Add-In Express 8 with Excel 2010: exception thrown
 
Eric Haase




Posts: 5
Joined: 2015-11-16
Hi all,

I'm developing an add-in which runs perfectly on Excel 2013 and 2016, but when trying to initialize it using 2010, the following exception is thrown:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.

   at AddinExpress.Extensions.ExceptionManager.ProcessError(Exception e, Object sender, String whereHappened)

   at AddinExpress.XL.ADXExcelTaskPanesManager.DoAddinInitialize(Object sender, EventArgs ea)

   at AddinExpress.XL.AddinEvents.AddinInitialize(Object sender, EventArgs e)

   --- End of inner exception stack trace ---

   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)

   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

   at AddinExpress.MSO.ADXExtensionsSinkClass.DoEvent(String name, Object[] args)

   at AddinExpress.MSO.ADXAddinModule.AddinExpress.MSO.IDTExtensibility2.OnStartupComplete(Array& custom)


To me, it appears this is an error with Add-in Express rather than my own code.
This happens when selecting my COM add-in through Excel's menu and clicking OK. The ribbon does not show up or do anything apart from showing this error. Excel continues to run after this occurs.

Kindly let me know what I can do to fix this problem or whatever additional information you may need. Please keep in mind there are no problems whatsoever with newer versions of the Office suite. Also try to be specific when requesting to post code, as my AddinModule class alone contains thousands of lines of code.

Thanks in advance for your time,

Eric

edit: My add-in's target is .NET framework 4 Client Profile and this problem never occured with builds created with ADX 7.
What I've also noticed is that the first time I try to initialize the add-in in a session, nothing happens. Every time I attempt adding it after that, it throws this error.
Posted 16 Nov, 2015 09:34:23 Top
Andrei Smolin


Add-in Express team


Posts: 16317
Joined: 2006-05-11
Hello Eric,

Is the issue reproducible on a new add-in project (with no code) with an Excel Task Panes Manager put on the designer surface of the add-in module?

When this occur, could you show the log, save it to a text file and post the file here or send it to the support email address (please see readme.txt; make sure the email contains a link to this topic)?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 17 Nov, 2015 06:25:50 Top
Eric Haase




Posts: 5
Joined: 2015-11-16
Hello Andrei, Thanks for your reply.

I've completed the steps you suggested and the new project works as intended, also after adding a ribbon tab for testing.
The error for our existing add-in does however still occur as described in my initial post. Any ideas on how this issue can be resolved?

Breakpoints submitted at the first lines of both AddinModule's constructor and its AddinInitialize event handler for my project are never hit.

Regards,

Eric
Posted 01 Dec, 2015 08:51:25 Top
Andrei Smolin


Add-in Express team


Posts: 16317
Joined: 2006-05-11
Eric,

When this occur, could you show the log, save it to a text file and post the file here or send it to the support email address (please see readme.txt; make sure the email contains a link to this topic)?

AddinExpress.XL.Log.ShowMessages()

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 01 Dec, 2015 09:30:06 Top
Eric Haase




Posts: 5
Joined: 2015-11-16
This is what the log shows after attempting to activate the add-in for the first time:



System Info:
===========

AdditionalVersionIdentifier: 
Start Time: 1-12-2015 15:40:17
Standard: AddinExpress.XL.2005, Version=8.0.4330.2005, Culture=neutral, PublicKeyToken=xxxxx
Exceptions:
===========

Log:
===========

1-12-2015 15:40:17	1	ADXExcelTaskPanesCollectionItem.SetFormClassName
1-12-2015 15:40:17	1	ADXExcelTaskPanesCollectionItem.SetEnabled
1-12-2015 15:40:17	1	ADXExcelTaskPanesCollectionItem.SetFormClassName
1-12-2015 15:40:17	1	ADXExcelTaskPanesCollectionItem.SetEnabled
1-12-2015 15:40:17	1	ADXExcelTaskPanesCollectionItem.SetFormClassName
1-12-2015 15:40:17	1	ADXExcelTaskPanesCollectionItem.SetEnabled
1-12-2015 15:40:17	1	SetCallingAssembly
1-12-2015 15:40:17	1	SetOwner
1-12-2015 15:40:17	1	--ADXXOlExceptionManager
1-12-2015 15:40:17	1	InitializeClass


These are the log's contents after trying to activate the add-in for the second time, but before the messagebox with the exception is shown:

System Info:
===========

AdditionalVersionIdentifier: 
Start Time: 1-12-2015 15:33:45
Standard: AddinExpress.XL.2005, Version=8.0.4330.2005, Culture=neutral, PublicKeyToken=xxxxx
Registered message WM_ADX_DESTROY_EMBEDED_WINDOW=49892 
Registered message WM_ADX_READING_PANE_HIDE_FROM_SBCLS=49893 
Registered message WM_ADX_READING_PANE_SHOW=49894 
Registered message WM_ADX_READING_PANE_HIDE=49895 
Registered message WM_ADXDELPROC=49896 
Registered message WM_ADXSETOLDPROC=49897 
Registered message WM_ADXSETNEWPROC=49898 
Registered message WM_ADXGETCONTAINERFORM=49899 
Registered message WM_ADXADDFORM=49900 
Registered message WM_ADXDELETEFORM=49901 
Registered message WM_ADXSETCONTAINER=49902 
Registered message WM_ADXGETAPPWINDOWPOS=49903 
Registered message WM_ADXGETREGIONPARAM=49904 
Registered message WM_ADXGETREGIONSIZE=49905 
Registered message WM_ADXSETREGIONPARAM=49906 
Registered message WM_ADXUPDATEFORMPARAM=49907 
Registered message WM_ADXSETMAINPOS=49908 
Registered message WM_ADXCLOSEAPPWINDOW=49909 
Registered message WM_ADXSETLATESTPROC=49910 
Registered message WM_ADXEXIST=49911 
Registered message WM_ADXEXISTLAYOUT=49912 
Registered message WM_ADXEXISTSERVICEFORM=49913 
Registered message WM_ADXWMIGETCONTROL=49914 
Registered message WM_ADXWMIPOSCHANGE=49915 
Registered message WM_ADXWMISETPOS=49916 
Registered message WM_ADXCOMMAND=49917 
Registered message WM_ADXMANAGERCOMMAND=49918 
Registered message WM_ADXMOUSELEAVE=49919 
Registered message WM_MSO_BROADCASTCHANGE=49838 
Registered message WM_ADXSETACTIVATE=49921 
Registered message WM_ADXGETTYPESUBCLASS=49922 
Registered message WM_ADXCLOSEBUTTONCLICK=49923 
Registered message WM_ADXHIDEALLREGIONFORMS=49924 
Registered message WM_ADXGETPICTURE=49925 
Registered message WM_ADXSUPPORTMINIMIZE=49926 
Registered message WM_ADXCONTAINERSHOWFLOATING=49927 
Registered message WM_ADXCONTAINERHIDEFLOATING=49928 
Registered message WM_ADXSHOWFLOATING=49929 
Registered message WM_ADXHIDEFLOATING=49930 
Registered message WM_ADXSETFLOATINGPOS=49931 
Registered message WM_ADXGETDRAGLAYOUTPARAMS=49932 
Registered message WM_ADXSETDRAGFORM=49933 
Registered message WM_ADXSETDRAGITEMS=49934 
Registered message WM_ADXGETFORMDEFAULTSIZE=49935 
Registered message WM_ADXDRAGOVERMINIMIZED=49936 
Registered message WM_ADXREDESIGNSUPPORT=49937 
Registered message WM_ADXUPDATECLIPREGION=49938 
Registered message WM_ADXCTP_VISIBLECHANGED=49939 
Registered message WM_ADXMAYBEWORDVIEWWASCHANGED=49940 
Registered message WM_ADXSTARTTRANSACTION=49941 
Registered message WM_ADXENDTRANSACTION=49942 
Registered message WM_ADXSWAPCONTROLLER=49943 
Registered message WM_ADXCONTAINERREFRESH=49944 
Registered message WM_ADXGETCAPTION=49945 
Registered message WM_ADXHOSTVISIBLE=49946 
Excel version: Excel.Application.14
Start Time: 1-12-2015 15:34:02
Exceptions:
===========

Log:
===========

1-12-2015 15:34:02	1	ADXExcelTaskPanesCollectionItem.SetFormClassName
1-12-2015 15:34:02	1	ADXExcelTaskPanesCollectionItem.SetEnabled
1-12-2015 15:34:02	1	ADXExcelTaskPanesCollectionItem.SetFormClassName
1-12-2015 15:34:02	1	ADXExcelTaskPanesCollectionItem.SetEnabled
1-12-2015 15:34:02	1	ADXExcelTaskPanesCollectionItem.SetFormClassName
1-12-2015 15:34:02	1	ADXExcelTaskPanesCollectionItem.SetEnabled
1-12-2015 15:34:02	1	SetCallingAssembly
1-12-2015 15:34:02	1	SetOwner
1-12-2015 15:34:02	1	--*!* AdxAppWindowBehaviour.Singleton != null
1-12-2015 15:34:02	1	--*!* ExceptionManager.Instance != null
1-12-2015 15:34:02	1	InitializeClass
1-12-2015 15:34:02	1	SendMessageFindWindows
1-12-2015 15:33:59	1	SendMessageFindWindows
1-12-2015 15:33:53	1	DoAddinStartupComplete
1-12-2015 15:33:53	1	!PropertiesIsSetToShowUpForm
1-12-2015 15:33:53	1	DoShowForm
1-12-2015 15:33:53	1	--{-raise ADXBeforeTaskPaneShow
1-12-2015 15:33:53	1	------Right
1-12-2015 15:33:53	1	----ADXExcelTaskPane.AdxXlHide
1-12-2015 15:33:53	1	--{+raise ADXBeforeTaskPaneShow
1-12-2015 15:33:53	1	ADXExcelTaskPane.AdxXlShow
1-12-2015 15:33:53	1	DoShowForm
1-12-2015 15:33:53	1	--{-raise ADXBeforeTaskPaneShow
1-12-2015 15:33:53	1	------Right
1-12-2015 15:33:53	1	----ADXExcelTaskPane.AdxXlHide
1-12-2015 15:33:53	1	--{+raise ADXBeforeTaskPaneShow
1-12-2015 15:33:53	1	ADXExcelTaskPane.AdxXlShow
1-12-2015 15:33:53	1	DoShowForm
1-12-2015 15:33:53	1	ExcelContextArgs
1-12-2015 15:33:53	1	ExcelApplication
1-12-2015 15:33:53	1	RegistrySettings.LoadSettings
1-12-2015 15:33:53	1	SetExcelVersionFromRegistry
1-12-2015 15:33:53	1	ExcelApplication
1-12-2015 15:33:53	1	ExcelApplication
1-12-2015 15:33:53	1	ExcelApplication
1-12-2015 15:33:53	1	SetExcelVersion
1-12-2015 15:33:53	1	ExcelApplication
1-12-2015 15:33:53	1	DoAddinInitialize
1-12-2015 15:33:52	1	--fAppWindow.SetAddress(this.AdxHandle)
1-12-2015 15:33:52	1	--WindowsAPI.SetParent
1-12-2015 15:33:52	1	Initialize
1-12-2015 15:33:52	1	SetBoundsCore
1-12-2015 15:33:52	1	--SetBoundsCore
1-12-2015 15:33:52	1	ADXForm
1-12-2015 15:33:52	1	ADXExcelTaskPane.CreateTaskPaneInstance
1-12-2015 15:33:52	1	--fAppWindow.SetAddress(this.AdxHandle)
1-12-2015 15:33:52	1	--WindowsAPI.SetParent
1-12-2015 15:33:52	1	Initialize
1-12-2015 15:33:52	1	SetBoundsCore
1-12-2015 15:33:52	1	SetBoundsCore
1-12-2015 15:33:52	1	--SetBoundsCore
1-12-2015 15:33:52	1	ADXForm
1-12-2015 15:33:52	1	ADXExcelTaskPane.CreateTaskPaneInstance
1-12-2015 15:33:52	1	ADXExcelTaskPanesCollectionItem.SetEnabled
1-12-2015 15:33:52	1	ADXExcelTaskPanesCollectionItem.SetEnabled
1-12-2015 15:33:45	1	ADXExcelTaskPanesCollectionItem.SetFormClassName
1-12-2015 15:33:45	1	ADXExcelTaskPanesCollectionItem.SetEnabled
1-12-2015 15:33:45	1	ADXExcelTaskPanesCollectionItem.SetFormClassName
1-12-2015 15:33:45	1	ADXExcelTaskPanesCollectionItem.SetEnabled
1-12-2015 15:33:45	1	ADXExcelTaskPanesCollectionItem.SetFormClassName
1-12-2015 15:33:45	1	ADXExcelTaskPanesCollectionItem.SetEnabled
1-12-2015 15:33:45	1	SetCallingAssembly
1-12-2015 15:33:45	1	SetOwner
1-12-2015 15:33:45	1	--ADXXOlExceptionManager
1-12-2015 15:33:45	1	InitializeClass


Thanks,

Eric
Posted 01 Dec, 2015 09:48:11 Top
Eric Haase




Posts: 5
Joined: 2015-11-16
Somehow the issue appears to be resolved now, thank you for your support thus far. If the problem returns, I will open another issue. Thanks again!
Posted 01 Dec, 2015 10:23:17 Top
Andrei Smolin


Add-in Express team


Posts: 16317
Joined: 2006-05-11
No problem!

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 01 Dec, 2015 11:03:18 Top