XCode 4: Crash when adding files / groups and the project is not cleaned up
I have the following problem with one of my projects:
If I add any file or group to it, Xcode will quickly close and crash. If I do the project before then it works fine. Once I create the project, it crashes again if I try to add files.
Any ideas? looking for a solution, but no luck. I am using the newest XCode 4.3.2. The new setting didn't help.
Xcode Crash Report:
Process: Xcode [7017]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 4.3.2 (1177)
Build Info: IDEApplication-1177000000000000~6
App Item ID: 497799835
App External ID: 7171108
Code Type: X86-64 (Native)
Parent Process: launchd [139]
Date/Time: 2012-04-11 16:46:18.177 +0200
OS Version: Mac OS X 10.7.3 (11D50)
Report Version: 9
Interval Since Last Report: 137545 sec
Crashes Since Last Report: 10
Per-App Interval Since Last Report: 135817 sec
Per-App Crashes Since Last Report: 10
Anonymous UUID: F3C112A1-E15B-4D44-9662-F13A93846AE0
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
ProductBuildVersion: 4E2002
UNCAUGHT EXCEPTION (NSInvalidArgumentException): -[PBXFolder targets]: unrecognized selector sent to instance 0x40b7b63e0
UserInfo: (null)
Hints: None
Backtrace:
0 0x00007fff95298faa __exceptionPreprocess (in CoreFoundation)
1 0x00007fff99458d5e objc_exception_throw (in libobjc.A.dylib)
2 0x00007fff953252ae -[NSObject doesNotRecognizeSelector:] (in CoreFoundation)
3 0x00007fff95285e73 ___forwarding___ (in CoreFoundation)
4 0x00007fff95285c88 _CF_forwarding_prep_0 (in CoreFoundation)
5 0x000000011175717e -[XCProjectReferenceInfo _synchronizeWithReferencedProjectIfNeeded] (in DevToolsCore)
6 0x0000000111757dc2 -[XCProjectReferenceInfo archivableInfoDictionary] (in DevToolsCore)
7 0x000000010dfd3c47 -[NSArray(DVTFoundationClassAdditions) dvt_arrayByApplyingSelector:] (in DVTFoundation)
8 0x000000011166057d -[PBXProject _projectReferences] (in DevToolsCore)
9 0x000000011164912a -[PBXArchivingBinding writeValueForObject:toPListArchiver:] (in DevToolsCore)
10 0x0000000111648158 -[PBXObject _archiveValuesForArchiveMask:toPListArchiver:] (in DevToolsCore)
11 0x0000000111672997 -[PBXPListArchiver _archiveObject:asWeakReference:] (in DevToolsCore)
12 0x00000001116734e6 -[PBXPListArchiver initWithRootObject:delegate:role:] (in DevToolsCore)
13 0x0000000111650018 -[PBXProject writeToFile:projectFile:userFile:outResultNotification:] (in DevToolsCore)
14 0x00000001116505a4 -[PBXProject _writeToFileSystemProjectFile:userFile:checkNeedsRevert:] (in DevToolsCore)
15 0x0000000111650655 -[PBXProject writeToFileSystemProjectFile:userFile:checkNeedsRevert:] (in DevToolsCore)
16 0x00000001117ee0bb -[Xcode3Project writeToFilePath:forceWrite:error:] (in DevToolsCore)
17 0x000000010e68cf2d -[IDEContainer _saveContainerForAction:error:] (in IDEFoundation)
18 0x00007fff920caf64 __NSFireTimer (in Foundation)
19 0x00007fff9524dc24 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ (in CoreFoundation)
20 0x00007fff9524d776 __CFRunLoopDoTimer (in CoreFoundation)
21 0x00007fff9522e001 __CFRunLoopRun (in CoreFoundation)
22 0x00007fff9522d676 CFRunLoopRunSpecific (in CoreFoundation)
23 0x00007fff965d331f RunCurrentEventLoopInMode (in HIToolbox)
24 0x00007fff965da51b ReceiveNextEventCommon (in HIToolbox)
25 0x00007fff965da456 BlockUntilNextEventMatchingListInMode (in HIToolbox)
26 0x00007fff91411f5d _DPSNextEvent (in AppKit)
27 0x00007fff91411861 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in AppKit)
28 0x00007fff9140e19d -[NSApplication run] (in AppKit)
29 0x00007fff9168cb88 NSApplicationMain (in AppKit)
30 0x000000010df8aeec (in Xcode)
Some additional information I found:
I tried this on another computer - same effect. But, and this can be important: it only happens after I actually create an iPhone. If I create an assembly for the simulator everything works fine and no crashes happen. Once I have done a "real" iOS build (debug or release) it will crash if I make any changes to the project.
source to share
Ok - it helps a little more. It looks like you have your goals set. Note that the version number and package ID and all those iOS Application Target values are not saved in the project.pbxproj file, but rather are written to the MyApp-Info.plist file. I would check that the file exists and correlates correctly with the value set in the build setting INFOPLIST_FILE
for this purpose.
I would also check that the main project file itself "Project Format" is set to "XCode 3.2-compatible" and not 3.1-compatible.
source to share