Outlook detected a COM add-in problem

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

Outlook detected a COM add-in problem
This add-in caused Outlook to crash (enable this add on) 
Greg Saunders




Posts: 11
Joined: 2012-07-19
Using Delphi XE5 and Add-In Express 8.1.1432. Outlook 2013 and 2016.

Our COM add-in usually does not have a problem, but we on occasion see the following happen on multiple clients (not any specific client most all of them see it sooner or later).


Outlook detected a COM add-in problem
This add-in caused Outlook to Crash
Button: Enable this add-in


We can just click the "Enable this add-in" and it starts working again.

How do we track down this intermittent issue?
Is there a way to enable logging to get some visibility on what is happening?

This is very intermittent and does not happen often, but this morning 2 users both reported it.

Thanks,

Greg
Posted 03 Feb, 2017 10:00:49 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Greg,

Typically, this is a result of an exception unhandled in your code. There's no logging available. You need to debug your code and use try/catch to prevent such a crash.


Andrei Smolin
Add-in Express Team Leader
Posted 03 Feb, 2017 10:03:37 Top
Greg Saunders




Posts: 11
Joined: 2012-07-19
Andrei,

So if this ONLY happens when starting Outlook then am I correct the only place the error could take place is in the following places (at least where I have my code):

- AddInInitialize
- AddInStartupComplete

Those are the only two places I have some custom code that would fire without the user doing something. For example the only other code is on button clicks from a Command Bar Button or Ribbon Button.

Other than that no other custom code should fire until a very specific event takes place and none do during the startup other than the two I have custom code in above.

I have altered them and wrapped in try..except and have it show me a message to potentially see what is happening.

For a test I forced an exception by trying to use a tString without creating it first and with the try except I get a message that I would expect in my except section, but if I don't use the try except I pretty much get the same error message, but the add in does not cause outlook to crash and therefore doesn't try to disable itself.

So it seems whatever is going on is not just a typical access violation type of error.

I have gone ahead and put the try except around all the custom code areas so hopefully if it does happen again something is caught and reported.

Greg
Posted 03 Feb, 2017 10:41:38 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Greg,

Greg Saunders writes:
So if this ONLY happens when starting Outlook then am I correct the only place the error could take place is in the following places (at least where I have my code):


The error message is: This add-in caused Outlook to Crash. You get this message at startup (always at startup) if your add-in crashes Outlook at shutdown, when a Ribbon control is clicked, or at any other moment (including startup).


Andrei Smolin
Add-in Express Team Leader
Posted 06 Feb, 2017 07:23:25 Top