Xcode-beta (7A192o): Crash when opening a project (Cannot call addBuildFileRef: when file refs are frozen)

Originator:me
Number:rdar://22582174 Date Originated:04-Sep-2015
Status:Open Resolved:No
Product:Developer Tools Product Version:Xcode-beta (7A192o)
Classification:Crash Reproducible:Always
 
Summary:
Crash when opening a project on Xcode 7. The project is working fine on Xcode 6.4.

Steps to Reproduce:
Try to open the attached project.

Expected Results:
The project would open.

Actual Results:
Xcode crashes soon after opening the project.

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
ProductBuildVersion: 7A192o
ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-8181.3/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/TargetSnapshots/XCBuildFileRefDGSnapshot.m:474
Details:  Cannot call addBuildFileRef: when file refs are frozen
Object:   <XCBuildFileRefArrayDGSnapshot: 0x7f88ffbb7190>
Method:   -addBuildFileRef:
Thread:   <NSThread: 0x7f89004053a0>{number = 16, name = (null)}
Hints:   None
Backtrace:
  0  0x0000000110737574 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in IDEKit)
  1  0x000000010f2ff08a _DVTAssertionHandler (in DVTFoundation)
  2  0x000000010f2ff2a1 _DVTAssertionFailureHandler (in DVTFoundation)
  3  0x0000000117b610b4 -[XCBuildFileRefArrayDGSnapshot addBuildFileRef:] (in DevToolsCore)
  4  0x0000000117b3dadf -[XCBuildPhaseDGSnapshot(DependencyGraphCreation) groupDependencyNode:ifNecessaryForLaterProcessingWithMacroExpansionScope:] (in DevToolsCore)
  5  0x0000000117b51ce4 -[XCSourcesBuildPhaseDGSnapshot(DependencyGraphCreation) _processOutputNodes:forRegionVariantName:processedPaths:originalBuildRule:withMacroExpansionScope:] (in DevToolsCore)
  6  0x0000000117b504e7 -[XCSourcesBuildPhaseDGSnapshot(DependencyGraphCreation) _computeDependenciesForBuildFileReference:usingBuildRule:withMacroExpansionScope:processedPaths:] (in DevToolsCore)
  7  0x0000000117b5299e -[XCSourcesBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesForBuildFileReference:usingBuildRule:withMacroExpansionScope:] (in DevToolsCore)
  8  0x0000000117b52e4b -[XCSourcesBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesForBuildFileReference:withMacroExpansionScope:] (in DevToolsCore)
  9  0x0000000117b3e514 -[XCBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesForAllBuildFileReferencesWithMacroExpansionScope:] (in DevToolsCore)
 10  0x0000000117b55a2f -[XCSourcesBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesForAllBuildFileReferencesWithMacroExpansionScope:] (in DevToolsCore)
 11  0x0000000117b56e15 -[XCSourcesBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesWithMacroExpansionScope:] (in DevToolsCore)
 12  0x0000000117a8d535 -[XCProductTypeSpecification computeDependenciesWithMacroExpansionScope:] (in DevToolsCore)
 13  0x0000000117b36e80 -[XCNativeTargetDGSnapshot(DependencyGraphCreation) computeDependenciesWithMacroExpansionScope:] (in DevToolsCore)
 14  0x0000000117a0a2d5 -[PBXTargetBuildContext createDependencyGraphWithTargetDGSnapshot:] (in DevToolsCore)
 15  0x0000000117a264f7 -[PBXTargetBuildContext(DependencyGraphEvents) dg_setTargetSnapshot:] (in DevToolsCore)
 16  0x0000000117a25bbc -[PBXTargetBuildContext(DependencyGraphEvents) processDependencyGraphEvents] (in DevToolsCore)
 17  0x0000000117a851c2 -[XCBlockQueue _processNextBlockInThreadSlotNumber:] (in DevToolsCore)
 18  0x0000000117a85444 -[XCBlockQueue _processBlocksInThreadSlotNumber:] (in DevToolsCore)
 19  0x00007fff924c5084 __NSThread__start__ (in Foundation)
 20  0x00007fff9657a9b1 _pthread_body (in libsystem_pthread.dylib)
 21  0x00007fff9657a92e _pthread_body (in libsystem_pthread.dylib)
 22  0x00007fff96578385 thread_start (in libsystem_pthread.dylib)

Regression:
This worked on Xcode 6.4.

Notes:
The sample project is attached.

Comments

I am also experiencing this. I was getting it with the Xcode 7 beta 6 release so I ditched it. Previous beta releases were okay and ran alongside an Xcode 6.4 installation. I installed the Xcode 7 GM a couple of days ago and it was running okay for a day or two, but started crashing today. I am not using Cocoapods. I did just empty the ~/Library/Developer/CoreSimulator/Devices folder to get rid of duplicated simulators, but couldn't fix the issue when I restored this folder, so don't know if its related or not. Also tried reinstalling Xcode - no dice. Next step - install the El Capitan GM seed. If that doesn't work, then I'll have to reinstall Xcode 6.4. This is project-related. It crashes when opening a particular project - when indexing the files. Other projects are okay.

FIX: Installing Xcode 7.1 beta (7B60) fixes this issue.

By rohinton.collins at Sept. 14, 2015, 8:36 a.m. (reply...)

Me too

Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY

Application Specific Information: ProductBuildVersion: 7A218 ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-8184/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/TargetSnapshots/XCBuildFileRefDGSnapshot.m:474 Details: Cannot call addBuildFileRef: when file refs are frozen Object: Method: -addBuildFileRef: Thread: {number = 12, name = (null)} Hints: None Backtrace: 0 0x0000000106cf3904 -IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments: 1 0x00000001058be23e DVTAssertionHandler (in DVTFoundation) 2 0x00000001058be455 DVTAssertionFailureHandler (in DVTFoundation) 3 0x000000010e282234 -XCBuildFileRefArrayDGSnapshot addBuildFileRef: 4 0x000000010e25ec5f -XCBuildPhaseDGSnapshot(DependencyGraphCreation) groupDependencyNode:ifNecessaryForLaterProcessingWithMacroExpansionScope: 5 0x000000010e272e64 -XCSourcesBuildPhaseDGSnapshot(DependencyGraphCreation) _processOutputNodes:forRegionVariantName:processedPaths:originalBuildRule:withMacroExpansionScope: 6 0x000000010e271667 -XCSourcesBuildPhaseDGSnapshot(DependencyGraphCreation) _computeDependenciesForBuildFileReference:usingBuildRule:withMacroExpansionScope:processedPaths: 7 0x000000010e273b1e -XCSourcesBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesForBuildFileReference:usingBuildRule:withMacroExpansionScope: 8 0x000000010e273fcb -XCSourcesBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesForBuildFileReference:withMacroExpansionScope: 9 0x000000010e25f694 -XCBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesForAllBuildFileReferencesWithMacroExpansionScope: 10 0x000000010e276baf -XCSourcesBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesForAllBuildFileReferencesWithMacroExpansionScope: 11 0x000000010e277f95 -XCSourcesBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesWithMacroExpansionScope: 12 0x000000010e1ae6b5 -XCProductTypeSpecification computeDependenciesWithMacroExpansionScope: 13 0x000000010e258000 -XCNativeTargetDGSnapshot(DependencyGraphCreation) computeDependenciesWithMacroExpansionScope: 14 0x000000010e12b455 -PBXTargetBuildContext createDependencyGraphWithTargetDGSnapshot: 15 0x000000010e147677 -PBXTargetBuildContext(DependencyGraphEvents) dg_setTargetSnapshot: 16 0x000000010e146d3c -PBXTargetBuildContext(DependencyGraphEvents) processDependencyGraphEvents 17 0x000000010e1a6342 -XCBlockQueue _processNextBlockInThreadSlotNumber: 18 0x000000010e1a65c4 -XCBlockQueue _processBlocksInThreadSlotNumber: 19 0x00007fff8bf0b084 __NSThreadstart (in Foundation) 20 0x00007fff832bf9b1 pthreadbody (in libsystem_pthread.dylib) 21 0x00007fff832bf92e pthreadbody (in libsystem_pthread.dylib) 22 0x00007fff832bd385 thread_start (in libsystem_pthread.dylib)

abort() called

I'm also experiencing this same crash, same backtrace with the Xcode 7.0 GM Seed release just released yesterday

ProductBuildVersion: 7A218, Running under OS X 10.10.4

The project is one originally created with Xcode 4 I believe - but dutifully updated to Xcode 5 and Xcode 6 with no issues.. The project has some storyboards with autolayout turned off if that matters (for stuff that occurred before AutoLayout existed)

I cannot answer for the original reporter, however we do not use Cocoapods.

ProductBuildVersion: 7A218
ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-8184/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/TargetSnapshots/XCBuildFileRefDGSnapshot.m:474
Details:  Cannot call addBuildFileRef: when file refs are frozen
Object:   <XCBuildFileRefArrayDGSnapshot: 0x7feea9e76c50>
Method:   -addBuildFileRef:
Thread:   <NSThread: 0x7fee9fe21cd0>{number = 10, name = (null)}
Hints:   None
Backtrace:
  0  0x000000011099e904 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in IDEKit)
  1  0x000000010f56b23e _DVTAssertionHandler (in DVTFoundation)
  2  0x000000010f56b455 _DVTAssertionFailureHandler (in DVTFoundation)
  3  0x0000000119180234 -[XCBuildFileRefArrayDGSnapshot addBuildFileRef:] (in DevToolsCore)
  4  0x000000011915cc5f -[XCBuildPhaseDGSnapshot(DependencyGraphCreation)

Are you using Cocoapods by chance?

By reese.mclean at Sept. 9, 2015, 11:18 p.m. (reply...)

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!