title: VB Visual Studio 2017: Error Managed Debugging Assistant 'DisconnectedContext'
body: <p>I got the "Managed Debugging Assistant 'DisconnectedContext' " error. </p>
  
  <blockquote>
    <p>Managed Debugging Assistant 'DisconnectedContext' 
      Message=Managed Debugging Assistant 'DisconnectedContext' : 'Transition into COM context 0xfc94b0 for this RuntimeCallableWrapper failed with the following error: System call failed. (Exception from HRESULT: 0x80010100 (RPC_E_SYS_CALL_FAILED)). This is typically because the COM context 0xfc94b0 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 0xfc9568). 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.
    Blockquote</p>
  </blockquote>
  
  <p>The program is reading and analyzing about 200 large excel files, generating one output large excel file. So far I was using it on a smaller amount of files, so perhaps it has to do something with larger memory usage. On the other hand the machines I use have 16GB of RAM. While n run time it doesn't look like memory leak. I don't use pointers, or dynamic memory allocations - simply open files, read, write and close.</p>
  
  <p>While I read I can disable the "'DisconnectedContext' " I prefer to understand how to locate the problem and fix it. </p>
  
  <p>The problem occurs on two separated machines.</p>
  
  <p>How can I debug it?</p>
  
  <p>Where to start?</p>
  
  <p>Thank you</p>