Christian Wolf 6 Reputation points


I am currently facing the following issue when running an Excel-Addin for one of our clients:

Transition into COM context 0x5811bc0 for this RuntimeCallableWrapper failed with the following error: The object invoked has disconnected from its clients. (Exception from HRESULT: 0x80010100 (RPC_E_SYS_CALL_FAILED)). This is typically because the COM context 0x5811bc0 where this RuntimeCallableWrapper was created has been disconnected or it is busy doing something else. Releasing the interfaces from the current COM context (COM context 0x5811bc0). This may cause corruption or data loss. To avoid this problem, please ensure that all COM contexts/apartments/threads stay alive and are available for context transition, until the application is completely done with the RuntimeCallableWrappers that represents COM components that live inside them.

This error happens in Debug and Release-Version of the addin and the following code could not be catched by an try-catch-phrase.

The error happens randomly, while I need to update an Word-File with data from my Excel-file. Because of the large number of update requests, the Addin runs for a long time and it crashed after at least half an hour/an hour. Also, I didn't use any thread-critical functions, nor does one line of my code closes/disconnects any worksheet/workbook. So searching in the web for a solution regarding "DisconnectContext-Error" didn't help.

Thanks in advance!

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,579 questions
0 comments No comments
{count} votes