代碼保持與下面的錯誤(沒有改變)撞車出局而有力:如何調試「安全把手已關閉」的錯誤
System.ObjectDisposedException: Safe handle has been closed
at Microsoft.Win32.UnsafeNativeMethods.GetOverlappedResult(
SafeFileHandle hFile, NativeOverlapped* lpOverlapped,
Int32& lpNumberOfBytesTransferred, Boolean bWait)
at System.IO.Ports.SerialStream.EventLoopRunner.WaitForCommEvent()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.
ExecuteCodeWithGuaranteedCleanup(
TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(
ExecutionContext executionContext, ContextCallback callback,
Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext,
ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
這是唯一被抓的前一開發人員添加了AppDomain.UnhandledException Event。
如果我刪除它,就能應用崩潰了與沃森博士消息(發送反饋等),而不是一般的.NET對話框(與繼續選項和堆棧跟蹤)。
我已經檢查過這是不相關的Thread.Abort
我該如何去試圖找到這個問題的原因,因爲它出現,從堆棧跟蹤,而不是在應用程序代碼?
這就像魅力我刪除除了我的鼠標,它所有連接的USB圖謀工作編輯。不知道,爲什麼發生這種情況。 – Nitesh 2015-03-20 08:29:38