facebookarchive / xctool

An extension for Apple's xcodebuild that makes it easier to test iOS and macOS apps.
Apache License 2.0
6.91k stars 738 forks source link

Crash in TestableExecutionInfo in xctool 0.2.10 [Xcode 7.3] #693

Closed alanzeino closed 8 years ago

alanzeino commented 8 years ago
2016-04-18 21:07:00.991 xctool[75226:6499708] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** setObjectForKey: key cannot be nil'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff9111abd2 __exceptionPreprocess + 178
    1   libobjc.A.dylib                     0x00007fff93a534fa objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff91014ca4 -[__NSDictionaryM setObject:forKey:] + 1236
    3   xctool                              0x0000000100d86d00 BuildSettingsFromOutput + 848
    4   xctool                              0x0000000100dc92e6 +[TestableExecutionInfo testableBuildSettingsForProject:target:objRoot:symRoot:sharedPrecompsDir:targetedDeviceFamily:xcodeArguments:testSDK:error:] + 1250
    5   xctool                              0x0000000100d9e935 __56-[RunTestsAction runTestables:options:xcodeSubjectInfo:]_block_invoke + 722
    6   libdispatch.dylib                   0x00007fff8b6008ff _dispatch_call_block_and_release + 12
    7   libdispatch.dylib                   0x00007fff8b5f5453 _dispatch_client_callout + 8
    8   libdispatch.dylib                   0x00007fff8b5fa083 _dispatch_queue_drain + 754
    9   libdispatch.dylib                   0x00007fff8b6006c9 _dispatch_queue_invoke + 549
    10  libdispatch.dylib                   0x00007fff8b5f8d9b _dispatch_root_queue_drain + 538
    11  libdispatch.dylib                   0x00007fff8b5f8b48 _dispatch_worker_thread3 + 91
    12  libsystem_pthread.dylib             0x00007fff95edc4f2 _pthread_wqthread + 1129
    13  libsystem_pthread.dylib             0x00007fff95eda375 start_wqthread + 13
)
alanzeino commented 8 years ago

Specifically, it seems nil is being passed into BuildSettingsFromOutput() here:

NSDictionary *allSettings = BuildSettingsFromOutput(output[@"stdout"]);

ExtremeMan commented 8 years ago

Sorry, we have never had a chance to look into this. Can you please try version 0.3 (should be soon available via homebrew) and open a new issue if you still see a problem with xctool? Thanks!