Xcode 在启动时崩溃“parentPath 必须为零,但事实并非如此”
每当我启动时,XCode(最新版本)都会崩溃 - 在解决这个问题之前无法完成任何事情 - 有什么想法吗?
- 错误 - 请参阅下文
在出现问题之前我做了什么
- 已安装新 HDD(并将旧 HDD 移至光驱托架) - 在新 SSD 上重新安装 XCode 4 - 一切正常
- 我确实重命名了“旧”HDD 上的主目录用户名,将“_OLD”放在末尾 - 这样我就不会在跳转到旧 HDD 查找文件时感到困惑
- 我尝试从这个旧的 HDD 区域打开一个测试项目 - 打开它时遇到一些问题(不记得详细信息) - 从这里关闭/重新启动
- 然后,每次我尝试重新打开 XCode 时,它就像尝试打开最后打开的项目,包括我遇到的问题 - 出现以下错误 - 无法继续使用 xcode 必须崩溃
错误:
ASSERTION FAILURE in /SourceCache/DVTFoundation/DVTFoundation-903/Framework/Classes/FilePaths/DVTFilePath.m:322
Details: fsrep is absolute (starts with tilde) ('~--814203924d469071-0000000000') parentPath must be nil but it is not ('<DVTFilePath:0x401bdf9e0:'/Volumes/Macintosh HD/Users/greg/.dvdcss'>')
Object: <DVTFilePath>
Method: +_filePathForParent:fileSystemRepresentation:length:allowCreation:
Thread: <NSThread: 0x40010a260>{name = (null), num = 1}
Hints: None
Backtrace:
0 0x0000000103f44466 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:messageFormat:arguments:] (in IDEKit)
1 0x00000001035b3794 _DVTAssertionFailureHandler (in DVTFoundation)
2 0x0000000103550a9e +[DVTFilePath _filePathForParent:fileSystemRepresentation:length:allowCreation:] (in DVTFoundation)
3 0x0000000103550963 +[DVTFilePath _filePathForParent:pathString:] (in DVTFoundation)
4 0x0000000103b95642 -[DVTFilePath(IDESourceControlStatus) IDESourceControl_importantSubpaths] (in IDEFoundation)
5 0x0000000103b414ac -[IDEFileReference _updateSourceControlStatusIfNeeded] (in IDEFoundation)
6 0x0000000103b37951 -[IDEWorkspace _updateSourceControlStatusIfNeeded] (in IDEFoundation)
7 0x00007fff8c2eb25a __NSFireDelayedPerform (in Foundation)
8 0x00007fff8b82df84 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ (in CoreFoundation)
9 0x00007fff8b82dad6 __CFRunLoopDoTimer (in CoreFoundation)
10 0x00007fff8b80e471 __CFRunLoopRun (in CoreFoundation)
11 0x00007fff8b80dae6 CFRunLoopRunSpecific (in CoreFoundation)
12 0x00007fff8b3633d3 RunCurrentEventLoopInMode (in HIToolbox)
13 0x00007fff8b36a63d ReceiveNextEventCommon (in HIToolbox)
14 0x00007fff8b36a4ca BlockUntilNextEventMatchingListInMode (in HIToolbox)
15 0x00007fff86bde3f1 _DPSNextEvent (in AppKit)
16 0x00007fff86bddcf5 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in AppKit)
17 0x00007fff86bda62d -[NSApplication run] (in AppKit)
18 0x00007fff86e5980c NSApplicationMain (in AppKit)
19 0x0000000103549eec (in Xcode)
20 0x0000000000000002
I'm having XCode (latest version) crash whenever I start up - can't get anything done until I resolve this - any ideas?
- Error - See below
What I did prior to getting the issue
- had put in a new HDD (and moved the old to the optical bay) - reinstalled XCode 4 on the new SSD - all working fine
- I did rename my home directory user name on the "old" HDD to put "_OLD" at the end - just so I didn't get confused if jumping to the old HDD for files
- I tried to open a test project from this old HDD area - got some issue opening it (can't remember details) - closed/restarted fromhere
- Then after this every time I try to open XCode a fresh it's like it tries to open the last projects that was open including this one I had an issue with - get the below error - can't continue on using xcode have to crash out
Error:
ASSERTION FAILURE in /SourceCache/DVTFoundation/DVTFoundation-903/Framework/Classes/FilePaths/DVTFilePath.m:322
Details: fsrep is absolute (starts with tilde) ('~--814203924d469071-0000000000') parentPath must be nil but it is not ('<DVTFilePath:0x401bdf9e0:'/Volumes/Macintosh HD/Users/greg/.dvdcss'>')
Object: <DVTFilePath>
Method: +_filePathForParent:fileSystemRepresentation:length:allowCreation:
Thread: <NSThread: 0x40010a260>{name = (null), num = 1}
Hints: None
Backtrace:
0 0x0000000103f44466 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:messageFormat:arguments:] (in IDEKit)
1 0x00000001035b3794 _DVTAssertionFailureHandler (in DVTFoundation)
2 0x0000000103550a9e +[DVTFilePath _filePathForParent:fileSystemRepresentation:length:allowCreation:] (in DVTFoundation)
3 0x0000000103550963 +[DVTFilePath _filePathForParent:pathString:] (in DVTFoundation)
4 0x0000000103b95642 -[DVTFilePath(IDESourceControlStatus) IDESourceControl_importantSubpaths] (in IDEFoundation)
5 0x0000000103b414ac -[IDEFileReference _updateSourceControlStatusIfNeeded] (in IDEFoundation)
6 0x0000000103b37951 -[IDEWorkspace _updateSourceControlStatusIfNeeded] (in IDEFoundation)
7 0x00007fff8c2eb25a __NSFireDelayedPerform (in Foundation)
8 0x00007fff8b82df84 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ (in CoreFoundation)
9 0x00007fff8b82dad6 __CFRunLoopDoTimer (in CoreFoundation)
10 0x00007fff8b80e471 __CFRunLoopRun (in CoreFoundation)
11 0x00007fff8b80dae6 CFRunLoopRunSpecific (in CoreFoundation)
12 0x00007fff8b3633d3 RunCurrentEventLoopInMode (in HIToolbox)
13 0x00007fff8b36a63d ReceiveNextEventCommon (in HIToolbox)
14 0x00007fff8b36a4ca BlockUntilNextEventMatchingListInMode (in HIToolbox)
15 0x00007fff86bde3f1 _DPSNextEvent (in AppKit)
16 0x00007fff86bddcf5 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in AppKit)
17 0x00007fff86bda62d -[NSApplication run] (in AppKit)
18 0x00007fff86e5980c NSApplicationMain (in AppKit)
19 0x0000000103549eec (in Xcode)
20 0x0000000000000002
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
我也有同样的问题。
这是由于 Xcode 崩溃时给出的目录路径中存在一个以 ~ 开头的文件造成的。
检查一下是否有这样的文件,然后将其删除。
就我而言,它解决了问题。
希望这有帮助,
Rds,
迈克尔
I had the same problem.
It was due to a file fo which the name started by ~ in the directory path given by Xcode when it crashed.
Check if you don't have such a file and delete it.
In my case, it solved the issue.
Hope this help,
Rds,
Michael
对我有用的解决方案是删除〜/ Library / Autosave Information中的Xcode自动保存文件。然后 Xcode 就可以正常启动了。
The solution that worked for me is to delete the Xcode autosave files in ~/Library/Autosave Information. Xcode then started up clean for me.
可能不是最好的答案(?)但是我必须(a)重新安装+(b)删除分散在我的主目录中的所有各种XCode文件......然后它启动正常
may not be best answer (?) however I had to (a) reinstall + (b) delete all the various XCode files scattered through my home directory...then it started up ok
类似的
something like that
就我而言,引用的文件是 dropbox 的缓存,因此在对 dropbox 论坛进行一些研究后,错误看起来像这样,
我发现这些缓存目录可以删除。删除后 xcode 工作正常。
所以我会告诉未来来这里的人在重新安装 xcode 之前尝试删除有问题的文件。 (如果删除不了的话可以重命名)
in my case the file referenced was dropbox's cache, so the error looked like this
after some research on dropbox forums i found these cache directories can be deleted. after removal xcode worked fine.
so i would tell future people who come here to try and remove the offending file prior to reinstalling xcode. (or rename it if you cant delete it)
我删除了 ~/Library/Preferences/com.apple.dt.Xcode.plist 并且 Xcode 再次正常启动。
I deleted ~/Library/Preferences/com.apple.dt.Xcode.plist and Xcode started normally again.
就我而言,我使用自定义 .xcconfig 文件从命令行进行 xcodebuild'ing Xcode UI 测试:
当我将 HERE_BUILD 更改为绝对路径时:
错误消失了。
In my case I was xcodebuild'ing Xcode UI Tests from command line using custom .xcconfig file:
When I changed HERE_BUILD to have absolute path:
the error went away.