Getting unhanded exception on adx task pane manager

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

Getting unhanded exception on adx task pane manager
 
Subscribe
carmelo Quartarone




Posts: 4
Joined: 2018-10-16
The same exception for some of our customers who use Microsoft Excel 2016
(16.0.8201.2193) 32-bit

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

AdditionalVersionIdentifier:
Start Time: 1/10/2019 9:28:35 AM
Premium: AddinExpress.XL.2005, Version=9.2.4635.0, Culture=neutral, PublicKeyToken=e69a7e0f3592d2b8
Registered message WM_ADX_DESTROY_EMBEDED_WINDOW=50129
Registered message WM_ADX_READING_PANE_HIDE_FROM_SBCLS=50130
Registered message WM_ADX_READING_PANE_SHOW=50131
Registered message WM_ADX_READING_PANE_HIDE=50132
Registered message WM_ADX_READING_PANE_MINIMIZE=50133
Registered message WM_ADXDELPROC=50134
Registered message WM_ADXSETOLDPROC=50135
Registered message WM_ADXSETNEWPROC=50136
Registered message WM_ADXGETCONTAINERFORM=50137
Registered message WM_ADXADDFORM=50138
Registered message WM_ADXDELETEFORM=50139
Registered message WM_ADXSETCONTAINER=50140
Registered message WM_ADXGETAPPWINDOWPOS=50141
Registered message WM_ADXGETREGIONPARAM=50142
Registered message WM_ADXGETREGIONSIZE=50143
Registered message WM_ADXSETREGIONPARAM=50144
Registered message WM_ADXUPDATEFORMPARAM=50145
Registered message WM_ADXSETMAINPOS=50146
Registered message WM_ADXCLOSEAPPWINDOW=50147
Registered message WM_ADXSETLATESTPROC=50148
Registered message WM_ADXEXIST=50149
Registered message WM_ADXEXISTLAYOUT=50150
Registered message WM_ADXEXISTSERVICEFORM=50151
Registered message WM_ADXWMIGETCONTROL=50152
Registered message WM_ADXWMIPOSCHANGE=50153
Registered message WM_ADXWMISETPOS=50154
Registered message WM_ADXCOMMAND=50155
Registered message WM_ADXMANAGERCOMMAND=50156
Registered message WM_ADXMOUSELEAVE=50157
Registered message WM_MSO_BROADCASTCHANGE=49417
Registered message WM_ADXSETACTIVATE=50158
Registered message WM_ADXGETTYPESUBCLASS=50159
Registered message WM_ADXCLOSEBUTTONCLICK=50160
Registered message WM_ADXHIDEALLREGIONFORMS=50161
Registered message WM_ADXGETPICTURE=50162
Registered message WM_ADXSUPPORTMINIMIZE=50163
Registered message WM_ADXCONTAINERSHOWFLOATING=50164
Registered message WM_ADXCONTAINERHIDEFLOATING=50165
Registered message WM_ADXSHOWFLOATING=50166
Registered message WM_ADXHIDEFLOATING=50167
Registered message WM_ADXSETFLOATINGPOS=50168
Registered message WM_ADXGETDRAGLAYOUTPARAMS=50169
Registered message WM_ADXSETDRAGFORM=50170
Registered message WM_ADXSETDRAGITEMS=50171
Registered message WM_ADXGETFORMDEFAULTSIZE=50172
Registered message WM_ADXDRAGOVERMINIMIZED=50173
Registered message WM_ADXREDESIGNSUPPORT=50174
Registered message WM_ADXUPDATECLIPREGION=50175
Registered message WM_ADXCTP_VISIBLECHANGED=50058
Registered message WM_ADXMAYBEWORDVIEWWASCHANGED=50054
Registered message WM_ADXSTARTTRANSACTION=50055
Registered message WM_ADXENDTRANSACTION=50037
Registered message WM_ADXSWAPCONTROLLER=50053
Registered message WM_ADXCONTAINERREFRESH=50052
Registered message WM_ADXGETCAPTION=50045
Registered message WM_ADXGETCAPTION_EX=50048
Registered message WM_ADXHOSTVISIBLE=50041
Registered message WM_ADX_BACKSTAGE_SHOW=50032
Excel version: 16.0
Exceptions:
===========

ADXExcelTaskPanesManager.FinalizeClass: Exception from HRESULT: 0x800A03EC
Exception time: 1/10/2019 9:49:40 AM
at System.Runtime.InteropServices.ComTypes.IConnectionPoint.Unadvise(Int32 dwCookie)
at AddinExpress.XL.ConnectionPointConnector.Disconnect()
at AddinExpress.XL.ConnectionPointConnector.Dispose()
at AddinExpress.XL.ADXExcelTaskPanesManager.FinalizeClass()

AddinExpress.XL.ADXExcelTaskPanesManager error: Exception from HRESULT: 0x800A03EC
Exception time: 1/10/2019 9:49:40 AM

AddinExpress.XL.ADXExcelTaskPanesManager error: Exception from HRESULT: 0x800A03EC
Error occured in ADXExcelTaskPanesManager.FinalizeClass . See 'Details' section to get more detailed information about the error.
Detailed technical information follows:
---
Date and Time: 1/10/2019 9:49:40 AM
Machine Name: xxxxxxx
IP Address: xxxxxxx
Current User: xxxxxxx

Application Domain: C:\Program Files (x86)\SkyLab Italia Srl\Andromeda Add-In\
Assembly Codebase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
Assembly Full Name: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Assembly Version: 4.0.0.0
Assembly Build Date: 9/10/2018 9:29:09 PM

Exception Source: mscorlib
Exception Type: System.Runtime.InteropServices.COMException
Exception Message: Exception from HRESULT: 0x800A03EC
Exception Target Site: Unadvise

---- Stack Trace ----
System.Runtime.InteropServices.ComTypes.IConnectionPoint.Unadvise(dwCookie As Int32)
AddinExpress.XL.2005.DLL: N 00000 (0x0) JIT
AddinExpress.XL.ConnectionPointConnector.Disconnect()
AddinExpress.XL.2005.DLL: N 0015 (0xF) IL
AddinExpress.XL.ConnectionPointConnector.Dispose()
AddinExpress.XL.2005.DLL: N 0001 (0x1) IL
AddinExpress.XL.ADXExcelTaskPanesManager.FinalizeClass()
AddinExpress.XL.2005.DLL: N 0191 (0xBF) IL




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

1/10/2019 9:49:40 AM 1 -- |
1/10/2019 9:49:40 AM 1 -- | AddinExpress.XL.ADXExcelTaskPanesManager error: Exception from HRESULT: 0x800A03EC
1/10/2019 9:49:40 AM 1 -- | Exception time: 1/10/2019 9:49:40 AM
1/10/2019 9:49:40 AM 1 -- |
1/10/2019 9:49:40 AM 1 --ADXExceptionManager.DoError
1/10/2019 9:49:40 AM 1 --*!* ProcessError ADXExcelTaskPanesManager.FinalizeClass
1/10/2019 9:49:40 AM 1 -- |
1/10/2019 9:49:40 AM 1 -- | ADXExcelTaskPanesManager.FinalizeClass: Exception from HRESULT: 0x800A03EC
1/10/2019 9:49:40 AM 1 -- | Exception time: 1/10/2019 9:49:40 AM
1/10/2019 9:49:40 AM 1 -- |
1/10/2019 9:49:40 AM 1 ADXXXlExceptionManager.InternalProcessError
1/10/2019 9:49:40 AM 1 excelApplicationConnector.Dispose();
1/10/2019 9:49:40 AM 1 DoAddinBeginShutdown
1/10/2019 9:49:37 AM 1 SendMessageFindWindows
1/10/2019 9:49:27 AM 1 SendMessageFindWindows
1/10/2019 9:47:00 AM 1 !PropertiesIsSetToShowUpForm
1/10/2019 9:47:00 AM 1 DoShowForm
1/10/2019 9:47:00 AM 1 !PropertiesIsSetToShowUpForm
1/10/2019 9:47:00 AM 1 DoShowForm
1/10/2019 9:47:00 AM 1 !PropertiesIsSetToShowUpForm
1/10/2019 9:47:00 AM 1 DoShowForm
1/10/2019 9:47:00 AM 1 ExcelContextArgs
1/10/2019 9:46:55 AM 1 SendMessageFindWindows
1/10/2019 9:46:46 AM 1 SendMessageFindWindows
1/10/2019 9:44:58 AM 1 SendMessageFindWindows
1/10/2019 9:44:50 AM 1 !PropertiesIsSetToShowUpForm
1/10/2019 9:44:50 AM 1 DoShowForm
1/10/2019 9:44:50 AM 1 !PropertiesIsSetToShowUpForm
1/10/2019 9:44:50 AM 1 DoShowForm
1/10/2019 9:44:50 AM 1 !PropertiesIsSetToShowUpForm
1/10/2019 9:44:50 AM 1 DoShowForm
1/10/2019 9:44:50 AM 1 ExcelContextArgs
1/10/2019 9:44:46 AM 1 SendMessageFindWindows
1/10/2019 9:41:18 AM 1 SendMessageFindWindows
1/10/2019 9:37:07 AM 1 SendMessageFindWindows
1/10/2019 9:32:31 AM 1 SendMessageFindWindows
1/10/2019 9:32:20 AM 1 SendMessageFindWindows
1/10/2019 9:29:23 AM 1 !PropertiesIsSetToShowUpForm
1/10/2019 9:29:23 AM 1 DoShowForm
1/10/2019 9:29:23 AM 1 !PropertiesIsSetToShowUpForm
1/10/2019 9:29:23 AM 1 DoShowForm
1/10/2019 9:29:23 AM 1 !PropertiesIsSetToShowUpForm
1/10/2019 9:29:23 AM 1 DoShowForm
1/10/2019 9:29:23 AM 1 ExcelContextArgs
1/10/2019 9:29:19 AM 1 SendMessageFindWindows
1/10/2019 9:28:39 AM 1 !PropertiesIsSetToShowUpForm
1/10/2019 9:28:39 AM 1 DoShowForm
1/10/2019 9:28:39 AM 1 !PropertiesIsSetToShowUpForm
1/10/2019 9:28:39 AM 1 DoShowForm
1/10/2019 9:28:39 AM 1 !PropertiesIsSetToShowUpForm
1/10/2019 9:28:39 AM 1 DoShowForm
1/10/2019 9:28:39 AM 1 ExcelContextArgs
1/10/2019 9:28:38 AM 1 !PropertiesIsSetToShowUpForm
1/10/2019 9:28:38 AM 1 DoShowForm
1/10/2019 9:28:38 AM 1 !PropertiesIsSetToShowUpForm
1/10/2019 9:28:38 AM 1 DoShowForm
1/10/2019 9:28:38 AM 1 !PropertiesIsSetToShowUpForm
1/10/2019 9:28:38 AM 1 DoShowForm
1/10/2019 9:28:38 AM 1 ExcelContextArgs
1/10/2019 9:28:35 AM 1 DoAddinStartupComplete
1/10/2019 9:28:35 AM 1 ExcelContextArgs
1/10/2019 9:28:35 AM 1 ExcelContextArgs
1/10/2019 9:28:35 AM 1 RegistrySettings.LoadSettings
1/10/2019 9:28:35 AM 1 SetExcelVersion
1/10/2019 9:28:35 AM 1 DoAddinInitialize
1/10/2019 9:28:35 AM 1 ADXExcelTaskPanesCollectionItem.SetSplitter
1/10/2019 9:28:35 AM 1 ADXExcelTaskPanesCollectionItem.SetSplitter
1/10/2019 9:28:35 AM 1 ADXExcelTaskPanesCollectionItem.SetSplitter
1/10/2019 9:28:35 AM 1 SetOwner
1/10/2019 9:28:35 AM 1 --ADXXOlExceptionManager
1/10/2019 9:28:35 AM 1 InitializeClass
Posted 10 Jan, 2019 11:38:50 Top
Andrei Smolin


Add-in Express team


Posts: 15595
Joined: 2006-05-11
Hello Carmelo,

We see that the integrity of the Add-in Express infrastructure is broken. Maybe, you destroy the manager somehow or connect/disconnect to these events yourself? Please provide a project demonstrating the issue.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 11 Jan, 2019 06:03:08 Top
carmelo Quartarone




Posts: 4
Joined: 2018-10-16
Hello Andrei,
some of our clients continues to claim this kind of issue randomly, it's quite hard to replicate.
The issue comes up when they try to close Excel application and in many cases the add in does not perform any action if the file excel is not identified by a Custom Property (Advanced Property).
Plus the ADXExcelTaskPanesManageres instantiated and managed only on
#region Component Designer generated code
.
I hope this kind of COMException can be handled with a possible fix of the library.

Regards from Italy
Carmelo Quartarone
Posted 18 Jan, 2019 04:40:31 Top
Andrei Smolin


Add-in Express team


Posts: 15595
Joined: 2006-05-11
Hello Carmelo,

carmelo Quartarone writes:
it's quite hard to replicate


We are unable to reproduce it.

carmelo Quartarone writes:
The issue comes up when they try to close Excel application and in many cases the add in does not perform any action if the file excel is not identified by a Custom Property (Advanced Property).


Sorry? Could you please reword this or put this in Italian (I'll use Google Translate)?

carmelo Quartarone writes:
I hope this kind of COMException can be handled with a possible fix of the library.


We suppose you call something in the Excel object model that causes this effect (with no exceptions). You can try to comment out blocks of your code to locate the issue.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 18 Jan, 2019 08:50:37 Top
Amit B




Posts: 29
Joined: 2013-09-13
Hi,

The solution you provided i.e. "dont create task pane instances as they are created by the forms manager itself" is working fine for dummy sample addidn code which we shared with you. But not working for our actual project addin code.

Our project requires to create task pane instance and then we are casting it to custom excel task pance class so that we can fetch data and fill the control in the task pane and show it. The ADX library has provided the method ADXExcelTaskPanesCollectionItem.CreateTaskPaneInstance() and we have used it to create task pane and loading data and showing it.

Code snippet:

var mytpitem = new ADXExcelTaskPanesCollectionItem(this.components)
{
AlwaysShowHeader = true,
CloseButton = false,
Position = ADXExcelTaskPanePosition.Right,
RegionBorder = ADXRegionBorderStyle.None,
RestoreFromMinimizedState = true,
TaskPaneClassName = "ApparityPrefect.ADXExcelApparityTaskPane",
UseOfficeThemeForBackground = true,
DefaultRegionState = ADXRegionState.Normal
};



//add it to the collection
this.adxExcelApparityTaskPaneManager.Items.Add(mytpitem);

//This is the actual taskpane instance that we work with
ADXExcelTaskPane managedWorkbooktpinstance = mytpitem.CreateTaskPaneInstance();


var adxApparityTaskPane = managedWorkbooktpinstance as ADXExcelApparityTaskPane;

adxApparityTaskPane.FetchData();

managedWorkbooktpinstance.FormClosed += ManagedWorkbooktaskpaneInstance_Closed;

managedWorkbooktpinstance.Show();


Is there any other way to achieve the same functionality? How can I achieve the same functionality without explicitly creating task pane instance. And also if the library has provided the method CreateTaskPaneInstance(), then why it is not recommended?
Posted 25 Jan, 2019 00:30:56 Top
Andrei Smolin


Add-in Express team


Posts: 15595
Joined: 2006-05-11
Hello Amit,

I'm sorry for the misunderstanding; it was caused by what I said above:

Comment out these code lines. You shouldn't create task pane instances as they are created by the forms manager itself.


What I should have said is this:

Comment out these code lines. Creating task pane instances from the constructor of the add-in module doesn't make sense.


That code should work if you call it from the Click event of a Ribbon button or from an event of the add-on module.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 25 Jan, 2019 04:46:03 Top
Amit B




Posts: 29
Joined: 2013-09-13
Hello,

In the very first post of mine, I was encountering an exception for which I shared you the stack trace (exception logs) and the sample dummy code. For this you asked us to not create task pane instances from the constructor of the addin module and yes it make sense also.

But in our actual project code, we are creating task pane instances using API CreateTaskPaneInstance(). Please refer to my last post and in reply to that you told us that this is the right way of creating task pane instances (your comment was : That code should work if you call it from the Click event of a Ribbon button or from an event of the add-on module. ).

It means, as per your last reply comments my actual project code implementation is correct. However with this implementation also am getting the same exception which I shared in my first post in this thread. Please note that this issue is intermittent and coming for our one customer.

Can you please tell what could be the reasons for this random issue.
Posted 28 Jan, 2019 23:52:37 Top
Andrei Smolin


Add-in Express team


Posts: 15595
Joined: 2006-05-11
Hello Amit,

Amit B writes:
It means, as per your last reply comments my actual project code implementation is correct.


Could you please check whether your implementation works if called from the Click event of a test Ribbon button?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 30 Jan, 2019 09:25:36 Top