你应该如何诊断错误SEHException - 外部组件发生异常 [英] How should you diagnose the error SEHException - External component has thrown an exception

查看:8643
本文介绍了你应该如何诊断错误SEHException - 外部组件发生异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当用户报告错误,如

System.Runtime.InteropServices.SEHException - ?外部组件引发的异常

System.Runtime.InteropServices.SEHException - External component has thrown an exception?

有什么,我作为一个程序员可以做决定的原因?

is there anything that I as a programmer can do to determine the cause?

场景:一个用户(使用程序我公司写的)报告这个错误。
这可能会或可能不会一直一次性的错误。他们提到,在过去的一个月中,计算机曾两次停止工作。我从经验教训,不要走这说明,望文生义,因为这通常意味着,有关计算机的人无法按预期工作。他们无法给我更多的细节,我无法找到任何记录的错误。因此,它可以或可以不一直这个错误。

Scenario : One user (using a program my company wrote) has reported this error. This may or may not have been a one off error. They mentioned that in the last month, the computer has twice 'stopped working'. I have learnt from experience, not to take this description too literally, as it usually means that someone relating to the computer is not working as expected. They were unable to give me more details and I could not find any logged errors. Hence it may or may not have been this error.

,构建一类不直接拨打任何互code时,但也许通过一个事实,即对象可以是数据绑定到一个DevEx列表的一部分复杂的实际误差为preSS网格。

From the stack-trace, the actual error was when constructing a class which does not directly call any interop code, but perhaps complicated by the fact that the object may be part of a list that is databound to a DevExpress Grid.

该错误是由未处理的异常程序通常会关闭该程序'抓',但有一个选项忽略并继续。如果他们选择忽略错误,则计划继续工作,但如果这个程序是下次运行重新发生的错误。然而,它并没有关闭和重新启动我们的应用程序后再次出现。

The error was 'caught' by an unhandled exception routine which normally will close down the program, but has an option to ignore and continue. If they opted to ignore the error, then the program continued working but the error re-occurred when this routine was next run. However it did not occur again after closing and restarting our application.

有问题的电脑似乎并没有被强调了。它是运行Vista商业版,拥有2GB内存,并根据任务管理器中仅用关于与我们只是200MB的应用程序的一半。

The computer in question did not seem to be stressed out. It is running Vista Business, has 2GB of memory and according to Task Manager was only using about half of that with our application just about 200Mb.

有一个其他片的,可能会或可能不相关的信息。同一程序的其他部分使用第三方组件,它实际上是围绕一个本机DLL一个DOTNET包装,这部分确实有一个已知问题很偶然,你会得到一个

There is one other piece of information that may or may not be relevant. Another section of the same program uses a third party component which is effectively a dotnet wrapper around a native dll and this component does have a known issue where very occasionally, you get a

尝试读取或写入受保护的内存。这通常是指示其他内存已损坏

Attempted to read or write protected memory. This is often an indication that other memory is corrupt

组件制造商说,这已被固定在其组件的最新版本,我们使用的是内部,但是这并没有得到客户呢。

The component makers say that this has been fixed in the latest version of their component which we are using in-house, but this has not been given to the customer yet.

由于错误的后果是低(无工作丢失,重新启动该程序,又回到了他们在这里只需要最多一分钟),并给予该客户将很快得到一个新的版本(与更新第三方组件),我可以明显地越过我的手指,希望不会再出现了错误。

Given that the consequences of the error are low (no work is lost and restarting the program and getting back to where they were only takes a minute at most) and given that the customer will shortly be getting a new version (with the updated third-party component), I can obviously cross my fingers and hope the error won't occur again.

但有什么更多的,我可以做什么?

But is there anything more I can do?

推荐答案

是的。这个错误是未映射到.NET错误结构化异常。这可能是你的DataGrid映射抛出一个机异常,这是未捕获的。

Yes. This error is a structured exception that wasn't mapped into a .NET error. It's probably your DataGrid mapping throwing a native exception that was uncaught.

您可以告诉异常是通过查看<一个发生href=\"http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.externalexception.error$c$c.aspx\">ExternalException.Error$c$c属性。我会检查你的堆栈跟踪,如果它绑在DevEx preSS网格,将问题报告给他们。

You can tell what exception is occurring by looking at the ExternalException.ErrorCode property. I'd check your stack trace, and if it's tied to the DevExpress grid, report the problem to them.

这篇关于你应该如何诊断错误SEHException - 外部组件发生异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆