【问题标题】:Xcode - Mac App - Bootstrap check in error on launchXcode - Mac App - 启动时引导检查错误
【发布时间】:2018-05-08 23:02:58
【问题描述】:

我正在使用 Xcode 创建一个 C++ Mac 应用程序。我以前做过这个没有任何问题,但几周前我开始了一个新项目,这个项目有问题。

启动消息

当我启动应用程序时,在调用 SDL_GL_CreateContext 后,此消息会出现在控制台中

bootstrap_check_in():  (os/kern) unknown error code (44c)

我以前从未见过这个,我不知道这意味着什么。该应用程序仍会启动。

打开弹出窗口

osascript 不再有效。调用此命令时,

osascript  -e 'try' -e 'POSIX path of ( choose file name with prompt "Save screenshot" default name "Screenshot.png" )' -e 'on error number -128' -e 'end try'

此消息出现在控制台中:

2017-11-25 10:50:19.837159+1030 osascript[7910:487965] +[NSXPCSharedListener endpointForReply:withListenerName:]: an error occurred while attempting to obtain endpoint for listener 'com.apple.view-bridge': Connection interrupted
2017-11-25 10:50:19.838056+1030 osascript[7910:487963] *** Assertion failure in +[NSXPCSharedListener connectionForListenerNamed:fromServiceNamed:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/ViewBridge/ViewBridge-341.1/NSXPCSharedListener.m:421
2017-11-25 10:50:19.838724+1030 osascript[7910:487963] *** Assertion failure in -[NSVBSavePanel viewWillInvalidate:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1561.10.101/Nav.subproj/OpenAndSavePanelRemote/NSVBOpenAndSavePanels.m:387
2017-11-25 10:50:19.879032+1030 osascript[7910:487963] -[NSVBSavePanel init] caught non-fatal NSInternalInconsistencyException 'bridge absent' with backtrace

我已排除堆栈跟踪。如果您希望我包含堆栈跟踪,请发表评论。

随机消息

有时控制台中会出现另一条消息。

2017-11-26 11:09:14.994459+1030 Buttons[28532:1663094] [User Defaults] Couldn't read values in CFPrefsPlistSource<0x6000000e6b80> (Domain: com.apple.PowerManagement, User: kCFPreferencesAnyUser, ByHost: Yes, Container: (null), Contents Need Refresh: Yes): accessing preferences outside an application's container requires user-preference-read or file-read-data sandbox access, detaching from cfprefsd

路径

调用SDL_GetPrefPath 在此应用程序中产生不同的路径。

这个应用程序

SDL_GetPrefPath("company", "my app") -> "/Users/indikernick/Library/Containers/company.my-app/Data/Library/Application Support/company/my app/"

另一个未损坏的应用程序

SDL_GetPrefPath("company", "my app") -> "/Users/indikernick/Library/Application Support/company/my app/"

就是这样

我很确定所有这些问题都是相关的。该项目位于Github,因此如果您在检查项目设置之前已经看到此问题。如果重要的话,我正在使用 Xcode 9.0 和 MacOS 10.13.1

提前感谢您的帮助。

【问题讨论】:

    标签: c++ xcode macos opengl


    【解决方案1】:

    看起来您的应用程序(不知何故)被沙盒化了。这从 SDL_GetPrefPath 返回的路径(以~/Library/Containers 开头)和“随机”消息中可以看出,其中明确指出:

    访问应用程序容器外的首选项需要 用户偏好读取或文件读取数据沙箱访问

    弹出的错误信息也很可疑:您的应用似乎无权访问某些系统资源。

    如果您的应用启用了沙盒,您应该检查 xcode(即检查名为 .entitlements 的属性列表文件是否显示在项目导航器中)。

    更多关于沙盒的信息:https://developer.apple.com/library/content/documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html

    【讨论】:

    • 谢谢,沙盒是问题
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-04-08
    • 1970-01-01
    • 1970-01-01
    • 2014-03-24
    • 1970-01-01
    • 2013-03-01
    相关资源
    最近更新 更多