由于InteropServices.SEHException中出现了未处理的异常,该流程已终止。

3

我搜索过,但我找不到任何有关此错误或如何解决此错误的具体信息。

我们在代码的不同位置和不同电脑上经常遇到此错误。

以下是错误信息:

电脑 1:

Application: propane.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Runtime.InteropServices.SEHException
Stack:
   at SSS.Base.FastTrans.PrintReceipt.MakeString()
   at SSS.Base.FastTrans.PrintReceipt.PrintIt()
   at SSS.Base.FastTrans.CCPayment.PrintReceipt()
   at SSS.Base.FastTrans.CCPayment.BottomPanelEnabled()
   at SSS.Base.FastTrans.CCPayment.btnContinue_Click(System.Object, System.EventArgs)
   at System.Windows.Forms.Control.OnClick(System.EventArgs)
   at System.Windows.Forms.Button.OnClick(System.EventArgs)
   at System.Windows.Forms.Button.OnMouseUp(System.Windows.Forms.MouseEventArgs)
   at System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32)
   at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.ButtonBase.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.Button.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)
   at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
   at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
   at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
   at System.Windows.Forms.Application.RunDialog(System.Windows.Forms.Form)
   at System.Windows.Forms.Form.ShowDialog(System.Windows.Forms.IWin32Window)
   at SSS.Common.BaseScreen.DynamicallyLoadScreen(System.String, System.String, SSS.Common.BaseScreen, Boolean)
   at SSS.Common.BaseScreen.LoadNewScreen(ScreenOptions, SSS.Common.BaseScreen)
   at SSS.Base.CustomerInquiry.CmdPaymentClick(System.Object, System.EventArgs)
   at System.Windows.Forms.Control.OnClick(System.EventArgs)
   at System.Windows.Forms.Button.OnClick(System.EventArgs)
   at System.Windows.Forms.Button.OnMouseUp(System.Windows.Forms.MouseEventArgs)
   at System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32)
   at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.ButtonBase.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.Button.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)
   at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
   at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
   at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(System.String[])
   at Sss.My.MyApplication.Main(System.String[])

计算机2:

Application: propane.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Runtime.InteropServices.SEHException
Stack:
   at SSSObjectLibrary.VerifySalesAndService.VerifySASLibrary(System.String)
   at SSS.Base.CustomerInquiry.CmdServiceOrderClick(System.Object, System.EventArgs)
   at System.Windows.Forms.Control.OnClick(System.EventArgs)
   at System.Windows.Forms.Button.OnClick(System.EventArgs)
   at System.Windows.Forms.Button.OnMouseUp(System.Windows.Forms.MouseEventArgs)
   at System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32)
   at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.ButtonBase.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.Button.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)
   at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
   at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
   at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(System.String[])
   at Sss.My.MyApplication.Main(System.String[])

这是两台电脑发送的第二条消息:
Faulting application name: propane.exe, version: 1.0.0.0, time stamp: 0x51ffc85e
Faulting module name: clr.dll, version: 4.0.30319.1008, time stamp: 0x517a1be7
Exception code: 0xc0000006
Fault offset: 0x0004a0c8
Faulting process id: 0xe80
Faulting application start time: 0x01cea9b048cb2d9d
Faulting application path: I:\RPG\vblib\propane.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Report Id: c4a07f4d-1631-11e3-a5f3-1078d270d332

这些来自两台不同电脑,位于两个不同的办公室。我该如何进行故障排除?我们有一个包装器,'应该'捕获应用程序中所有未处理的错误,并且目前没有漏掉任何错误。这让我更加困惑,因为它是如何绕过这个捕获所有的错误的。

有什么建议吗?


我不能告诉你太多关于这个问题,但如果我理解正确的话,这可能是由于在SEH例程中发生了内部异常。内部异常是指在SEH例程正在处理先前捕获的异常时发生的异常。尽管实现了SEH例程,但内部异常可能是这种错误消息的原因。例如,如果抛出了FileNotFoundException并被SEH例程成功接收,但在处理过程中出现了IOException,就会出现这种情况。可以在此处找到简要说明:http://msdn.microsoft.com/en-us/library/vstudio/0yd65esw.aspx。 - devavx
2个回答

6

出错应用程序路径: I:\RPG\vblib\propane.exe

这是异常详情中最重要的提示。异常代码(0xc0000006)是一个非常低级的Windows错误,STATUS_IN_PAGE_ERROR,“由于I/O错误未将所需数据放入内存”。当操作系统需要从分页文件或内存映射文件检索数据时,如果读取文件失败,则会发生此错误。

相符的事实是,磁盘驱动器字母很不寻常,通常用于映射到网络共享。.NET程序集作为内存映射文件加载,其中的元数据和MSIL会动态从文件中加载以生成程序集方法的代码。

换句话说,客户使用的网络不够可靠。当网络连接断开时,程序崩溃。除了强烈建议客户使用您应用程序的本地安装外,当然没有其他办法。ClickOnce适用于此。


0

SEHException类处理从非托管代码抛出的SEH错误,但这些错误尚未映射到另一个.NET Framework异常。因此,您应该检查本机代码而不是C#代码。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接