Addin has fired an exception when turning add-ins on/off

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

Addin has fired an exception when turning add-ins on/off
Disabling one add-in and enabling the second add-in causes and exception. 
Robert Kaszuba




Posts: 5
Joined: 2015-01-14
Hello,

I've created two addins(MyAddin3 and MyAddin4) based on the ADX COM Add-in template in Visual Studio 2019(addin for outlook, word and excel 2016-2019).On both addins, I've added Outlook Form Manager and new AdxOutlok Form. Both forms are docked to the right in outlook explorer. No additional code was added from my site, just simple add-in with adx outlook form. After registration, both works great.

Now the scenario:
Disable one of them in Outlook -> File -> Options -> Add-in.
Then go back to Outlook -> File -> Options -> Add-in and disable(uncheck) the second one and enable(checke) the first one. Click OK and then an exception is thrown:

Detailed technical information follows:
---
Date and Time: 7/28/2020 11:51:20 AM
Machine Name: CHROME01
IP Address: fe80::dd2d:c3dd:fa1c:d3c6%4
Current User: CHROMECRM\rkaszuba

Application Domain: C:\Users\rkaszuba\source\repos\MyAddin3\MyAddin3\bin\Debug\
Assembly Codebase: file:///C:/WINDOWS/assembly/GAC_MSIL/AddinExpress.OL.2005/9.4.4644.0__e69a7e0f3592d2b8/AddinExpress.OL.2005.dll
Assembly Full Name: AddinExpress.OL.2005, Version=9.4.4644.0, Culture=neutral, PublicKeyToken=e69a7e0f3592d2b8
Assembly Version: 9.4.4644.0
Assembly Build Date: 6/29/2020 1:53:17 PM

Exception Source: AddinExpress.OL.2005
Exception Type: System.AccessViolationException
Exception Message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Exception Target Site: DoAddCTP

---- Stack Trace ----
AddinExpress.Extensions.ADXIntResource.DoAddCTP(CTPFactory As Object, CTPParentWindow As Object, pCTPParam As IntPtr)
AddinExpress.OL.2005.dll: N 0014 (0xE) IL
AddinExpress.Extensions.ADXCustomHostHook.AddCTP(CTPFactory As Object, CTPParentWindow As Object, pCTPParam As IntPtr)
AddinExpress.OL.2005.dll: N 0068 (0x44) IL
AddinExpress.OL.ADXOlFormsManager.ShowCTP(window As Object, param As ADXOlCTPParams)
AddinExpress.OL.2005.dll: N 0177 (0xB1) IL
AddinExpress.OL.ADXOlForm.ShowCTP(CTPHandle As IntPtr&)
AddinExpress.OL.2005.dll: N 0255 (0xFF) IL
AddinExpress.OL.ADXOlForm.AdxOlShow(appWindowProperty As AppWindowProperty, raiseEvents As Boolean)
AddinExpress.OL.2005.dll: N 0364 (0x16C) IL
AddinExpress.OL.ADXOlFormsManager.DoExplorerFormShow(Item As ADXOlFormsCollectionItem, ExplorerArgs As ADXOlExplorerArguments)
AddinExpress.OL.2005.dll: N 0463 (0x1CF) IL


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

AdditionalVersionIdentifier:
Start Time: 7/28/2020 11:51:20 AM
Premium: AddinExpress.OL.2005, Version=9.4.4644.0, Culture=neutral, PublicKeyToken=e69a7e0f3592d2b8
Outlook version: 16.0.0.12527
Registered message WM_ADX_TEST=49823
Registered message WM_ADXDELETEEMULATEWINDOW=49824
Registered message WM_ADX_WINDOW_ENGINE_HIDE=49825
Registered message WM_ADX_WORDEDITOR_HIDE=49826
Registered message WM_REMOVECONTROLLEDRESIZEWINDOW=49827
Registered message WM_NET_ShowChildWindowMessage=49828
Registered message WM_ADX_NeedRefreshFoldersMessage=49829
Registered message WM_ADX_CLOSE_SERVICE_FORM_FOR_NOT_WORD_INSPECTOR=49830
Registered message WM_ADX_CLOSE_SUPERGRID_SERVICE_FORM=49831
Registered message WM_ADX_CLOSE_READINGPANE_SERVICE_FORM=49832
Registered message WM_INFORMTOSHOWDOCKLAYOUT=49833
Registered message WM_ADX_ADDSEARCHENGINE=49834
Registered message WM_ADX_NAVIGATION_PANE_SHOW=49835
Registered message WM_ADX_NAVIGATION_PANE_HIDE=49836
Registered message WM_ADX_NAVIGATION_PANE_MINIMIZE=49837
Registered message WM_ADX_FOLDER_LIST_SHOW=49838
Registered message WM_ADX_FOLDER_LIST_HIDE=49839
Registered message WM_ADX_TODO_BAR_SHOW=49840
Registered message WM_ADX_TODO_BAR_HIDE=49841
Registered message WM_ADX_TODO_BAR_MINIMIZE=49842
Registered message WM_NET_MoveReadingPaneWindowMessage=49843
Registered message WM_ADX_GET_ACTUAL_INSPECTORS_COUNT=49844
Registered message WM_ADX_UPDATE_LATEST_KNOWN_INSPECTORS_COUNT=49845
Registered message WM_ADX_FIND_OUTSIDE_INSPECTOR=49846
Registered message WM_ADX_WORDINSPPREVIEW_ON=49847
Registered message WM_ADX_WORDINSPPREVIEW_OFF=49848
Registered message WM_ADX_OUTLOOK_BAR_SHOW=49849
Registered message WM_ADX_OUTLOOK_BAR_HIDE=49850
Registered message WM_ADX_DESTROY_EMBEDED_WINDOW=49851
Registered message WM_ADX_READING_PANE_HIDE_FROM_SBCLS=49852
Registered message WM_ADX_READING_PANE_SHOW=49853
Registered message WM_ADX_READING_PANE_HIDE=49854
Registered message WM_ADX_READING_PANE_MINIMIZE=49855
Registered message WM_ADX_APPWINDOW_SHOW=49856
Registered message WM_ADX_APPWINDOW_HIDE=49857
Registered message WM_ADX_APPWINDOW_MOVE=49858
Registered message WM_ADX_APPWINDOW_MINIMIZE=49859
Registered message WM_ADXDELPROC=49860
Registered message WM_ADXSETOLDPROC=49861
Registered message WM_ADXSETNEWPROC=49862
Registered message WM_ADXGETCONTAINERFORM=49863
Registered message WM_ADXADDFORM=49864
Registered message WM_ADXDELETEFORM=49865
Registered message WM_ADXSETCONTAINER=49866
Registered message WM_ADXGETAPPWINDOWPOS=49867
Registered message WM_ADXGETREGIONPARAM=49868
Registered message WM_ADXGETREGIONSIZE=49869
Registered message WM_ADXSETREGIONPARAM=49870
Registered message WM_ADXUPDATEFORMPARAM=49871
Registered message WM_ADXSETMAINPOS=49872
Registered message WM_ADXCLOSEAPPWINDOW=49873
Registered message WM_ADXSETLATESTPROC=49874
Registered message WM_ADXEXIST=49875
Registered message WM_ADXEXISTLAYOUT=49876
Registered message WM_ADXEXISTSERVICEFORM=49877
Registered message WM_ADXWMIGETCONTROL=49878
Registered message WM_ADXWMIPOSCHANGE=49879
Registered message WM_ADXWMISETPOS=49880
Registered message WM_ADXCOMMAND=49881
Registered message WM_ADXMANAGERCOMMAND=49882
Registered message WM_ADXMOUSELEAVE=49883
Registered message WM_MSO_BROADCASTCHANGE=49368
Registered message WM_ADXSETACTIVATE=49884
Registered message WM_ADXGETTYPESUBCLASS=49885
Registered message WM_ADXCLOSEBUTTONCLICK=49886
Registered message WM_ADXHIDEALLREGIONFORMS=49887
Registered message WM_ADXGETPICTURE=49888
Registered message WM_ADXSUPPORTMINIMIZE=49889
Registered message WM_ADXCONTAINERSHOWFLOATING=49890
Registered message WM_ADXCONTAINERHIDEFLOATING=49891
Registered message WM_ADXSHOWFLOATING=49892
Registered message WM_ADXHIDEFLOATING=49893
Registered message WM_ADXSETFLOATINGPOS=49894
Registered message WM_ADXGETDRAGLAYOUTPARAMS=49895
Registered message WM_ADXSETDRAGFORM=49896
Registered message WM_ADXSETDRAGITEMS=49897
Registered message WM_ADXGETFORMDEFAULTSIZE=49898
Registered message WM_ADXDRAGOVERMINIMIZED=49899
Registered message WM_ADXREDESIGNSUPPORT=49900
Registered message WM_ADXUPDATECLIPREGION=49901
Registered message WM_ADXCTP_VISIBLECHANGED=49902
Registered message WM_ADXMAYBEWORDVIEWWASCHANGED=49903
Registered message WM_ADXSTARTTRANSACTION=49904
Registered message WM_ADXENDTRANSACTION=49905
Registered message WM_ADXSWAPCONTROLLER=49906
Registered message WM_ADXCONTAINERREFRESH=49907
Registered message WM_ADXGETCAPTION=49908
Registered message WM_ADXGETCAPTION_EX=49909
Registered message WM_ADXHOSTVISIBLE=49910
Registered message WM_ADX_BACKSTAGE_SHOW=49911
SocialConnectorAddin state = Inactive
Exceptions:
===========

ADXOlFormsManager.DoExplorerFormShow: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Exception time: 7/28/2020 11:51:20 AM
at AddinExpress.Extensions.ADXIntResource.DoAddCTP(Object CTPFactory, Object CTPParentWindow, IntPtr pCTPParam)
at AddinExpress.Extensions.ADXCustomHostHook.AddCTP(Object CTPFactory, Object CTPParentWindow, IntPtr pCTPParam)
at AddinExpress.OL.ADXOlFormsManager.ShowCTP(Object window, ADXOlCTPParams param)
at AddinExpress.OL.ADXOlForm.ShowCTP(IntPtr& CTPHandle)
at AddinExpress.OL.ADXOlForm.AdxOlShow(AppWindowProperty appWindowProperty, Boolean raiseEvents)
at AddinExpress.OL.ADXOlFormsManager.DoExplorerFormShow(ADXOlFormsCollectionItem Item, ADXOlExplorerArguments ExplorerArgs)

AddinExpress.OL.ADXOlFormsManager error: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Exception time: 7/28/2020 11:51:20 AM

AddinExpress.OL.ADXOlFormsManager error: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Error occured in ADXOlFormsManager.DoExplorerFormShow . See 'Details' section to get more detailed information about the error.
Detailed technical information follows:
---
Date and Time: 7/28/2020 11:51:20 AM
Machine Name: CHROME01
IP Address: fe80::dd2d:c3dd:fa1c:d3c6%4
Current User: CHROMECRM\rkaszuba

Application Domain: C:\Users\rkaszuba\source\repos\MyAddin3\MyAddin3\bin\Debug\
Assembly Codebase: file:///C:/WINDOWS/assembly/GAC_MSIL/AddinExpress.OL.2005/9.4.4644.0__e69a7e0f3592d2b8/AddinExpress.OL.2005.dll
Assembly Full Name: AddinExpress.OL.2005, Version=9.4.4644.0, Culture=neutral, PublicKeyToken=e69a7e0f3592d2b8
Assembly Version: 9.4.4644.0
Assembly Build Date: 6/29/2020 1:53:17 PM

Exception Source: AddinExpress.OL.2005
Exception Type: System.AccessViolationException
Exception Message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Exception Target Site: DoAddCTP

---- Stack Trace ----
AddinExpress.Extensions.ADXIntResource.DoAddCTP(CTPFactory As Object, CTPParentWindow As Object, pCTPParam As IntPtr)
AddinExpress.OL.2005.dll: N 0014 (0xE) IL
AddinExpress.Extensions.ADXCustomHostHook.AddCTP(CTPFactory As Object, CTPParentWindow As Object, pCTPParam As IntPtr)
AddinExpress.OL.2005.dll: N 0068 (0x44) IL
AddinExpress.OL.ADXOlFormsManager.ShowCTP(window As Object, param As ADXOlCTPParams)
AddinExpress.OL.2005.dll: N 0177 (0xB1) IL
AddinExpress.OL.ADXOlForm.ShowCTP(CTPHandle As IntPtr&)
AddinExpress.OL.2005.dll: N 0255 (0xFF) IL
AddinExpress.OL.ADXOlForm.AdxOlShow(appWindowProperty As AppWindowProperty, raiseEvents As Boolean)
AddinExpress.OL.2005.dll: N 0364 (0x16C) IL
AddinExpress.OL.ADXOlFormsManager.DoExplorerFormShow(Item As ADXOlFormsCollectionItem, ExplorerArgs As ADXOlExplorerArguments)
AddinExpress.OL.2005.dll: N 0463 (0x1CF) IL




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

7/28/2020 11:51:20 AM 4 ------DoSuperGridShow
7/28/2020 11:51:20 AM 4 ------InitFolderProperties
7/28/2020 11:51:20 AM 4 ------ADXOlExplorerArguments 1 NewExplorer
7/28/2020 11:51:20 AM 4 ------Event OnCommonExplorerWindowShow 210394, 4
7/28/2020 11:51:20 AM 4 ----Event OnCommonReceiverWindowShow: 210394
7/28/2020 11:51:20 AM 4 ------DoReadingPaneShow
7/28/2020 11:51:20 AM 4 ------InitFolderProperties
7/28/2020 11:51:20 AM 4 ------ADXOlExplorerArguments 1 NewExplorer
7/28/2020 11:51:20 AM 4 ------Event OnCommonExplorerWindowShow 210394, 10
7/28/2020 11:51:20 AM 4 ----Event OnCommonReceiverWindowShow: 210394
7/28/2020 11:51:20 AM 4 ------DoNavigationPaneShow
7/28/2020 11:51:20 AM 4 ------InitFolderProperties
7/28/2020 11:51:20 AM 4 ------ADXOlExplorerArguments 1 NewExplorer
7/28/2020 11:51:20 AM 4 ------Event OnCommonExplorerWindowShow 210394, 3
7/28/2020 11:51:20 AM 4 ----Event OnCommonReceiverWindowShow: 210394
7/28/2020 11:51:20 AM 4 ----
7/28/2020 11:51:20 AM 4 ----{-Event IExplorerEvents_10.Deactivate
7/28/2020 11:51:20 AM 4 ----{+Event IExplorerEvents_10.Deactivate
7/28/2020 11:51:20 AM 4 ----
7/28/2020 11:51:20 AM 4 ---- |
7/28/2020 11:51:20 AM 4 ---- | AddinExpress.OL.ADXOlFormsManager error: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
7/28/2020 11:51:20 AM 4 ---- | Exception time: 7/28/2020 11:51:20 AM
7/28/2020 11:51:20 AM 4 ---- |
7/28/2020 11:51:20 AM 4 ----ADXExceptionManager.DoError
7/28/2020 11:51:20 AM 4 ----*!* ProcessError ADXOlFormsManager.DoExplorerFormShow
7/28/2020 11:51:20 AM 4 ---- |
7/28/2020 11:51:20 AM 4 ---- | ADXOlFormsManager.DoExplorerFormShow: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
7/28/2020 11:51:20 AM 4 ---- | Exception time: 7/28/2020 11:51:20 AM
7/28/2020 11:51:20 AM 4 ---- |
7/28/2020 11:51:20 AM 4 --ADXXOlExceptionManager.InternalProcessError
7/28/2020 11:51:20 AM 4 --------InitializeInResource
7/28/2020 11:51:20 AM 4 ------ADXOlHook.AddCTP
7/28/2020 11:51:20 AM 4 ----ADXOlFormsManager.ShowCTP
7/28/2020 11:51:20 AM 4 --ADXOlForm.ShowCTP
7/28/2020 11:51:20 AM 4 --*!* It is not WebViewPane
7/28/2020 11:51:20 AM 4 --SetHTMLDocumentTitle
7/28/2020 11:51:20 AM 4 --ADXOlForm.AdxOlShow
7/28/2020 11:51:20 AM 4 ----NewRefObj ExplorerArgs.ExplorerObj
7/28/2020 11:51:20 AM 4 ------DisposeFolderObjects
7/28/2020 11:51:20 AM 4 ----DisposeOutlookObjects
7/28/2020 11:51:20 AM 4 --InitializeForm
7/28/2020 11:51:20 AM 4 ----CreateAdxObjectInstances
7/28/2020 11:51:20 AM 4 --Initialize
7/28/2020 11:51:20 AM 4 --SetBoundsCore
7/28/2020 11:51:20 AM 4 --*!* It is not WebViewPane
7/28/2020 11:51:20 AM 4 --SetHTMLDocumentTitle
7/28/2020 11:51:20 AM 4 --SetBoundsCore
7/28/2020 11:51:20 AM 4 --*!* It is not WebViewPane
7/28/2020 11:51:20 AM 4 --SetHTMLDocumentTitle
7/28/2020 11:51:20 AM 4 --SetBoundsCore
7/28/2020 11:51:20 AM 4 ----SetBoundsCore
7/28/2020 11:51:20 AM 4 ----*!* It is not WebViewPane
7/28/2020 11:51:20 AM 4 ----SetHTMLDocumentTitle
7/28/2020 11:51:20 AM 4 --ADXForm
7/28/2020 11:51:20 AM 4 --GetForm
7/28/2020 11:51:20 AM 4 --SetExplorerAppWindowProperty
7/28/2020 11:51:20 AM 4 --IsContextSupport
7/28/2020 11:51:20 AM 4 --DoExplorerFormShow
7/28/2020 11:51:20 AM 4 --InitFolderProperties
7/28/2020 11:51:20 AM 4 --ADXOlExplorerArguments 1 Initialize
7/28/2020 11:51:20 AM 4 --OutlookUtils.EnumExplorers
7/28/2020 11:51:20 AM 4 --CreateICTPFactory
7/28/2020 11:51:20 AM 4 {+Event DoCTPFactoryAvailable
7/28/2020 11:51:20 AM 4
7/28/2020 11:51:20 AM 4
7/28/2020 11:51:20 AM 4 {-Event DoAddinStartupComplete
7/28/2020 11:51:20 AM 4 --CreateICTPFactory
7/28/2020 11:51:20 AM 4 {+Event DoAddinStartupComplete
7/28/2020 11:51:20 AM 4
7/28/2020 11:51:20 AM 4
7/28/2020 11:51:20 AM 4 {-Event DoAddinInitialize
7/28/2020 11:51:20 AM 4 --OlNavigationPaneEvents.ConnectTo
7/28/2020 11:51:20 AM 4 --OlExplorerEvents_BaseLogic.ConnectTo
7/28/2020 11:51:20 AM 4 --------CreateAdxObjectInstances
7/28/2020 11:51:20 AM 4 ------Initialize
7/28/2020 11:51:20 AM 4 ------ADXOlServiceForm.Initialize
7/28/2020 11:51:20 AM 4 ------ADXOlServiceForm
7/28/2020 11:51:20 AM 4 --------SetBoundsCore
7/28/2020 11:51:20 AM 4 ------ADXForm
7/28/2020 11:51:20 AM 4 ----ADXForm.CreateInstanceForClientLayout
7/28/2020 11:51:20 AM 4 ----Create FolderViewServiceForm
7/28/2020 11:51:20 AM 4 --------CreateAdxObjectInstances
7/28/2020 11:51:20 AM 4 ------Initialize
7/28/2020 11:51:20 AM 4 ------ADXOlServiceForm.Initialize
7/28/2020 11:51:20 AM 4 ------ADXOlServiceForm
7/28/2020 11:51:20 AM 4 --------SetBoundsCore
7/28/2020 11:51:20 AM 4 ------ADXForm
7/28/2020 11:51:20 AM 4 ----ADXForm.CreateInstanceForClientLayout
7/28/2020 11:51:20 AM 4 ----Create ReadingPaneServiceForm
7/28/2020 11:51:20 AM 4 --OlExplorerEvents_BaseLogic
7/28/2020 11:51:20 AM 4 --InitFolderProperties
7/28/2020 11:51:20 AM 4 --ADXOlExplorerArguments 1 Initialize
7/28/2020 11:51:20 AM 4 --OutlookUtils.EnumExplorers
7/28/2020 11:51:20 AM 4 ----OlInspectorsEvents_SinkHelper.ConnectTo
7/28/2020 11:51:20 AM 4 ----OlExplorersEvents_SinkHelper.ConnectTo
7/28/2020 11:51:20 AM 4 ----OlExplorersEvents_SinkHelper
7/28/2020 11:51:20 AM 4 ----OlApplicationEvents_BaseLogic.ConnectTo
7/28/2020 11:51:20 AM 4 ----OlApplicationEvents_BaseLogic
7/28/2020 11:51:20 AM 4 --ConnectOutlookEvents
7/28/2020 11:51:20 AM 4 --RegistrySettings.LoadSettings
7/28/2020 11:51:20 AM 4 {+Event DoAddinInitialize
7/28/2020 11:51:20 AM 4
7/28/2020 11:51:20 AM 4 ADXOlFormsCollectionItem.SetFormClassName
7/28/2020 11:51:20 AM 4 ADXOlFormsCollectionItem.SetExplorerLayout
7/28/2020 11:51:20 AM 4 {-DeleteNotVisibleForms
7/28/2020 11:51:20 AM 4 {+DeleteNotVisibleForms
7/28/2020 11:51:20 AM 4 ADXOlFormsCollectionItem.SetExplorerItemTypes
7/28/2020 11:51:20 AM 4 Set explorerAllowedDropRegions
7/28/2020 11:51:20 AM 4 {-ConnectAddinModuleEvents
7/28/2020 11:51:20 AM 4 --Before connection Point Advise
7/28/2020 11:51:20 AM 4 {+ConnectAddinModuleEvents
7/28/2020 11:51:20 AM 4 SetOwner
7/28/2020 11:51:20 AM 4 --ADXXOlExceptionManager
7/28/2020 11:51:20 AM 4 InitializeClass

Any idea what is wrong??

Additional information:
link to projects: https://chromecrm-my.sharepoint.com/:u:/g/personal/rkaszuba_advisor247_pl/EYuARutaz59IgRgL4BNPMoMBA-aKRdmSZHWTMzX9x0a8bw?e=1EKPee
- Addin Express 9.4.4644.0
- Microsoft Windows [Version 10.0.19041.388]
- Micrososft Outlook for Office 365 MSO (16.0.12527.20880)(64-bit)
Posted 28 Jul, 2020 05:20:38 Top
Andrei Smolin


Add-in Express team


Posts: 17306
Joined: 2006-05-11
Hello Robert,

Supposedly this is our bug. We've reproduced the issue and filed it down under #18436 in our issue-tracking DB. When I have news from our guys, I'll send you a note.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 03 Aug, 2020 04:55:26 Top