macos - Mac 应用程序崩溃时,CrashReporter 对话框不显示

标签 macos cocoa crash-reports

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

我在多台机器上看到相同的行为。有任何已知的原因会导致这种情况发生吗?

根据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

“以登录 GUI 用户身份运行”是什么意思?窗口必须是可见的吗?

更新:

我正在阅读manpage for ReportCrash ,并发现以下内容:

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.

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

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

最佳答案

如果您的应用使用 LSUIElement 或 LSBackgroundOnly,则它是一个“后台进程”,用于确定是否显示崩溃报告器。 (其他“后台进程”包括 UNIX 领域的守护进程,例如 Apache Web 服务器,以及从 SSH 或 telnet 连接启动的进程。)

关于macos - Mac 应用程序崩溃时,CrashReporter 对话框不显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10359966/

相关文章:

objective-c - 在没有绑定(bind)的情况下使用 NSCollectionView

iphone - iPhone-Windows上未生成崩溃日志

c++ - 在非 Cocoa 应用程序中启动应用程序?

c++ - 为什么 HID 在 mac 中枚举 Apple Internal Keyboard/Trackpad 3 次?

cocoa - 如何使我的 Cocoa 应用程序针对基于 Intel 的 Mac 和旧 PPC 系统?

Objective-C,如何将 char[] 传递给方法?

xcode - OS X 崩溃日志符号

objective-c - 启动画面后 iPhone 应用程序崩溃

python - 在 Mac 上使用 pygame?

json - 当我尝试 sudo gem install json 我收到以下错误