Xcode 在启动时崩溃
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/34451126/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode crashes on launch
提问by Bernhard Miehl
I am developing an Application for iOS and I changed nothing in the Application. But at a restart of my Mac, Xcode crashes every time.
我正在为 iOS 开发一个应用程序,但我在应用程序中没有做任何更改。但是在我的 Mac 重新启动时,Xcode 每次都会崩溃。
Don't know if this is important, but my spotlight can't find any applications and also when I open the finder and using the shortcut cmd + shift + H I see a white window.
不知道这是否重要,但我的聚光灯找不到任何应用程序,而且当我打开查找器并使用快捷方式 cmd + shift + HI 时看到一个白色窗口。
Xcode isn't starting anymore and throws this error:
Xcode 不再启动并抛出此错误:
Process: Xcode [1346]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 7.2 (9548)
Build Info: IDEFrameworks-9548000000000000~7
App Item ID: 497799835
App External ID: 814662604
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [1346]
Date/Time: 2015-12-24 11:01:44.753 +0100
OS Version: Mac OS X 10.11.2 (15C50)
Report Version: 11
Time Awake Since Boot: 4000 seconds
System Integrity Protection: enabled
Crashed Thread: 4 Dispatch queue: DVTFilePathEventWatcher - event queue
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
VM Regions Near 0:
-->
__TEXT 0000000108a5a000-0000000108a5e000 [ 16K] r-x/rwx SM=COW /Applications/Xcode.app/Contents/MacOS/Xcode
Application Specific Information:
ProductBuildVersion: 7C68
Thread 0:: Dispatch queue: DVTFilePath cache derivation lock for key DVTFilePathKey_SortedDirectoryContents
0 libobjc.A.dylib 0x00007fff8df27aa0 search_method_list(method_list_t const*, objc_selector*) + 2
1 libobjc.A.dylib 0x00007fff8df28d76 lookUpImpOrForward + 413
2 libobjc.A.dylib 0x00007fff8df22591 objc_msgSend + 209
3 com.apple.dt.DVTFoundation 0x0000000108a741f8 -[DVTFileSystemVNode addCachedEntriesFromDictionary:] + 215
4 com.apple.dt.DVTFoundation 0x0000000108bd2e2d __33-[DVTFilePath cachedValueForKey:]_block_invoke549 + 245
5 libdispatch.dylib 0x00007fff9fcbd33f _dispatch_client_callout + 8
6 libdispatch.dylib 0x00007fff9fcbe926 _dispatch_barrier_sync_f_invoke + 74
7 com.apple.dt.DVTFoundation 0x0000000108cd1005 DVTDispatchBarrierSync + 62
8 com.apple.dt.DVTFoundation 0x0000000108a69627 -[DVTDispatchLock performLockedBlock:] + 116
9 com.apple.dt.DVTFoundation 0x0000000108a715b0 -[DVTFilePath cachedValueForKey:] + 1802
10 com.apple.dt.DVTFoundation 0x0000000108a70afc -[DVTToolchainRegistry scanSearchPathAndRegisterToolchains:] + 563
11 com.apple.dt.IDEFoundation 0x00000001097d1a66 IDEInitialize + 655
12 com.apple.dt.IDEKit 0x0000000109ecdf7c -[IDEApplicationController applicationWillFinishLaunching:] + 708
13 com.apple.CoreFoundation 0x00007fffa18fa70c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
14 com.apple.CoreFoundation 0x00007fffa18fa67f ___CFXRegistrationPost_block_invoke + 63
15 com.apple.CoreFoundation 0x00007fffa18f9d47 _CFXRegistrationPost + 407
16 com.apple.CoreFoundation 0x00007fffa18f9ab2 ___CFXNotificationPost_block_invoke + 50
17 com.apple.CoreFoundation 0x00007fffa18f3d42 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1922
18 com.apple.CoreFoundation 0x00007fffa17e2145 _CFXNotificationPost + 693
19 com.apple.Foundation 0x00007fff9ef36921 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
20 com.apple.dt.DVTFoundation 0x0000000108c6cf55 -[NSNotificationCenter(DVTNSNotificationCenterAdditions) _dvt_postNotificationName:object:userInfo:] + 698
21 com.apple.AppKit 0x00007fff9db412c2 -[NSApplication finishLaunching] + 354
22 com.apple.dt.DVTKit 0x0000000109275f62 -[DVTApplication finishLaunching] + 149
23 com.apple.AppKit 0x00007fff9db40e05 -[NSApplication run] + 231
24 com.apple.AppKit 0x00007fff9dac3520 NSApplicationMain + 1176
25 libdyld.dylib 0x00007fff9a8605ad start + 1
Could this be an issue due to Permissions conflicts?
由于权限冲突,这可能是一个问题吗?
ANSWER:
回答:
After I changed the rights from my OSX-Drive to everyone can write&read. Everything worked. But I knew that this is a temporary solution, so I decided to reinstall my MAC and everything was fine.
在我将我的 OSX 驱动器的权限更改为每个人都可以读写之后。一切正常。但我知道这是一个临时解决方案,所以我决定重新安装我的 MAC,一切都很好。
回答by Jeremie D
Delete ~/Library/Developer/Xcode/DerivedData
by running this command in terminal:
~/Library/Developer/Xcode/DerivedData
通过在终端中运行此命令来删除:
rm -r ~/Library/Developer/XCode/DerivedData
If that doesnt work, At this point and with given info, all I could recommend to delete and reinstall Xcode.
如果这不起作用,此时并根据给定的信息,我只能建议删除并重新安装 Xcode。
回答by chawki
If the delete of ~/Library/Developer/Xcode/DerivedData is not working for you, try this steps to remove xcuserdata:
如果删除 ~/Library/Developer/Xcode/DerivedData 对您不起作用,请尝试以下步骤删除 xcuserdata:
- open a Finder window and navigate to your project
- right-click on the .xcodeproj OR .xcworkspace file
- select Show Package Contents
- a new window appears
- delete a folder called xcuserdata
- 打开 Finder 窗口并导航到您的项目
- 右键单击 .xcodeproj 或 .xcworkspace 文件
- 选择显示包裹内容
- 出现一个新窗口
- 删除名为 xcuserdata 的文件夹
回答by Sunil Targe
I'll recommend deleting xcuserdata:
folder from both of your .xcodeproj
& .xcworkspace
file (open with Show Package Contents) and try again.
我会建议xcuserdata:
从你的.xcodeproj
&.xcworkspace
文件中删除文件夹(用 Show Package Contents 打开),然后再试一次。
I hope this will work.
我希望这会奏效。
回答by yeahdixon
I had one where i selected a file that was quite large which crashed xcode when it tried to parse it. Then when i restarted it somehow it got set to load that file on start. Only way i saw was to temporarily rename the file that it was trying to load at start so it would load empty.
我有一个我选择了一个非常大的文件,当它试图解析它时它崩溃了 xcode。然后当我以某种方式重新启动它时,它被设置为在启动时加载该文件。我看到的唯一方法是临时重命名它在开始时尝试加载的文件,以便它加载为空。