none
Outlook sometimes crashes and restarts RRS feed

  • Question

  • Hi,

    We've developed a VSTO addin for Outlook and we've noticed that Outlook sometimes crashes and then restarts itself. (once or twice a day but mostly not at all)

    In the event viewer we see this kind of errors :

    Faulting application name: OUTLOOK.EXE, version: 16.0.4666.1000, time stamp: 0x5a83689d
    Faulting module name: OUTLOOK.EXE, version: 16.0.4666.1000, time stamp: 0x5a83689d
    Exception code: 0xc0000005
    Fault offset: 0x0085455f
    Faulting process id: 0xc1b8
    Faulting application start time: 0x01d54c4d4131423b
    Faulting application path: C:\Program Files (x86)\Microsoft Office\Office16\OUTLOOK.EXE
    Faulting module path: C:\Program Files (x86)\Microsoft Office\Office16\OUTLOOK.EXE
    Report Id: 9e3f0afd-b85f-11e9-9194-005056000009
    Faulting package full name: 
    Faulting package-relative application ID: 

    Sometimes we also get :

    The program OUTLOOK.EXE version 16.0.4666.1000 stopped interacting with Windows and was closed. To see if more information about the problem is available, check the problem history in the Security and Maintenance control panel.

    On the internet I found that the cause could be a memory leak from a COM object not being released properly.

    However, I think I have followed all the rules to prevent memory-leaks.

    I have added some logging to our code and I've noticed that if the error occurs it is right after Marshal.ReleaseComObject(_Inspector) wich is executed on the close event of a compose ribbon.

    Though it looks like this code is correct and it doesn't give any problems in 95% of the cases.

    The second error seems to occur when none of our code is executed (or perhabs is code wich isn't logged).

    Extra info : Office 2016 running on a Citrix system

    Could you help me ? Are there tools to get more info about the cause of this behavior ? Could we detect memory-leaks after the crash/restart ?

    Thanks in advance,

    Friendly regards,

    Frederick

     
    Wednesday, August 7, 2019 12:14 PM

All replies

  • Hello Frederick,

    First of all, I'd suggest disabling all COM add-ins and see how it goes. Is the issue still alive?

    Then, if it comes from your add-in, you may remove all ReleaseComObject statements from the code and check whether it helps. If it helps, you must review the code base to make sure all statements are required. Sometimes you may release objects passed as parameters to functions - you shouldn't never release such objects, otherwise, you may see such crashes. 


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Wednesday, August 7, 2019 12:20 PM
  • Hi Eugene,

    Thx for your quick response.

    The only other addins are from MS so I don't think they could be the cause ...

    + Microsoft Exchange Add-in

    + Microsoft SharePoint Server Colleague Import Add-in

    + OneNote Notes about Outlook Items

    + Outlook Social Connector 2016

    How about removing all the ReleaseComObject lines ? Won't that be causing more/other problems ? That will result in memory-leaks, no ??

    I normally did not release any objects comming from parameters. (I will re-check this).

    I've heard you could debug dump files on crashes ... any expercience with that ?

    Grz,

    Frederick

    Wednesday, August 7, 2019 1:23 PM
  • Frederick,

    I think sorting out release statements may help without looking at dump files.


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Wednesday, August 7, 2019 9:59 PM
  • Hi Eugene,

    I was wondering if it could have something to do with the fact that I am trying to release the mailitem and the inspector after the email has been sent ? (On the Inspector.Close event)

    When I try to acces the mailitem I see I get an exception ("The item has been moved or deleted").

    The inspector however is still accessable.

    How about moved or sent items ? Do they stil have to be released or isn't that necessary ? Could this result in unexpected behavior ?

    Friendly regards,

    Frederick

    Thursday, August 8, 2019 9:42 AM