title: Unhandled exception in marshal.cxx under VS2013
body: <p>Debugging my C++ app I'm getting an occasion unhandled exception in marshal.cxx with the following stack trace;</p>
  
  <blockquote>
    <p>ole32.dll!CStdMarshal::Disconnect(unsigned long dwType)  Line 3420  C++
        ole32.dll!CStdMarshal::DisconnectAndRelease(unsigned long dwType)  Line 3161 + 0x11 bytes   C++
        ole32.dll!COIDTable::ThreadCleanup()  + 0x31bed bytes   C++
        ole32.dll!FinishShutdown()  Line 1035   C++
        ole32.dll!ApartmentUninitialize(int fHostThread)  Line 1291 C++
        ole32.dll!wCoUninitialize(COleTls &amp; Tls, int fHostThread)  Line 2766 + 0x7 bytes    C++
        ole32.dll!CoUninitialize()  Line 2632   C++
        networkitemfactory.dll!FDBackgroundThreadHandler()  + 0x25 bytes<br>
        shlwapi.dll!WrapperThreadProc()  + 0x116 bytes<br>
        kernel32.dll!BaseThreadInitThunk()  + 0xd bytes 
        ntdll.dll!RtlUserThreadStart()  + 0x21 bytes    </p>
  </blockquote>
  
  <p>Slightly perplexed, as he main application thread is sitting in the message pump, and all my other threads are sleeping and nowhere near any of my own code.  Following on from this the debugger refuses to run my program at all until I exit and re-run visual studio.</p>
  
  <p>Is there any way to figure out whether this is a problem in my code, or a problem in VS2013 or one of the plug-ins I'm using (Visual Assist and Visual Commander)?</p>