Xcode 11 在运行框架项目的并行单元测试时会崩溃。

8
第一个测试开始后,大约半秒钟后,Xcode会锁定,而不是启动另一个测试。大约30秒后,Xcode崩溃,并且我得到以下崩溃日志(见下文)。
  • 我升级到Xcode 11之后才出现这种情况。
  • 如果我串行运行单元测试,它就可以正常工作。
  • 奇怪的是,似乎只在我的2018年Macbook Pro上发生。在其他Macbooks和Mac Minis上,单元测试能够并行运行而不会崩溃。
  • 这只发生在单元测试中。我可以并行运行项目的UI测试。
  • 我在同一台机器上有另一个基于框架的项目也遇到了同样的问题。
  • 我已经尝试多次删除和重新安装Xcode。
  • 编辑:我刚刚尝试擦除Macbook的硬盘并重新安装Mac OS。问题仍然存在。
Process:               Xcode [823]
Path:                  /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier:            com.apple.dt.Xcode
Version:               11.0 (14936)
Build Info:            IDEFrameworks-14936000000000000~3
App Item ID:           497799835
App External ID:       832762837
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Xcode [823]
User ID:               501

Date/Time:             2019-09-23 16:39:38.684 -0700
OS Version:            Mac OS X 10.14.6 (18G95)
Report Version:        12
Bridge OS Version:     3.6 (16P6571)
Anonymous UUID:        BC74C3A5-0B03-9716-16C5-8C448AD75627


Time Awake Since Boot: 1600 seconds

System Integrity Protection: enabled

Crashed Thread:        27

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
ProductBuildVersion: 11A420a
ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-14899/DVTFoundation/Multicore/DVTFuture.mm:376
Details:  Attempted to transition to the failed state, but did not provide an error.
<DVTFuture 0x7fc173624f60 Running>
    Progress:    Initial
    Result:      (null)
    Error:       (null)
    Started at:    0   -[DVTFuture init] (in DVTFoundation)
  1   -[DVTFuture initWithBlock:] (in DVTFoundation)
  2   +[DVTFuture futureWithBlock:] (in DVTFoundation)
  3   -[DVTiPhoneSimulator launchSimulatedExecutable:launchService:error:] (in IDEiOSSupportCore)
  4   __55-[IDELaunchiPhoneSimulatorLauncher performWorkerAction]_block_invoke (in IDEiOSSupportCore)
  5   __43-[DVTDispatchLock asyncPerformLockedBlock:]_block_invoke (in DVTFoundation)
  6   __DVT_CALLING_CLIENT_BLOCK__ (in DVTFoundation)
  7   __DVTDispatchBarrierAsync_block_invoke (in DVTFoundation)
  8   _dispatch_call_block_and_release (in libdispatch.dylib)
  9   _dispatch_client_callout (in libdispatch.dylib)
 10   _dispatch_lane_serial_drain (in libdispatch.dylib)
 11   _dispatch_lane_invoke (in libdispatch.dylib)
 12   _dispatch_workloop_worker_thread (in libdispatch.dylib)
 13   _pthread_wqthread (in libsystem_pthread.dylib)
 14   start_wqthread (in libsystem_pthread.dylib)

    Finished at: (null)
Object:   <DVTFuture: 0x7fc173624f60>
Method:   -_internalSetState:result:error:
Thread:   <NSThread: 0x7fc17336ae40>{number = 81, name = (null)}
Hints:   

Backtrace:
  0   -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in IDEKit)
  1   _DVTAssertionHandler (in DVTFoundation)
  2   _DVTAssertionFailureHandler (in DVTFoundation)
  3   -[DVTFuture _internalSetState:result:error:] (in DVTFoundation)
  4   __35-[DVTFuture setState:result:error:]_block_invoke (in DVTFoundation)
  5   invocation function for block in decltype(fp0()) DVTDispatchLockPerformLockedWriterBlock<void () block_pointer () block_pointer __strong>(DVTDispatchLock*, void () block_pointer () block_pointer __strong) (in DVTFoundation)
  6   _dispatch_client_callout (in libdispatch.dylib)
  7   _dispatch_lane_barrier_sync_invoke_and_complete (in libdispatch.dylib)
  8   DVTDispatchBarrierSync (in DVTFoundation)
  9   -[DVTDispatchLock performLockedBlock:] (in DVTFoundation)
 10   decltype(fp0()) DVTDispatchLockPerformLockedWriterBlock<void () block_pointer () block_pointer __strong>(DVTDispatchLock*, void () block_pointer () block_pointer __strong) (in DVTFoundation)
 11   -[DVTFuture setState:result:error:] (in DVTFoundation)
 12   -[DVTFuture failWithError:] (in DVTFoundation)
 13   __68-[DVTiPhoneSimulator launchSimulatedExecutable:launchService:error:]_block_invoke (in IDEiOSSupportCore)
 14   -[DVTFuture initWithBlock:] (in DVTFoundation)
 15   +[DVTFuture futureWithBlock:] (in DVTFoundation)
 16   -[DVTiPhoneSimulator launchSimulatedExecutable:launchService:error:] (in IDEiOSSupportCore)
 17   __55-[IDELaunchiPhoneSimulatorLauncher performWorkerAction]_block_invoke (in IDEiOSSupportCore)
 18   __43-[DVTDispatchLock asyncPerformLockedBlock:]_block_invoke (in DVTFoundation)
 19   __DVT_CALLING_CLIENT_BLOCK__ (in DVTFoundation)
 20   __DVTDispatchBarrierAsync_block_invoke (in DVTFoundation)
 21   _dispatch_call_block_and_release (in libdispatch.dylib)
 22   _dispatch_client_callout (in libdispatch.dylib)
 23   _dispatch_lane_serial_drain (in libdispatch.dylib)
 24   _dispatch_lane_invoke (in libdispatch.dylib)
 25   _dispatch_workloop_worker_thread (in libdispatch.dylib)
 26   _pthread_wqthread (in libsystem_pthread.dylib)
 27   start_wqthread (in libsystem_pthread.dylib)
1个回答

2
错误代码似乎指向缺少父进程,用问号表示,以及返回码[1]或PID负责该功能。DVTFramework可能存在问题吗?如果问题仍然存在,建议联系苹果公司。
编辑:是的,根据错误提示,DVT似乎存在问题。
Method:   -_internalSetState:result:error:
Thread:   <NSThread: 0x7fc17336ae40>{number = 81, name = (null)}
Hints:   

Backtrace:
  0   -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in IDEKit)
  1   _DVTAssertionHandler (in DVTFoundation)
  2   _DVTAssertionFailureHandler (in DVTFoundation)
  3   -[DVTFuture _internalSetState:result:error:] (in DVTFoundation)
  4   __35-[DVTFuture setState:result:error:]_block_invoke (in DVTFoundation)
  5   invocation function for block in decltype(fp0()) DVTDispatchLockPerformLockedWriterBlock<void () block_pointer () block_pointer __strong>(DVTDispatchLock*, void () block_pointer () block_pointer __strong) (in DVTFoundation)
  6   _dispatch_client_callout (in libdispatch.dylib)
  7   _dispatch_lane_barrier_sync_invoke_and_complete (in libdispatch.dylib)
  8   DVTDispatchBarrierSync (in DVTFoundation)
  9   -[DVTDispatchLock performLockedBlock:] (in DVTFoundation)
 10   decltype(fp0()) DVTDispatchLockPerformLockedWriterBlock<void () block_pointer () block_pointer __strong>(DVTDispatchLock*, void () block_pointer () block_pointer __strong) (in DVTFoundation)
 11   -[DVTFuture setState:result:error:] (in DVTFoundation)
 12   -[DVTFuture failWithError:] (in DVTFoundation)
 13   __68-[DVTiPhoneSimulator launchSimulatedExecutable:launchService:error:]_block_invoke (in IDEiOSSupportCore)
 14   -[DVTFuture initWithBlock:] (in DVTFoundation)
 15   +[DVTFuture futureWithBlock:] (in DVTFoundation)
 16   -[DVTiPhoneSimulator launchSimulatedExecutable:launchService:error:] (in IDEiOSSupportCore)
 17   __55-[IDELaunchiPhoneSimulatorLauncher performWorkerAction]_block_invoke (in IDEiOSSupportCore)
 18   __43-[DVTDispatchLock asyncPerformLockedBlock:]_block_invoke (in DVTFoundation)
 19   __DVT_CALLING_CLIENT_BLOCK__ (in DVTFoundation)
 20   __DVTDispatchBarrierAsync_block_invoke (in DVTFoundation)
 21   _dispatch_call_block_and_release (in libdispatch.dylib)
 22   _dispatch_client_callout (in libdispatch.dylib)
 23   _dispatch_lane_serial_drain (in libdispatch.dylib)
 24   _dispatch_lane_invoke (in libdispatch.dylib)
 25   _dispatch_workloop_worker_thread (in libdispatch.dylib)
 26   _pthread_wqthread (in libsystem_pthread.dylib)
 27   start_wqthread (in libsystem_pthread.dylib)```

同意,我认为这是DVT库的问题。不幸的是,当我谷歌它时,唯一出现的东西就是“断开设备并重新连接”,而模拟器无法执行此操作。我希望能找到一种解决方案,而不必等待苹果端修复问题。 - Scott McCoy
尝试找到附近的苹果商店并咨询他们。他们可能能够手动重新安装和重启DVT lib服务。除此之外,我没有看到你能做什么。编辑:或在他们的网站上填写帮助请求。 - Vendetta
很抱歉,社区无法为修复苹果产品做更多的事情,但作为所有者,我相信您已经非常清楚他们的认证是专有和选择性的。 - Vendetta

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接