捕获 EngineExecutionException

发布于 2025-01-03 08:44:55 字数 289 浏览 3 评论 0原文

我有一个包含托管代码和本机代码的应用程序。应用程序当前有一个未处理的异常过滤器,通过 SetUnhandledExceptionFilter 设置,它捕获任何关键错误,生成小型转储,记录各种应用程序参数,然后退出程序。

未处理的异常处理程序不会捕获 .NET 运行时中发生的 EngineExecutionException。我们怀疑问题是由应用程序的本机部分引起的内存损坏。

问题是,当异常发生时,应用程序就直接退出而不留任何痕迹。发生这种情况时,我们希望记录一个小型转储。有谁知道我们的应用程序如何安装能够捕获此问题的处理程序?

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.

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

热风软妹 2025-01-10 08:44:55

AFAIK 这个异常在托管方面是不可捕获的(至少在 .NET 4 中是这样)。

“捕获”它的一种方法是为加载 .NET 运行时的应用程序创建一个(本机)自定义启动器/加载器 - 此自定义启动器可以在 .NET 运行时的本机端安装异常处理程序。

参考链接:

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

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.

Reference links:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文