【问题标题】:SEHException occurred发生 SEHException
【发布时间】:2013-06-20 13:55:21
【问题描述】:

尝试通过网络访问程序集时突然发生 SEHException。应用程序已部署在服务器(Windows server 2003)并在.NET Framework 1.1 和windows C# 应用程序中运行。它已部署并运行了很长时间。以下是异常的堆栈跟踪

*'System.Runtime.InteropServices.SEHException' 发生并被捕获。 -------------------------------------------------- ----------------------------------------- 2013 年 6 月 13 日 12:41: 19 类型: System.Runtime.InteropServices.SEHException mscorlib
版本=2.0.0.0 文化=中性 PublicKeyToken=b77a5c561934e089 消息:外部组件抛出异常。资源 : mscorlib 帮助链接:错误代码:-2147467259 数据: System.Collections.ListDictionaryInternal 堆栈跟踪:在 System.Reflection.Assembly._GetResource(String resourceName UInt64& 长度 StackCrawlMark& stackMark Boolean skipSecurityCheck) 在 System.Reflection.Assembly.GetResource(字符串资源名称 UInt64& 长度 StackCrawlMark& stackMark Boolean skipSecurityCheck) 在 System.Reflection.Assembly.GetManifestResourceStream(字符串名称
StackCrawlMark& stackMark Boolean skipSecurityCheck) 在 System.Reflection.Assembly.GetManifestResourceStream(类型类型字符串 名称 Boolean skipSecurityCheck StackCrawlMark& stackMark)在 System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo 文化 Boolean createIfNotExists Boolean tryParents) at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo 文化 Boolean createIfNotExists Boolean tryParents) at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo 文化 Boolean createIfNotExists Boolean tryParents) at System.Resources.ResourceManager.GetObject(字符串名称 CultureInfo 文化布尔 wrapUnmanagedMemStream) 在 System.Resources.ResourceManager.GetObject(字符串名称)在 shoppingcartBO.messageLabel_Paint(对象发送者 PaintEventArgs e)
在 System.Windows.Forms.Control.OnPaint(PaintEventArgs e) 在 System.Windows.Forms.Label.OnPaint(PaintEventArgs e) 在 System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e
Int16 层 Boolean disposeEventArgs) 在 System.Windows.Forms.Control.WmPaint(Message& m) 在 System.Windows.Forms.Control.WndProc(Message& m) 在 System.Windows.Forms.Label.WndProc(Message& m) 在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(消息& m) 在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(消息& m) 在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd
Int32 msg IntPtr wparam IntPtr lparam)*

关闭并重新启动应用程序后未出现此问题。我们已经收到了将近 200 多次关于此问题的报告,我们需要解决它。

【问题讨论】:

  • 导致此错误或您怀疑导致问题的代码是什么?
  • 这可能不是代码问题,因为代码在生产中运行了相当长的一段时间。这个问题突然出现了。

标签: c# windows-applications


【解决方案1】:

在我们的例子中,这个问题是由以下原因引起的:

  1. 应用程序已从远程计算机的网络共享启动
  2. 客户端计算机在应用程序运行时进入睡眠状态
  3. 网络共享上的应用程序已更新为新的 exe 文件
  4. 客户端计算机已恢复。应用程序仍在使用旧(缓存在内存中)版本的 exe 运行。之后,应用程序中的某些操作启动了Assembly.GetManifestResourceStream 的调用,导致SEHException

我们通过重新组织应用程序来解决此问题,以免发生这种情况。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-10-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-07
    • 2020-10-29
    相关资源
    最近更新 更多