Add-in crashes on Outlook start up - only for one specific user

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

Add-in crashes on Outlook start up - only for one specific user
 
tadams




Posts: 78
Joined: 2015-12-01
Hi,

One client has reported to us that a particular user experiences Outlook crashing every time they try to start it (it goes into a Not Responding state). If they click to close it they are given the option to Restart Outlook, and on restarting it opens fine and our add-in is still enabled and working.

I have been able to debug this crash down to one specific line of code that is run in the AddinModule_AddinInitialize event:

olApp = OutlookApp

Where olApp:

Public WithEvents olApp As Microsoft.Office.Interop.Outlook.Application

and OutlookApp:

Public ReadOnly Property OutlookApp() As Outlook._Application
Get
Return CType(HostApplication, Outlook._Application)
End Get
End Property

I have seen in some previous forum posts that crashes at startup can sometimes be caused by a faulty calendar entry for that user, and I have linked our client to the tools for checking this, however I wanted to see whether you knew of any other reasons this crash my be happening at this line?

The same addin loads fine for other users on the same machine, but it always crashes with this particular user no matter what machine they are on. The addin is installed at Local Machine level so all registry entries are fine.

Any thoughts?

Thanks,
Tom
Posted 15 Jun, 2016 05:31:41 Top
Andrei Smolin


Add-in Express team


Posts: 17125
Joined: 2006-05-11
Hello Tom,

Wrap that code line in a tr/catch block to find out the exception it produces.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 15 Jun, 2016 06:00:10 Top
tadams




Posts: 78
Joined: 2015-12-01
Hi Andrei,

So it actually doesn't seem to error at that line, in fact it doesn't error at all. It completes the AddinModule_AddinInitialize and AddinModule_AddinStartupComplete and then that is when it freezes, Outlook hasn't fully opened and loaded in the user's profile yet but it just hangs. It you click to close it gives an option to restart Outlook, when selecting this it then starts Outlook fine and the addin code seems to continue where it left off.

The next bit of code to run occurs c.7 secs after the AddinModule_AddinStartupComplete finishes on a timer.tick, when Outlook hangs this tick event doesn't ever occur in the background, which is why it must be freezing at some point after AddinModule_AddinStartupComplete and before that tick code runs.

Any other ideas aside from faults in the calendar that might cause this?

Update on the calendar faults, the tool did return back that the user had faults however it is hard know which fault to correct (I think there are quite a few), is there anyway to narrow down which ones to try first?

Thanks,
Tom
Posted 15 Jun, 2016 07:52:19 Top
tadams




Posts: 78
Joined: 2015-12-01
Hi Andrei,

Another update - I can confirm it is definitely caused by a calendar fault, since when our client made a copy of his mailbox profile to replicate the issue, deleting all the calendar faults resolve the startup hang.

The problem now is twofold:

1) how can we narrow down the exact fault causing the hang, since ideally they don't want to have to delete all the entries for the user

2) how can we prevent Outlook faults causing a hang going forward? We will be soon deploying to firms with 1000s of employees and so the chances of another user having the same issue is quite high... Is there any fix we can apply so the faults don't affect Add-in Express addins?

Thanks,
Tom
Posted 15 Jun, 2016 08:15:47 Top
Andrei Smolin


Add-in Express team


Posts: 17125
Joined: 2006-05-11
Tom,

Try this approach. Put an Outlook Events component (ADXOutlookAppEvents) onto the add-in module and set Reminders = false in the HandleEvents property of the component. Please let me know if this helps.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 15 Jun, 2016 08:24:50 Top
tadams




Posts: 78
Joined: 2015-12-01
Hi Andrei,

That seemed to fix it to some degree, Outlook still goes into a c.5 second period of saying unresponsive at startup but then loads fully with no complete hang, presumably the 5 seconds is during the part where it is bypassing connecting to reminders? Is there any other potentially solutions we could also check for to help with the 5 second unresponsiveness?

Thanks,
Tom
Posted 15 Jun, 2016 09:37:55 Top
Andrei Smolin


Add-in Express team


Posts: 17125
Joined: 2006-05-11
Reproduce the delay and post here adxloader.log describing the loading process. Or, you can send it to the support email address.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 15 Jun, 2016 09:40:34 Top
tadams




Posts: 78
Joined: 2015-12-01
Hi Andrei,

Just to update on this, I believe the delay has gone and so your initial fix has solved the issue we were having. Thanks again for your help here!

Tom
Posted 28 Jun, 2016 03:26:50 Top
Andrei Smolin


Add-in Express team


Posts: 17125
Joined: 2006-05-11
You are welcome!

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 28 Jun, 2016 03:30:23 Top