windows 在Windows中,“应用程序中发生异常未知软件异常(0x40000015)”是否意味着STATUS_FATAL_APP_EXIT?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5115611/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 08:06:18  来源:igfitidea点击:

In Windows, does "The exception unknown software exception (0x40000015) occurred in the application" mean STATUS_FATAL_APP_EXIT?

windowsexceptionexception-handling

提问by Alessandro Jacopson

At shutdown (initiated by an UPS) my application crashes and a messagebox appears.

在关机(由 UPS 启动)时,我的应用程序崩溃并出现一个消息框。

The text in the messagebox is "The exception unknown software exception (0x40000015) occurred in the application".

消息框中的文本是“应用程序中发生异常未知软件异常 (0x40000015)”。

I browsed ntstatus.hand found STATUS_FATAL_APP_EXIT? If it were right, why the message box say "unknown software exception"?

我浏览ntstatus.h并发现STATUS_FATAL_APP_EXIT?如果是对的,为什么消息框显示“未知软件异常”?

回答by sean e

Yes, 0x40000015 means STATUS_FATAL_APP_EXIT. Your app causes an unhandled runtime exception during shutdown. Some runtime exceptions are actually handled if you don't handle them yourself, and some of these default handlers call abort(). By default, abortcalls:

是的,0x40000015 表示 STATUS_FATAL_APP_EXIT。您的应用程序在关闭期间导致未处理的运行时异常。如果您自己不处理某些运行时异常,则实际上会处理它们,其中一些默认处理程序调用abort(). 默认情况下,abort调用:

_call_reportfault(_CRT_DEBUGGER_ABORT, STATUS_FATAL_APP_EXIT, EXCEPTION_NONCONTINUABLE);

abortis a generic termination - it doesn't know what specific exception prompted it to be called, hence the generic 'unknown software exception' message.

abort是一个通用的终止——它不知道是什么特定的异常促使它被调用,因此是通用的“未知软件异常”消息。

One path to abort is via the _purecall exception - calling an unimplemented pure virtual call.

中止的一种方法是通过 _purecall 异常 - 调用未实现的纯虚拟调用。

Gleaned from purevirt.c and abort.c in the Visual Studio\VC\crt\src directory.


MSDN has documentation on overriding the default pure call exception handler.

从 Visual Studio\VC\crt\src 目录中的 purevirt.c 和 abort.c 收集。


MSDN 有关于覆盖默认纯调用异常处理程序的文档

Here are some related questions:

以下是一些相关问题: