【问题标题】:Xcode 7 Playground execution EXC_BAD_ACCESSXcode 7 Playground 执行 EXC_BAD_ACCESS
【发布时间】:2015-08-04 02:27:23
【问题描述】:

在 Xcode 7 Playgrounds 中运行最简单的默认代码...得到以下错误

Playground execution failed: Execution was interrupted, reason: EXC_BAD_ACCESS (code=1, address=0x8). * thread #1: tid = 0x351bc3, 0x00000001062019ca libicucore.A.dylib`utext_clone + 22, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x8) * frame #0: 0x00000001062019ca libicucore.A.dylib`utext_clone + 22 frame #1: 0x000000010633ac42 libicucore.A.dylib`icu::RegexMatcher::reset(UText*) + 54 frame #2: 0x0000000106375414 libicucore.A.dylib`uregex_setText + 222 frame #3: 0x0000000103d1b445 Foundation`-[NSRegularExpression(NSMatching) enumerateMatchesInString:options:range:usingBlock:] + 2325 frame #4: 0x0000000103d65d7e Foundation...

基本上不能在操场上运行任何东西。

运行 beta 4 (7A165t)

我也有 Xcode 6.2 在同一台 Mac 上运行 Playground。

【问题讨论】:

    标签: swift-playground xcode7


    【解决方案1】:

    完全重新安装所有版本的 Xcode 并删除文件夹 Library/Developer 可修复问题(请参阅 https://forums.developer.apple.com/thread/13969)。

    【讨论】:

      【解决方案2】:

      我刚刚遇到了这个问题 - 在全新安装之前检查您是否没有从另一个 xcode 项目或上一个会话的任何地方在后台运行 IOS 模拟器。一旦我关闭 IOS 模拟器,关闭 xcode 并重新启动并再次打开操场,它就可以正常工作了。似乎我在尝试打开多个模拟器时遇到了问题。

      【讨论】:

        【解决方案3】:

        EXC_BAD_ACCESS 尝试向已释放的对象发送消息时抛出异常。 Apple 为机制提供了特殊的类 NSZombie,它替换了内存中每个已释放的对象。

        您可以在以下链接中找到更多详细信息:

        http://www.touch-code-magazine.com/how-to-debug-exc_bad_access/

        http://loufranco.com/blog/understanding-exc_bad_access

        【讨论】:

        • 感谢您提供详细信息,但这并没有回答问题..这就是为什么即使使用最简单的代码我每次都会收到错误。
        • 这无论如何都不能解决原始发布者的问题,即许多 Xcode 7 用户默认会破坏 Playgrounds。
        猜你喜欢
        • 1970-01-01
        • 2015-11-15
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-11-09
        相关资源
        最近更新 更多