4

我的一个项目有以下问题:

如果我向其中添加任何文件或组,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 构建(调试或发布)——如果我对项目进行任何更改,它就会崩溃。

4

1 回答 1

1

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

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

于 2012-04-11T15:20:51.547 回答