intermittent WORD Crash when openning closing document through VSTO RRS feed

  • Question

  • Hi

    We have a VSTO add-in that opens a protected document. On my local development machine WORD 2010 will periodically crash when i open and close the protected document.  The following error report is what is displayed and we are having issue tracking down the root of the issue. I have read other replies around making sure the 'trust center' location be set right. Ensure the Marshal.ReleaseComObject is released correctly and so on. however it appears everything is as suggested but i still have these crashes. 

    also, the protected document opens and renders, but then crashes with the following error

      Problem Event Name: APPCRASH

      Application Name:        WINWORD.EXE

      Application Version:    14.0.4762.1000

      Application Timestamp:             4bae25b7

      Fault Module Name:    wwlib.dll

      Fault Module Version:                14.0.4762.1000

      Fault Module Timestamp:         4bae2623

      Exception Code:             c0000005

      Exception Offset:          00216b45

      OS Version:      6.1.7601.

      Locale ID:          1033

    Additional information about the problem:

      LCID:    1033

      skulcid:              1033

    Any suggestion or test i can do to report back? This is something i need to figure out quickly.


    • Edited by zy426f Sunday, July 6, 2014 11:14 PM
    Sunday, July 6, 2014 11:02 PM

All replies

  • Hi,

    Does this issue occured in other machines or relate to the specific document? Would you mind sharing with us a code sample to reproduce this issue? You can remove the sensitive information and uplaod it via OneDrive.

    Best regards


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, July 7, 2014 3:21 AM
  • Fei,

    We are seeing this on a couple different machines, however my machine seems to be causing it more. I plan on creating a release version with installer so i can test it on different OS and machines this week. So i will have more info later. 

    It does not matter what document so, all protected documents are effected the same.

    I am not the developer of the VSTO so i will check to see ifwe can upload the code. I do know however that there is a propitiatory service that the VSTO communicates to that we cannot release the code for.

    in the propitiatory service is where the protected file gets saved in a temp folder. I at first thought that it was what was causing the crash buy creating a delay in read/writes. however further testing resulted in seeing the protected document open and display, then the crash. 

    on my personal machine if i removed the Marshal.ReleaseComObject  it appeared to reduce the crashes i thought, so i'm not sure if that helps or not.

    is there any test or debug log that i can produce to help narrow this down?

    Monday, July 7, 2014 4:24 AM
  • Hi zy426f

    If the document is opening, then I'd look for a DocumentOpen event and at the code it runs - put some logging code in that.

    What kind of protection is on these documents: Forms? "Read only"? IRM? Something else? If the problem is occurring only with protected documents it probably has something to do with the protection (and what your code is trying to do with it).

    Cindy Meister, VSTO/Word MVP, my blog

    Monday, July 7, 2014 3:57 PM
  • thanks,

    The document is protected with Office encryption which i think is 128bit AES.

    here is our developer's explanation of what happens.....

    "we first open a document and see that it is a protected document, when it is, we then close it, decrypt it in memory and then encrypt it with the MS recommended encryption, apply a password and then open it with the password in the open call"

    so basically we are converting our 256bit AES encryption to Windows 128bit AES which Office uses an then opening up the file through the "password"

    we are using Addin-Express to build our shared VSTO not sure if that matters.

    Non protected documents don't go through the same process and we just skip them and allow Word to open them normally. Therefore its hard to say if its the process or not.

    Once question we have is the Error type we are getting? what exactly is that referring to. If that is related to the template, then we can start looking at the template data being written.

    when a file is converted from our encryption to WORD encryption it gets saved in a temp folder under user/appData/document name/id, and that is where the WORD Password file is opened from.

    another guess could be the "password" protected document, somewhere i read where it opens 2 COMs and not 1, so we could be not closing all the coms...

    in our error logs, the last debug statement we capture before the crash is "Marshal.Release" without any " catch exceptions being thrown in our code.

    • Edited by zy426f Tuesday, July 8, 2014 7:59 AM
    Tuesday, July 8, 2014 5:28 AM
  • Hi Zy,

    I'm trying to involve some senior engineers into this issue and it will take some time. Your patience will be greatly appreciated.

    Sorry for any inconvenience and have a nice day!

    Best regards


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, July 8, 2014 7:55 AM
  • Hello zy426f,

    You mentioned that you are using the "Addin-express" to build your addin. We are not sure if there is something in the Adin-Express codebase which is leading to the crash. Also, since you cannot provide the sample to reproduce the issue, the only option to move forward would be to capture and analyze the crash dump which is complex and time consuming.

    Because of its complexity your question falls into the paid support category which requires a more in-depth level of support.  If the support engineer determines that the issue is the result of a bug the service request will be a no-charge case and you won't be charged. Please visit the below link to see the various paid support options that are available to better meet your needs.;en-us;offerprophone


    • Proposed as answer by Ajay Bandooni Tuesday, July 8, 2014 3:12 PM
    Tuesday, July 8, 2014 3:11 PM