打开项目文件时XCode崩溃 [英] XCode Crashing When Opening Project File

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

问题描述

当我打开我的项目文件时,XCode一直在崩溃。我已经好几个星期了。不确定如何诊断。它只针对特定项目崩溃。

XCode keeps crashing on me when I open my project file. I've been able to open it fine for weeks now. Not sure how to diagnose. It only crashes for a specific project.

Process:         Xcode [1293]
Path:            /Developer/Applications/Xcode.app/Contents/MacOS/Xcode
Identifier:      com.apple.Xcode
Version:         3.2.5 (1760)
Build Info:      DevToolsIDE-17600000~5
Code Type:       X86-64 (Native)
Parent Process:  launchd [189]

Date/Time:       2010-12-15 16:05:24.659 -0700
OS Version:      Mac OS X 10.6.5 (10H574)
Report Version:  6

Interval Since Last Report:          201 sec
Crashes Since Last Report:           4
Per-App Interval Since Last Report:  80 sec
Per-App Crashes Since Last Report:   4
Anonymous UUID:                      2B7F7CFC-45EA-450C-8467-6BF1E356B6F6

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000025940
Crashed Thread:  10  Dispatch queue: com.apple.Xcode.index-access

Application Specific Information:
objc[1293]: garbage collection is ON


推荐答案

崩溃通常是项目文件已损坏的标志。以下是您可以尝试修复的可能事项列表。

The crash is generally a sign the project file has been corrupted. Here's a list of possible things you can do to try to fix it.

如果您正在使用版本控制,则可能是由尚未解决的合并冲突引起的。

If you are using version control, it might be caused by a merge conflict that has not yet been resolved.


  1. 使用Finder打开包含项目的目录。

  2. 右键单击项目文件 YOUR_PROJECT_NAME.xcodeproj 打开您喜欢的文本编辑工具,例如Sublime Text。

  3. 查找合并冲突,通常使用一系列 ========= 栏标记。

  4. Resolve手动合并冲突或删除一方的更改。

  1. Using Finder, open the directory that holds your project.
  2. Right click the project file YOUR_PROJECT_NAME.xcodeproj and Open With your preferred text editing tool such as Sublime Text.
  3. Look for merge conflicts which are usually marked using a series of ========= bars.
  4. Resolve the merge conflicts manually or remove the changes of one side.



由不可读的XML引起



如果失败则进入文件并快速滚动查看是否有任何不合适的地方 - 它通常应该是可读的XML。您甚至可以尝试使用XML验证器来查看是否找到了任何错误。

Caused by unreadable XML

If that fails go into the file and quickly scroll through to see if anything seems out of place - it should generally be readable XML. You could even try an XML validator against it to see if anything amiss was found.


  1. 使用Finder打开包含项目的目录。

  2. 右键单击项目文件 MyProject.xcodeproj 并选择显示包装内容

  3. 删除 xcuserdata 文件夹,其中应包含一个包含您用户名的文件夹。

  4. 为工作区文件重复步骤2和3 MyProject.workspace

  1. Using Finder, open the directory that holds yor project.
  2. Right click the project file MyProject.xcodeproj and choose Show Package Contents.
  3. Delete the xcuserdata folder, which should contain a folder with your username on it.
  4. Repeats step 2 and 3 for your workspace file MyProject.workspace

KennyWinker Paul R 答案如下。

As elaborated by KennyWinker and Paul R on the answers below.

请注意,这应该是您的最后手段,因为对大型项目来说这是非常繁琐的。

最后你可以简单地重新创建它。这可能看起来很痛苦,但基本上你可以创建一个新项目并将Classes文件夹下的所有内容拖到Xcode中以开始使用它(不要忘记添加你需要的框架)。

Lastly you could simply re-create it. That might seem like a big pain, but basically you could just create a new project and drag everything under the "Classes" folder into Xcode to start using it (don't forget to also add the frameworks you need).

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

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