Problem with "HowTo: Synchronize settings of an IE plug-in" C# sample

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

Problem with "HowTo: Synchronize settings of an IE plug-in" C# sample
 
Omer Mujahid




Posts: 9
Joined: 2010-06-28
Hello. I have encountered an exception when running your sample on shared memory. The plugin runs fine, maintaining settings across tabs and windows. However when I open a new instance(window) of IE, close the first window, and then try to open a new tab in the second window, the following error is thrown: ADX_IE_Shared_Memory_CS.IEBarModule error: the Browser extension has fired an exception.

The stack trace is as follows:


Detailed technical information follows:
---
(Inner Exception)
Date and Time: 6/29/2010 4:48:08 AM
Machine Name: YAHYA-8D1EBDDCD
IP Address: 192.168.216.130
Current User: YAHYA-8D1EBDDCD\Administrator

Application Domain: C:\Documents and Settings\Administrator\Desktop\ADXTest\Samples\adx-ie-shared-memory-cs\ADX_IE_Shared_Memory_CS\bin\Debug\
Assembly Codebase: file:///C:/WINDOWS/assembly/GAC_MSIL/AddinExpress.IE/6.1.368.0__4416dd98f0861965/AddinExpress.IE.dll
Assembly Full Name: AddinExpress.IE, Version=6.1.368.0, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version: 6.1.368.0
Assembly Build Date: 6/25/2010 6:08:32 PM

Exception Source: ADX_IE_Shared_Memory_CS
Exception Type: System.NullReferenceException
Exception Message: Object reference not set to an instance of an object.
Exception Target Site: RefreshOptions

---- Stack Trace ----
ADX_IE_Shared_Memory_CS.GlobalData.RefreshOptions(module As IEBarModule)
GlobalData.cs: line 0073, col 05, IL 0015 (0xF)
ADX_IE_Shared_Memory_CS.IEBarModule.IEBarModule_OnSendMessage(e As ADXIESendMessageEventArgs)
IEBarModule.cs: line 0284, col 08, IL 0032 (0x20)
AddinExpress.IE.ADXIEBarModule.DoOnSendMessage(msg As Message)
AddinExpress.IE.dll: N 0035 (0x23) IL



(Outer Exception)
Date and Time: 6/29/2010 4:48:08 AM
Machine Name: YAHYA-8D1EBDDCD
IP Address: 192.168.216.130
Current User: YAHYA-8D1EBDDCD\Administrator

Application Domain: C:\Documents and Settings\Administrator\Desktop\ADXTest\Samples\adx-ie-shared-memory-cs\ADX_IE_Shared_Memory_CS\bin\Debug\
Assembly Codebase: file:///C:/WINDOWS/assembly/GAC_MSIL/AddinExpress.IE/6.1.368.0__4416dd98f0861965/AddinExpress.IE.dll
Assembly Full Name: AddinExpress.IE, Version=6.1.368.0, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version: 6.1.368.0
Assembly Build Date: 6/25/2010 6:08:32 PM

Exception Source:
Exception Type: AddinExpress.IE.ADXIEExternalException
Exception Message: An error has occured in the code of the extension.
Exception Target Site: Object reference not set to an instance of an object.

---- Stack Trace ----


I am running the sample on Internet Explorer 8, Windows XP and Visual Studio 2010.
Posted 28 Jun, 2010 06:01:03 Top
Sergey Grischenko


Add-in Express team


Posts: 7202
Joined: 2004-07-05
Hi Omer.

Thanks for the bug report. I will check the example.
Posted 28 Jun, 2010 07:54:46 Top
Omer Mujahid




Posts: 9
Joined: 2010-06-28
So while testing some more, I have found that the following error occurs whenever you close the first tab you opened and then open a new tab, regardless of whether the new tab is in another window. Apparently the shared memory (optionPageData) is reset to null when you close the first tab.
Posted 30 Jun, 2010 06:19:52 Top
Sergey Grischenko


Add-in Express team


Posts: 7202
Joined: 2004-07-05
Hi Omer.

Thank you for the help. I will re-write the example.
Posted 30 Jun, 2010 06:32:30 Top
Sergey Grischenko


Add-in Express team


Posts: 7202
Joined: 2004-07-05
Hi Omer.

Sorry for the delay. I fixed the error. Please download the example again.
Posted 03 Aug, 2010 08:33:44 Top