为框架项目并行运行单元测试时,Xcode 11崩溃

Sco*_*Coy 8 xcode frameworks unit-testing

第一个测试将启动,大约半秒钟后,Xcode将锁定,而不是启动另一个测试。之后大约30秒,Xcode崩溃,我得到以下崩溃日志(请参见下文)。

  • 在我升级到Xcode 11之后,这开始发生。
  • 如果我以串行方式运行单元测试,则效果很好。
  • 奇怪的是,这似乎只发生在我的2018 Macbook Pro上。在其他Macbook和Mac Mini上,单元测试能够并行运行测试而不会崩溃。
  • 它仅在单元测试中发生。我可以并行运行项目的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)
Run Code Online (Sandbox Code Playgroud)

Dea*_*ltz 2

错误代码似乎是指缺少父进程,用问号和返回代码表示[1],或者表示 PID 负责该函数。DVTFramework 可能有问题吗?如果问题仍然存在,我建议联系 Apple。

编辑

是的,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)```
Run Code Online (Sandbox Code Playgroud)