当Mac应用程式崩溃时,CrashReporter对话方块不会显示 [英] CrashReporter dialog doesn't show when mac app crashes

查看:269
本文介绍了当Mac应用程式崩溃时,CrashReporter对话方块不会显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Mac应用商店应用程序,当它崩溃时,只是默默地消失。它不会显示CrashReporter对话框,让用户有机会向Apple报告崩溃。



我在多台机器上看到相同的行为。有什么已知的原因可能会发生吗?



根据 TN2123


此外,如果崩溃的程序正在运行登录GUI
用户,CrashReporter将向用户提供一个对话框,询问他们
是否要向Apple提交错误报告


作为登录的GUI用户运行是什么意思?窗口必须可见吗?



我正在阅读 ReportCrash的联机帮助页,并找到以下内容:


对于应用程序崩溃(但不是后台进程崩溃)
ReportCrash将显示一个对话框,通知用户
应用程序意外退出并提供重新打开应用程序
或发送报告给苹果。对于开发人员,可以使用
/Developer/Applications/Utilities/CrashReporterPrefs.app(它是作为开发人员工具的一部分安装的
)来调整此
对话框的行为。


我运行CrashReporterPrefs并将我的CrashReporter模式更改为Developer。当我运行应用程序并触发崩溃,CrashReporter对话框被显示!



所以我想现在的问题是:应用程序崩溃和后台进程崩溃有什么区别?

解决方案

如果您的应用程序使用LSUIElement或LSBackgroundOnly,它是一个后台进程,以确定是否显示Crash Reporter。 (其他后台进程包括UNIX地域守护程序,例如Apache Web服务器,以及从SSH或telnet连接启动的进程。)


I have a Mac app store app that just silently disappears when it crashes. It doesn't show the CrashReporter dialog to give the user a chance to report the crash to Apple.

I see the same behavior on multiple machines. Is there any known reason why this might happen?

According to TN2123:

In addition, if the program that crashed is running as a logged in GUI user, CrashReporter will present the user with a dialog asking them whether they want to submit a bug report to Apple

What does "running as a logged in GUI user" mean? Does a window have to be visible?

Update:

I was reading the manpage for ReportCrash, and found the following:

For application crashes (but not background process crashes) ReportCrash will display a dialog notifying the user that the application unexpectedly quit and offering to reopen the application or send the report to Apple. For developers, the behavior of this dialog can be adjusted using /Developer/Applications/Utilities/CrashReporterPrefs.app which is installed as part of the developer tools.

I ran CrashReporterPrefs and changed my CrashReporter mode to Developer. When I ran the app and triggered the crash, the CrashReporter dialog was shown!

So I guess the question now is: What's the difference between an "application" crash and a "background process" crash?

解决方案

If your app uses LSUIElement or LSBackgroundOnly, it's a "background process" for the purpose of determining whether to show the Crash Reporter. (Other "background processes" include UNIX-land daemons, such as the Apache web server, and processes started from SSH or telnet connections.)

这篇关于当Mac应用程式崩溃时,CrashReporter对话方块不会显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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