gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 16:15:06 26 4
gpt4 key购买 nike

我有一个 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com