3

我正在尝试使用最新版本的 Xcode 5.0.2(今天更新)打开一个项目。由于某种原因,它崩溃了。我无法打开任何项目,它总是崩溃:(崩溃报告是这样开始的(如果有帮助的话):

Process:         Xcode [1631]
Path:            /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier:      com.apple.dt.Xcode
Version:         5.0.2 (3335.32)
Build Info:      IDEApplication-3335032000000000~4
App Item ID:     497799835
App External ID: 106632651
Code Type:       X86-64 (Native)
Parent Process:  launchd [133]
Responsible:     Xcode [1631]
User ID:         501

Date/Time:       2013-11-12 18:14:14.782 +0100
OS Version:      Mac OS X 10.9 (13A603)
Report Version:  11
Anonymous UUID:  041E96A2-1123-3287-3FF6-A3F30382FC69

Sleep/Wake UUID: C6807823-3147-4602-B01F-A2A9E80B8259

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

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

Application Specific Information:
ProductBuildVersion: 5A3005
ASSERTION FAILURE in /SourceCache/DVTFoundation/DVTFoundation-3542/Framework/Classes/FileTypes/DVTFileDataType.m:616
Details:  stringRep should be a non-empty string, but it is nil
Object:   <DVTFileDataType>
Method:   +fileDataTypeFromStringRepresentation:
Thread:   <NSThread: 0x7fc7d9d151c0>{name = (null), num = 1}
Hints:   None
Backtrace:
  0  0x0000000102e69ea8 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:messageFormat:arguments:] (in IDEKit)
  1  0x0000000101bf17a5 _DVTAssertionHandler (in DVTFoundation)
  2  0x0000000101bf1ad4 _DVTAssertionFailureHandler (in DVTFoundation)
  3  0x0000000101b8ca94 +[DVTFileDataType fileDataTypeFromStringRepresentation:] (in DVTFoundation)
  4  0x0000000107fa5dd0 -[Xcode3TargetProduct fileDataType] (in DevToolsCore)
  5  0x00000001025f25ce -[IDEBuildableProductRunnable runnableUTIType:] (in IDEFoundation)
  6  0x00000001025ee340 -[IDEProfileSchemeAction _updateAnalysisToolService] (in IDEFoundation)
  7  0x0000000101c02bc8 __73-[DVTObservingBlockToken observeValueForKeyPath:ofObject:change:context:]_block_invoke (in DVTFoundation)
  8  0x0000000101c19e88 DVTInvokeWithStrongOwnership (in DVTFoundation)
  9  0x0000000101b58479 -[DVTObservingBlockToken observeValueForKeyPath:ofObject:change:context:] (in DVTFoundation)
 10  0x00007fff90c4bc18 NSKeyValueNotifyObserver (in Foundation)
 11  0x00007fff90c4ade8 NSKeyValueDidChange (in Foundation)
 12  0x00007fff90c4fa56 -[NSObject(NSKeyValueObserverNotification) didChangeValueForKey:] (in Foundation)
 13  0x0000000102f6b395 -[IDEContextAutocreationController addBuildable:toScheme:] (in IDEKit)
 14  0x0000000102f6bd68 -[IDEContextAutocreationController createSchemeForBuildable:withName:] (in IDEKit)
 15  0x0000000102f6b16d -[IDEContextAutocreationController createDefaultSchemeForBuildable:] (in IDEKit)
 16  0x0000000102cf2976 -[IDEContextAutocreationController autocreateSchemesForcingAutocreate:] (in IDEKit)
 17  0x0000000101c03618 -[NSObject(DVTObservingConvenience) _dvt_newObserverForKeyPath:options:owner:withHandlerBlock:] (in DVTFoundation)
 18  0x0000000101b57fc5 -[NSObject(DVTObservingConvenience) dvt_newObserverForKeyPath:options:owner:withHandlerBlock:] (in DVTFoundation)
 19  0x0000000101c0326c -[NSObject(DVTObservingConvenience) dvt_addObserverForKeyPath:options:owner:withHandlerBlock:] (in DVTFoundation)
 20  0x0000000102f6a11e __53-[IDEContextAutocreationController initForWorkspace:]_block_invoke_2 (in IDEKit)
 21  0x0000000101c03618 -[NSObject(DVTObservingConvenience) _dvt_newObserverForKeyPath:options:owner:withHandlerBlock:] (in DVTFoundation)
 22  0x0000000101b57fc5 -[NSObject(DVTObservingConvenience) dvt_newObserverForKeyPath:options:owner:withHandlerBlock:] (in DVTFoundation)
 23  0x0000000101c0326c -[NSObject(DVTObservingConvenience) dvt_addObserverForKeyPath:options:owner:withHandlerBlock:] (in DVTFoundation)
 24  0x0000000102f69e8b __53-[IDEContextAutocreationController initForWorkspace:]_block_invoke (in IDEKit)
 25  0x0000000101c02bc8 __73-[DVTObservingBlockToken observeValueForKeyPath:ofObject:change:context:]_block_invoke (in DVTFoundation)
 26  0x0000000101c19e88 DVTInvokeWithStrongOwnership (in DVTFoundation)
 27  0x0000000101b58479 -[DVTObservingBlockToken observeValueForKeyPath:ofObject:change:context:] (in DVTFoundation)
 28  0x00007fff90c4bc18 NSKeyValueNotifyObserver (in Foundation)
 29  0x00007fff90c4ade8 NSKeyValueDidChange (in Foundation)
 30  0x00007fff90c4fa56 -[NSObject(NSKeyValueObserverNotification) didChangeValueForKey:] (in Foundation)
 31  0x000000010268481a __81-[IDEWorkspace _finishLoadingAsynchronously:shouldUpgradeFromSimpleFilesFocused:]_block_invoke (in IDEFoundation)
 32  0x0000000102684ac1 __81-[IDEWorkspace _finishLoadingAsynchronously:shouldUpgradeFromSimpleFilesFocused:]_block_invoke281 (in IDEFoundation)
 33  0x00007fff90c6b055 -[NSBlockOperation main] (in Foundation)
 34  0x00007fff90c4a591 -[__NSOperationInternal _start:] (in Foundation)
 35  0x00007fff90c4a23b __NSOQSchedule_f (in Foundation)
 36  0x00007fff852dc2ad _dispatch_client_callout (in libdispatch.dylib)
 37  0x00007fff852e3f03 _dispatch_main_queue_callback_4CF (in libdispatch.dylib)
 38  0x00007fff859b9839 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ (in CoreFoundation)
 39  0x00007fff85974b14 __CFRunLoopRun (in CoreFoundation)
 40  0x00007fff85974275 CFRunLoopRunSpecific (in CoreFoundation)
 41  0x00007fff8bc2ef0d RunCurrentEventLoopInMode (in HIToolbox)
 42  0x00007fff8bc2ecb7 ReceiveNextEventCommon (in HIToolbox)
 43  0x00007fff8bc2eabc _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox)
 44  0x00007fff8b0af28e _DPSNextEvent (in AppKit)
 45  0x00007fff8b0ae8db -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in AppKit)
 46  0x00007fff8b0a29cc -[NSApplication run] (in AppKit)
 47  0x00007fff8b08d803 NSApplicationMain (in AppKit)
 48  0x00007fff899005fd start (in libdyld.dylib)
4

2 回答 2

7

此类崩溃的最常见原因是 DerivedData 目录损坏。您可以删除此目录(我们中的许多人会定期这样做,只是为了让事情更稳定)。

  • 打开 Xcode
  • 喜好
  • 地点
  • 派生数据选项将告诉您目录在哪里
  • 删除那个目录
  • 尝试打开您的项目

就个人而言,我为派生数据选择“自定义”,并将其放入/tmp/xcode-build. 这会在我每次重新启动时删除目录,并且在我想手动删除它时比默认更容易键入。


编辑:一个更常见的问题:升级 Xcode 后您经常需要重新启动。从 Xcode 5 开始,这已经不是什么大问题了,但它仍然值得尝试,尤其是当您从 Xcode 4 升级时。

于 2013-11-12T17:33:19.637 回答
0

没有什么对我有用。我删除我的 .xcworkspace 并通过 pod install 重新生成 .xcworkspace 并为我工作。但在您这样做之前进行备份。

于 2019-12-09T05:16:15.150 回答