Issue

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

Issue
 
Mykhaylo Khodorev




Posts: 16
Joined: 2011-12-27
Hi.
I have following error reported:

System.ArgumentException: The value is outside the expected range.
bei AddinExpress.Outlook.IOutlookSecurityManager2.Connect(Object vTarget)
bei AddinExpress.Outlook.SecurityManager.ConnectTo(Object outlookApp)

The error occurs occasionally and disappears after application restart.
Posted 29 Mar, 2012 16:04:55 Top
Andrei Smolin


Add-in Express team


Posts: 14137
Joined: 2006-05-11
Hi Mykhaylo,

I suggest that you check if you pass an Outlook.Application object to the ConnectTo method. For instance, you can check if OutlookApp.Version DOES NOT produce exception; if there's no exception, then it is safe to pass it to the ConnectTo method.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 30 Mar, 2012 03:48:53 Top
Mykhaylo Khodorev




Posts: 16
Joined: 2011-12-27
I have ensured each access to Outlook.Application causes verifying whether instance is "alive". Since that no problem was reported however previously the problem was reported as stable. So I'll wait couple weeks and then let you know whether problem is solved.
Thank you.
Posted 02 Apr, 2012 11:34:28 Top
Andrei Smolin


Add-in Express team


Posts: 14137
Joined: 2006-05-11
Please keep me informed.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 03 Apr, 2012 01:21:25 Top
Mykhaylo Khodorev




Posts: 16
Joined: 2011-12-27
The issue reoccured several times. Now it's ensured the Outlook.Application object is alive.
Strange thing is chronology:
[13.04.2012 17:02:43 | Debug] Error:
at
...
bei R.GoogleOutlookSync.OutlookUtilities.GetItemPropertyValue(Object item, String propertyName)
bei R.GoogleOutlookSync.OutlookUtilities.GetItemID(Object item)
bei R.GoogleOutlookSync.ItemTypeSynchronizer.CompareIDs(AtomEntry googleItem, Object outlookItem)
bei R.GoogleOutlookSync.CalendarSynchronizer.Compare(AtomEntre googleItem, Object outlookItem)
bei R.GoogleOutlookSync.ItemTypeSynchronizer.CombineItems()
bei R.GoogleOutlookSync.ItemTypeSynchronizer.Sync()
bei R.GoogleOutlookSync.Syncronizer.Sync()
--- Inner exception ---
The RPC Server is not available. (Ausnahme von HRESULT: 0x800706BA)
at
[13.04.2012 17:02:43 | Error] Beim Aufruf einer COM-Komponente wurde ein HRESULT E_FAIL-Fehler zurückgegeben.
[13.04.2012 17:02:43 | Error] Sync failed.
[13.04.2012 17:02:43 | Debug] Beim Aufruf einer COM-Komponente wurde ein HRESULT E_FAIL-Fehler zurückgegeben.
at
bei AddinExpress.Outlook.IOutlookSecurityManager.Check(Int32 apiType)
bei AddinExpress.Outlook.SecurityManager.set_DisableOOMWarnings(Boolean value)
bei R.GoogleOutlookSync.Syncronizer.Sync()
bei R.GoogleOutlookSync.SettingsForm.Sync_ThreadStarter()

So for me it appears the DisableOOMWarnings property was attempted to be set somewhere during executing OutlookUtilities.GetItemPropertyValue(). But indeed it's set only once much earlier.
Posted 13 Apr, 2012 15:03:11 Top
Andrei Smolin


Add-in Express team


Posts: 14137
Joined: 2006-05-11
Hi Mykhaylo,

"The RPC Server is not available." means Outlook is turned off or the Outlook item is moved/deleted.

Mykhaylo Khodorev writes:
So for me it appears the DisableOOMWarnings property was attempted to be set somewhere during executing OutlookUtilities.GetItemPropertyValue(). But indeed it's set only once much earlier.


I don't think so. But indeed, the situation looks strange. In Exception Class, they wrote:
When a causal relationship exists between two or more exceptions, the InnerException property maintains this information. The outer exception is thrown in response to this inner exception.


Is the outer exception thrown by your code as a reaction to the innre exception?

Is your code executed on a background thread?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 16 Apr, 2012 06:36:15 Top
Mykhaylo Khodorev




Posts: 16
Joined: 2011-12-27
That was my mistake. set_DisableOOMWarnings is called twice - disable before start and enable back on finish.
I can't confirm Outlook was or was not running during error happened. But I had same error ("The RPC Server is not available.") when Outlook was running. However in this case retry helped.
So I'll try that and let you know result. Thank you
Posted 17 Apr, 2012 00:34:46 Top
Andrei Smolin


Add-in Express team


Posts: 14137
Joined: 2006-05-11
Yes, please keep me informed about your results.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 17 Apr, 2012 00:44:27 Top