title: Diagnose ObjectDisposedException "Safe handle has been closed"
body: <p>I have a C# application which is hitting an ObjectDisposedException with the message </p>
  
  <blockquote>
    <p>Safe handle has been closed</p>
  </blockquote>
  
  <p>This happens as soon as I launch the application.</p>
  
  <p>Sadly the stack trace is really unhelpful (see below). Is there any way for me to determine what call was being attempted asynchronously here? </p>
  
  <p>Does DoAsyncCall() really imply an async method call?</p>
  
  <blockquote>
    <p>mscorlib.dll!System.Threading.EventWaitHandle.Set() + 0xe bytes<br>
      mscorlib.dll!System.Runtime.Remoting.Messaging.AsyncResult.SyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage
    msg) + 0x12f bytes<br>
      mscorlib.dll!System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage
    msg, System.Runtime.Remoting.Messaging.IMessageSink replySink =
    {System.Runtime.Remoting.Messaging.AsyncResult}) + 0x279 bytes<br>
      mscorlib.dll!System.Runtime.Remoting.Proxies.AgileAsyncWorkerItem.DoAsyncCall()
    + 0x32 bytes      mscorlib.dll!System.Runtime.Remoting.Proxies.AgileAsyncWorkerItem.ThreadPoolCallBack(object
    o) + 0x28 bytes<br>
      mscorlib.dll!System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(object
    state) + 0x2f bytes<br>
      mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext
    executionContext, System.Threading.ContextCallback callback, object
    state) + 0x6f bytes<br>
      mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(System.Threading._ThreadPoolWaitCallback
    tpWaitCallBack) + 0x53 bytes<br>
      mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(object
    state) + 0x59 bytes</p>
  </blockquote>