Xcode Crashes when setting PLATFORM_NAME to invalid value

Originator:segiddins
Number:rdar://39270270 Date Originated:08-Apr-2018 08:24 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 9.3
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Summary:
Setting a target’s build configuration setting of `PLATFORM_NAME` to anything that is not a valid platform name causes a crash.

Steps to Reproduce:
Open the attached Xcode project. Alternatively, add a user defined build setting with the name PLATFORM_NAME and a value of `A`. Hit enter and sob.

Expected Results:
Xcode should be able to open the project without issue, and should only error when I go to build something.

Actual Results:
2018-04-08 20:11:52.539 xcodebuild[72217:14453984] [MT] DVTAssertions: ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-14133/DVTFoundation/MacroExpansion/DVTMacroDefinitionTable.mm:1401
Details:  macroName should be a non-empty string, but it is nil
Object:   <DVTMacroDefinitionTable: 0x7f8d4bf44120>
Method:   -objectForKeyedSubscript:
Thread:   <NSThread: 0x7f8d495177d0>{number = 1, name = main}
Hints: 

Backtrace:
  0   -[DVTAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation)
  1   _DVTAssertionHandler (in DVTFoundation)
  2   _DVTAssertionFailureHandler (in DVTFoundation)
  3   -[DVTMacroDefinitionTable objectForKeyedSubscript:] (in DVTFoundation)
  4   -[PBXTarget createMacroExpansionScopeWithBuildParameters:] (in DevToolsCore)
  5   -[PBXTarget cachedMacroExpansionScopeForBuildParameters:] (in DevToolsCore)
  6   -[PBXTarget expandedValueForString:forBuildParameters:] (in DevToolsCore)
  7   -[PBXNativeTarget builtProductsLocationForBuildParameters:] (in DevToolsCore)
  8   -[Xcode3FileReference resolutionContextForStrategies:] (in DevToolsCore)
  9   -[IDEContainerItem _absolutePath] (in IDEFoundation)
 10   -[IDEFileReference _absolutePath] (in IDEFoundation)
 11   -[IDEFileReference resolvedFilePath] (in IDEFoundation)
 12   -[Xcode3FileReference resolvedFilePath] (in DevToolsCore)
 13   -[IDEFileReference _resolveReferencedContainerExtension] (in IDEFoundation)
 14   -[IDEFileReference referencedContainerExtension] (in IDEFoundation)
 15   -[IDEContainer _locateFileReferencesRecursivelyInGroup:] (in IDEFoundation)
 16   -[IDEContainer _locateFileReferencesRecursivelyInGroup:] (in IDEFoundation)
 17   -[IDEContainer _locateFileReferencesRecursively] (in IDEFoundation)
 18   __46-[IDEContainer _didReadOperationWithFilePath:]_block_invoke (in IDEFoundation)
 19   -[DVTOperation main] (in DVTFoundation)
 20   -[IDEContainer _readAsyncIfPossibleFromFilePath:error:] (in IDEFoundation)
 21   -[IDEContainer initWithFilePath:extension:workspace:options:error:] (in IDEFoundation)
 22   -[Xcode3Project initWithFilePath:extension:workspace:options:error:] (in DevToolsCore)
 23   __82+[IDEContainer _retainedContainerAtFilePath:fileDataType:workspace:options:error:]_block_invoke_2 (in IDEFoundation)
 24   _dispatch_client_callout (in libdispatch.dylib)
 25   _dispatch_queue_barrier_sync_invoke_and_complete (in libdispatch.dylib)
 26   DVTDispatchBarrierSync (in DVTFoundation)
 27   -[DVTDispatchLock performLockedBlock:] (in DVTFoundation)
 28   __82+[IDEContainer _retainedContainerAtFilePath:fileDataType:workspace:options:error:]_block_invoke (in IDEFoundation)
 29   __58-[DVTModelObjectGraph performBlockCoalescingModelChanges:]_block_invoke (in DVTFoundation)
 30   -[DVTModelGraphTransactionScope performTransaction:] (in DVTFoundation)
 31   -[DVTModelObjectGraph performBlockCoalescingModelChanges:] (in DVTFoundation)
 32   +[IDEContainer _retainedContainerAtFilePath:fileDataType:workspace:options:error:] (in IDEFoundation)
 33   +[IDEContainer retainedContainerAtFilePath:fileDataType:workspace:error:] (in IDEFoundation)
 34   -[IDEWorkspace _configureWrappedWorkspaceWithError:] (in IDEFoundation)
 35   -[IDEWorkspace _setContainerFilePath:upgradeToWorkspace:error:] (in IDEFoundation)
 36   +[IDEContainer retainedWrappedWorkspaceForContainerAtFilePath:fileDataType:error:] (in IDEFoundation)
 37   -[Xcode3CommandLineBuildTool _resolveInputOptionsWithTimingSection:] (in Xcode3Core)
 38   -[Xcode3CommandLineBuildTool run] (in Xcode3Core)
 39   main (in xcodebuild)
 40   start (in libdyld.dylib)


Version:
Xcode 9.3

Notes:

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!