XCode 4:添加文件/组时崩溃并且未清理项目

时间:2012-04-06 09:26:56

标签: ios xcode ios4 crash

我的某个项目存在以下问题:

如果我向其添加任何文件或组,XCode会在不久之后停止并崩溃。如果我在此之前做一个项目清理,它就可以正常工作。一旦我进行了项目构建,如果我尝试添加文件,它将再次崩溃。

有什么想法吗?寻找解决方案,但没有任何运气。我正在使用最新的XCode 4.3.2 - 新的安装没有帮助。

XCode的崩溃报告:

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)

我发现了一些其他信息:

我在另一台计算机上试过这个 - 效果相同。但是,这可能很重要:它只发生在我真正的iPhone构建之后。如果我为模拟器做一个构建 - 一切正常,没有崩溃发生。一旦我进行了“真正的”iOS构建(调试或发布) - 如果我进行任何项目更改,它就会崩溃。

1 个答案:

答案 0 :(得分:1)

好的 - 这确实有点帮助。它似乎是您设置目标的方式。请注意,版本号,Bundle Identifier和所有这些“iOS Application Target”值不会存储在project.pbxproj文件中,而是写入“MyApp-Info.plist”文件。我会检查该文件是否存在,并且与该目标的INFOPLIST_FILE构建设置中设置的值正确关联。

我还要检查主项目文件本身是“项目格式”是否设置为“XCode 3.2兼容”,而不是3.1兼容。