捕获EngineExecutionException [英] Catching EngineExecutionException

查看:275
本文介绍了捕获EngineExecutionException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含托管和本机代码的应用程序。该应用目前有未处理的异常过滤器,通过SetUnhandledExceptionFilter设定,其中捕捉任何严重错误,生成一个小型转储,记录各种应用程序参数,并退出程序。

I have an application containing both managed and native code. The application currently has an unhandled exception filter, set via SetUnhandledExceptionFilter, which catches any critical errors, generates a minidump, records various application parameters, and exits the program.

未处理异常处理程序没有捕获发生在.NET运行时EngineExecutionException。我们怀疑问题是由应用程序的本地部分内存损坏。

The unhandled exception handler does not catch an EngineExecutionException which occurs in the .NET runtime. We suspect the problem is memory corruption caused by the native portion of the application.

现在的问题是,当异常发生时,应用程序只是退出无影无踪。我们想记录一个小型转储时发生这种情况。有谁知道我们的应用程序可以安装能够阻止这个的处理程序?

The problem is, when the exception occurs, the application just exits without a trace. We'd like to record a minidump when this happens. Does anyone know how our application can install a handler capable of catching this?

推荐答案

据我所知这个异常是不是对管理方开捕事情(至少在.NET 4中)。

AFAIK this exception is not catchable on the managed side of things (at least not in .NET 4).

的一种方式,以抓这将是创建一个(本机)自起动/为您的应用程序,该程序。加载.NET运行时 - 这个自定义启动器可以在.NET运行时的本机端安装一个异常处理程序

One way to "catch" it would be to create a (native) custom starter/loader for your application which loads the .NET runtime - this custom starter can install an exception handler on the native side of .NET runtime.

参考链接:

  • http://msdn.microsoft.com/en-us/magazine/cc163567.aspx
  • http://msdn.microsoft.com/en-us/library/ms164336.aspx
  • http://msdn.microsoft.com/en-us/library/dd380851.aspx
  • http://msdn.microsoft.com/en-us/library/ms231221.aspx

这篇关于捕获EngineExecutionException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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