What is the recommended approach to solve outlook addin hanging?

316 views Asked by At

I am having an outlook addin which is fairly stable and has been used for years. On a citrix machine environment, the addin is causing outlook to hang if it is left open. Logs are not helping much. How can I approach the problem if I can do the native debugging?

1

There are 1 answers

0
SliverNinja - MSFT On

Outlook can hang for many reasons. Since Outlook is COM-based, it uses STA which will cause the main UI thread to hang while it waits for a long-running operation to complete (network call, disk read/write, etc.).

You will need to review the source code to review what behaviors the component is performing when it hangs. Inserting trace statements (Trace.TraceInformation) may also help if you can repeat the hangup. Start with the event ThisAddIn.ThisAddIn_Startup to see the entry point to the AddIn. DebugView is a great utility to view the Trace output of your plugin while it's running.

If COM resources are not being cleanup up properly (Marshal.ReleaseComObject) - over time the memory consumption will grow which will start making the application sluggish - although it shouldn't cause it to freeze/hang.

Your best bet is understanding the behavior of the plugin to see what triggers the hang.