gpt4 book ai didi

c# - 由于 InteropServices.SEHException 中出现未处理的异常,进程已终止

转载 作者:行者123 更新时间:2023-11-30 14:32:17 26 4
gpt4 key购买 nike

我已经搜索过这个,但我找不到任何关于这个错误的具体信息或如何解决它。

我们在代码中不同位置的不同计算机上间歇性地收到此错误。

这里是错误:

计算机 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

这些来自两个不同办公室的 2 台不同的计算机。我该如何解决这个问题?我们有一个包装器,它“应该”捕获应用程序中所有未处理的错误,并且此时它没有遗漏任何东西。这让我更加困惑它是如何做到这一点的。

有什么建议吗?

最佳答案

Faulting application path: I:\RPG\vblib\propane.exe

这可能是异常详细信息中最重要的提示。异常代码 (0xc0000006) 是一个非常低级的 Windows 错误,STATUS_IN_PAGE_ERROR,“由于 I/O 错误,所需数据未放入内存”。当操作系统需要从页面文件或内存映射文件中检索数据而无法读取文件时,就会发生这种情况。

鞋子合适,驱动器号不常见,通常用于映射到网络共享。 .NET 程序集作为内存映射文件加载,其中的元数据和 MSIL 根据抖动的需要从文件中动态加载,以生成程序集中方法的代码。

换句话说,客户使用的网络不够可靠。当网络连接断开时程序崩溃。当然,除了强烈建议客户使用您的应用程序的本地安装之外,您对此无能为力。 ClickOnce 对此很有帮助。

关于c# - 由于 InteropServices.SEHException 中出现未处理的异常,进程已终止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18726828/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com