On Vista, I got a problem with the application crash handler. Basically, if something unexpected occurs which cannot be captured by SEH, I get this pop-up window with "The application stopped working", blablabla, "Close program/Debug program" -- that is, after I disable the error reporting using the system control panel. With error reporting enabled, you would get a task dialog with search for solution online, close, debug.
在Vista上,我遇到了应用程序崩溃处理程序的问题。基本上,如果出现SEH无法捕获的意外情况,我会在弹出窗口中显示“应用程序停止工作”,blablabla,“关闭程序/调试程序” - 也就是说,在我禁用错误报告后使用系统控制面板。启用错误报告后,您将获得一个任务对话框,可以在线搜索解决方案,关闭,调试。
This is not so funny if it happens in automated tools, and I wonder whether there is a way to get rid of it totally, read, if my app crashes, it just crashes to the command line or disappears but does not bring up a dialog.
如果它发生在自动化工具中,这不是那么有趣,我想知道是否有办法完全摆脱它,读取,如果我的应用程序崩溃,它只是崩溃到命令行或消失但没有出现对话框。
2 个解决方案
#1
#2
0
Function signal works on all POSIX platforms:
功能信号适用于所有POSIX平台:
signal(SIGSEGV, &signal_handler);
If you need to trap an exception that isn't supported by signal, you can also take a look at AddVectoredExceptionHandler, a function specific to W32.
如果需要捕获信号不支持的异常,还可以查看AddVectoredExceptionHandler,这是一个特定于W32的函数。
#1
6
Use
SetErrorMode(SetErrorMode(0)|SEM_NOGPFAULTERRORBOX);
But I would suggest to install an exceptions handler which creates a dump so you can verify what happened. For example crashrpt (or here).
但我建议安装一个异常处理程序,它创建一个转储,以便您可以验证发生了什么。例如crashrpt(或这里)。
See also
#2
0
Function signal works on all POSIX platforms:
功能信号适用于所有POSIX平台:
signal(SIGSEGV, &signal_handler);
If you need to trap an exception that isn't supported by signal, you can also take a look at AddVectoredExceptionHandler, a function specific to W32.
如果需要捕获信号不支持的异常,还可以查看AddVectoredExceptionHandler,这是一个特定于W32的函数。