使用XCode 7运行单元测试目标时崩溃

时间:2015-09-27 00:05:16

标签: ios objective-c xcode

这仅在使用iOS 9 SDK的XCode 7中发生 - EXC_BAD_ACCESS

中的行return UIApplicationMain(argc, argv, nil, nil);中的错误为int main(int argc, char *argv[])

另见一堆日志输出如下: ObjectiveC.gcda: cannot merge previous GCDA file: corrupt arc tag (0x614e6269)

堆栈跟踪:

#0  0x017a71e6 in llvm_gcda_emit_function ()
#1  0x001a8556 in __llvm_gcov_writeout ()
#2  0x017a8162 in llvm_writeout_files ()
#3  0x07a400bc in __cxa_finalize_ranges ()
#4  0x07a40159 in __cxa_finalize ()
#5  0x07a40474 in exit ()
#6  0x05cdd099 in ___XCTestMain_block_invoke ()
#7  0x05cdd0b3 in ___XCTestMain_block_invoke_2 ()
#8  0x05c89122 in -[XCTestDriver _runSuite] ()
#9  0x05c8a128 in -[XCTestDriver _checkForTestManager] ()
#10 0x05c8a5fd in -[XCTestDriver runTestConfiguration:completionHandler:] ()
#11 0x05cdce12 in _XCTestMain ()
#12 0x025f85eb in ____XCBundleInjection_block_invoke_2 ()
#13 0x06b9ad00 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ ()
#14 0x06b90683 in __CFRunLoopDoBlocks ()
#15 0x06b8fdb8 in __CFRunLoopRun ()
#16 0x06b8f706 in CFRunLoopRunSpecific ()
#17 0x06b8f51b in CFRunLoopRunInMode ()
#18 0x0879c664 in GSEventRunModal ()
#19 0x0879c4a1 in GSEventRun ()
#20 0x047dc28f in UIApplicationMain ()
#21 0x00400794 in main at /Users/al/dev/ios/hinge-dev/Hinge/main.m:18
#22 0x07992a21 in start ()

我尝试更改一堆XCode构建设置以禁用代码覆盖但没有成功。任何帮助表示赞赏!

1 个答案:

答案 0 :(得分:1)

在所有构建目标中禁用代码覆盖率修复了此问题,请在此处回答:Dozens of "profiling:invalid arc tag" when running code coverage in Xcode 5