为什么打开项目时Xcode崩溃? [英] Why does Xcode crash when I open a project?

查看:272
本文介绍了为什么打开项目时Xcode崩溃?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm trying to open a project with the latest version of Xcode 5.0.2 (updated today). For some reason, it crashes. I can't open any project, it crashes all times :( Crash report begins like this (if helps):

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)

推荐答案

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

The most common cause of these kinds of crashes is a corrupted DerivedData directory. You can delete this directory (and many of us do this regularly, just to keep things more stable).

  • 打开Xcode
  • 首选项
  • 位置
  • 派生数据"选项将告诉您目录的位置
  • 删除该目录
  • 尝试打开您的项目

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

Personally, I select "Custom" for Derived Data, and put it in /tmp/xcode-build. This deletes the directory every time I reboot, and is easier to type than the default when I want to delete it by hand.

另一个常见问题:升级Xcode后,您通常需要重新启动.从Xcode 5开始,这个问题就不那么重要了,但是仍然值得尝试,尤其是当您从Xcode 4升级时.

One more common problem: you often need to reboot after upgrading Xcode. Since Xcode 5, that's been less of an issue, but it's still worth trying, especially if you're upgrading from Xcode 4.

这篇关于为什么打开项目时Xcode崩溃?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆