【问题标题】:xcrun simctl list : Assertion failure in NSDictionaryxcrun simctl list : NSDictionary 中的断言失败
【发布时间】:2018-12-30 15:22:15
【问题描述】:

在 xcrun simctl list 看到错误时看到下面的错误日志,任何人都知道为什么我会看到这个?

xcrun simctl list
2018-12-30 15:17:48.636 simctl[66720:6180396] *** Assertion failure in NSDictionary * _Nullable rock_XPCObjectToNSDictionary(xpc_object_t  _Nonnull __strong, ROCKSessionManager * _Nullable __strong, NSError * _Nullable __autoreleasing * _Nullable)(), /BuildRoot/Library/Caches/com.apple.xbs/Sources/ROCKit/ROCKit-24/ROCKit/NSDictionary+ROCK.m:172
2018-12-30 15:17:48.636 simctl[66720:6180396] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'API VIOLATION: rock_XPCObjectToNSDictionary would have returned nil without an error set.'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff432cf43d __exceptionPreprocess + 256
    1   libobjc.A.dylib                     0x00007fff6f1dc720 objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff432ea08e +[NSException raise:format:arguments:] + 98
    3   Foundation                          0x00007fff456d563d -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
    4   ROCKit                              0x00007fff667e3fc4 rock_XPCObjectToNSDictionary + 1979
    5   CoreSimulator                       0x000000010fa2cd3c __50-[SimDeviceSet subscribeToNotificationsWithError:]_block_invoke + 44
    6   libxpc.dylib                        0x00007fff704db605 xpc_array_apply + 57
    7   CoreSimulator                       0x000000010fa2c9ae -[SimDeviceSet subscribeToNotificationsWithError:] + 866
    8   CoreSimulator                       0x000000010f9fc9cd __45-[SimServiceContext deviceSetWithPath:error:]_block_invoke + 741
    9   libdispatch.dylib                   0x00007fff7025bdcb _dispatch_client_callout + 8
    10  libdispatch.dylib                   0x00007fff70267a28 _dispatch_lane_barrier_sync_invoke_and_complete + 60
    11  CoreSimulator                       0x000000010f9fc516 -[SimServiceContext deviceSetWithPath:error:] + 249
    12  CoreSimulator                       0x000000010f9fc3f9 -[SimServiceContext defaultDeviceSetWithError:] + 71
    13  simctl                              0x000000010f98686f simctl + 67695
    14  simctl                              0x000000010f998b39 simctl + 142137
    15  libdispatch.dylib                   0x00007fff7025ad4f _dispatch_call_block_and_release + 12
    16  libdispatch.dylib                   0x00007fff7025bdcb _dispatch_client_callout + 8
    17  libdispatch.dylib                   0x00007fff70269e74 _dispatch_root_queue_drain + 671
    18  libdispatch.dylib                   0x00007fff7026a4b1 _dispatch_worker_thread2 + 90
    19  libsystem_pthread.dylib             0x00007fff7049b6ee _pthread_wqthread + 619
    20  libsystem_pthread.dylib             0x00007fff7049b415 start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6

【问题讨论】:

  • 最重要的信息是 rock_XPCObjectToNSDictionary 在没有错误集的情况下会返回 nil。也许你应该设置错误参数。
  • 我不得不删除我的 xcode 并使用新副本,错误消失了,可能是我的 xcode 已损坏。
  • 如果问题得到解决,请将解决方案作为答案发布,否则删除问题...谢谢!
  • 在将旧版本的 Xcode (10.1) 与“主”版本 (10.2) 并排安装后,我遇到了同样的问题。我不必重新安装 Xcode 本身来解决这个问题,而只需重新安装命令行工具。希望它可以帮助某人。

标签: ios xcode xcrun


【解决方案1】:

我不得不删除我的 xcode 并安装一个新副本,错误消失了,可能是我的 xcode 已损坏。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-02-10
    • 2011-05-27
    • 1970-01-01
    • 2017-08-07
    • 2012-08-01
    相关资源
    最近更新 更多