当前位置:  开发笔记 > IOS > 正文

Xcode在发布时崩溃

如何解决《Xcode在发布时崩溃》经验,为你挑选了1个好方法。

我正在开发一个iOS应用程序,我在应用程序中没有任何改变.但是在重新启动我的Mac时,Xcode每次都会崩溃.

不知道这是否重要,但我的聚光灯找不到任何应用程序,当我打开取景器并使用快捷键cmd + shift + HI时,看到一个白色的窗口.

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

由于权限冲突,这可能是一个问题吗?

回答:

我将权限从我的OSX-Drive更改为每个人都可以写入和读取.一切正常.但我知道这是一个临时解决方案,所以我决定重新安装我的MAC,一切都很好.



1> Jeremie..:

~/Library/Developer/Xcode/DerivedData在终端中运行此命令删除:

rm -r ~/Library/Developer/XCode/DerivedData

如果这不起作用,在这一点和给定的信息,我可以建议删除并重新安装Xcode.


删除〜/ Library/Developer/Xcode/DerivedData
@Jeremie删除了DerivedData文件夹
推荐阅读
k78283381
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有