xcodebuild crashes when sdk parameter is present

Originator:djbazztuner
Number:rdar://33613666 Date Originated:30-Jul-2017 07:45 PM
Status:Duplicate/33125709 Resolved:Closed
Product:Developer Tools Product Version:Xcode 9 beta 4
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Summary:
When running the following command xcodebuild crashes.

/usr/bin/xcrun xcodebuild -workspace ./DBNetworkStack.xcworkspace -scheme DBNetworkStack -configuration Release -sdk iphoneos clean build

Build settings from command line:
    SDKROOT = iphoneos11.0

Removing '/Users/dennis/Library/Developer/Xcode/DerivedData/DBNetworkStack-eiyibtvghbwcrwcqoovmcmrdfveo/Build'
2017-07-30 19:41:37.753 xcodebuild[68158:4629974]  DVTAssertions: ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEPlugins_XCBuildSupport/IDEPlugins-13209.6/XCBuildSupport/ServiceSupport/IDEXCBuildProvisioning.m:119
Details:  (sdk) should not be nil.
Function: void IDEXCBuildProvisioningTaskInputs(XCBProvisioningTaskInputsSourceData * _Nonnull __strong, IDEProvisioningManager * _Nonnull __strong, id<IDEProvisionable>  _Nonnull __strong, IDERunDestination * _Nullable __strong, void (^ _Nonnull __strong)(XCBProvisioningTaskInputs * _Nonnull __strong))
Thread:   <NSThread: 0x7fb5d8d01af0>{number = 12, name = (null)}
Hints: 

Backtrace:
  0   -[DVTAssertionHandler handleFailureInFunction:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation)
  1   _DVTAssertionHandler (in DVTFoundation)
  2   _DVTAssertionFailureHandler (in DVTFoundation)
  3   IDEXCBuildProvisioningTaskInputs (in XCBuildSupport)
  4   -[IDEXCBuildServiceBuildOperation provisioningTaskInputsWithTargetGUID:provisioningSourceData:completion:] (in XCBuildSupport)
  5  0x000000011ab33169 (in XCBuild)
  6  0x000000011ab3b9e8 (in XCBuild)
  7  0x000000011ab39361 (in XCBuild)
  8  0x000000011ab3b55c (in XCBuild)
  9  0x000000011ab55560 (in XCBuild)
 10   __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ (in Foundation)
 11   -[NSBlockOperation main] (in Foundation)
 12   -[__NSOperationInternal _start:] (in Foundation)
 13   __NSOQSchedule_f (in Foundation)
 14   _dispatch_client_callout (in libdispatch.dylib)
 15   _dispatch_queue_serial_drain (in libdispatch.dylib)
 16   _dispatch_queue_invoke (in libdispatch.dylib)
 17   _dispatch_root_queue_drain (in libdispatch.dylib)
 18   _dispatch_worker_thread3 (in libdispatch.dylib)
 19   _pthread_wqthread (in libsystem_pthread.dylib)
 20   start_wqthread (in libsystem_pthread.dylib)
Abort trap: 6

Steps to Reproduce:
Run this command from cli:
/usr/bin/xcrun xcodebuild -workspace ./DBNetworkStack.xcworkspace -scheme DBNetworkStack -configuration Release -sdk iphoneos clean build

Expected Results:
Xcodebuild should build correctly for the selected sdk

Observed Results:
Xcodebuild crash with:
DVTAssertions: ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEPlugins_XCBuildSupport/IDEPlugins-13209.6/XCBuildSupport/ServiceSupport/IDEXCBuildProvisioning.m:119
Details:  (sdk) should not be nil.
Function: void IDEXCBuildProvisioningTaskInputs(XCBProvisioningTaskInputsSourceData * _Nonnull __strong, IDEProvisioningManager * _Nonnull __strong, id<IDEProvisionable>  _Nonnull __strong, IDERunDestination * _Nullable __strong, void (^ _Nonnull __strong)(XCBProvisioningTaskInputs * _Nonnull __strong))
Thread:   <NSThread: 0x7fb5d8d01af0>{number = 12, name = (null)}
Hints:

Version:
Xcode: Version 9.0 beta 4 (9M189t
macOS: Version 10.12.6 (16G29)

Notes:
I tried to build this project: https://github.com/dbsystel/DBNetworkStack/tree/swift4

Configuration:
If you specify any sdk using -sdk it crashes. If you do not specify any sdk it builds.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!