首页 新闻 赞助 找找看

再问C# 程序闪退问题

0
悬赏园豆:10 [待解决问题]
 
本人开发一个短信猫池程序,16口的猫池,程序采用16个串口类 分别发送AT指令读取16个COM口的配置信息,有时候程序会闪退,我的提取串口信息写在串口接收事件里了  用的是SerialPort类  下面是错误提示
 
 
 
 
 
 
 
 
 
 
 
接收返回消息异常CurrentDomain_UnhandledException!具体原因:System.ObjectDisposedException: 已关闭 Safe handle
   在 System.Runtime.InteropServices.SafeHandle.DangerousAddRef(Boolean& success)
   在 System.StubHelpers.StubHelpers.SafeHandleAddRef(SafeHandle pHandle, Boolean& success)
   在 Microsoft.Win32.UnsafeNativeMethods.GetOverlappedResult(SafeFileHandle hFile, NativeOverlapped* lpOverlapped, Int32& lpNumberOfBytesTransferred, Boolean bWait)
   在 System.IO.Ports.SerialStream.EventLoopRunner.WaitForCommEvent()
   在 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   在 System.Threading.ThreadHelper.ThreadStart()

十三哥爱吉他的主页 十三哥爱吉他 | 初学一级 | 园豆:197
提问于:2016-04-14 15:58
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册