Xcode 在启动时崩溃“parentPath 必须为零,但事实并非如此”

发布于 2024-12-09 22:09:53 字数 2558 浏览 1 评论 0原文

每当我启动时,XCode(最新版本)都会崩溃 - 在解决这个问题之前无法完成任何事情 - 有什么想法吗?

  1. 错误 - 请参阅下文
  2. 在出现问题之前我做了什么

    • 已安装新 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?

  1. Error - See below
  2. 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

清欢 2024-12-16 22:09:54

我也有同样的问题。
这是由于 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

久随 2024-12-16 22:09:54

对我有用的解决方案是删除〜/ 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.

聽兲甴掵 2024-12-16 22:09:54

可能不是最好的答案(?)但是我必须(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

岁月打碎记忆 2024-12-16 22:09:54
  • 第 1 步:将要保留的所有代码复制到文本文件或
    类似的
  • 步骤 2:卸载
  • 步骤 3:煮一些咖啡
  • 步骤 4:重新安装
  • Step 1: Copy all the code you want to keep into text files or
    something like that
  • Step 2: Un-install
  • Step 3: make some coffee
  • Step 4: Re-install
小嗲 2024-12-16 22:09:54
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>

就我而言,引用的文件是 dropbox 的缓存,因此在对 dropbox 论坛进行一些研究后,错误看起来像这样,

must be nil but it is not ('<DVTFilePath:0x401bdf9e0:'/Volumes/Macintosh HD/Users/greg/.dropbox.cache.2.25.12'>')

我发现这些缓存目录可以删除。删除后 xcode 工作正常。

所以我会告诉未来来这里的人在重新安装 xcode 之前尝试删除有问题的文件。 (如果删除不了的话可以重命名)

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>

in my case the file referenced was dropbox's cache, so the error looked like this

must be nil but it is not ('<DVTFilePath:0x401bdf9e0:'/Volumes/Macintosh HD/Users/greg/.dropbox.cache.2.25.12'>')

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)

瞄了个咪的 2024-12-16 22:09:54

我删除了 ~/Library/Preferences/com.apple.dt.Xcode.plist 并且 Xcode 再次正常启动。

I deleted ~/Library/Preferences/com.apple.dt.Xcode.plist and Xcode started normally again.

尹雨沫 2024-12-16 22:09:54

就我而言,我使用自定义 .xcconfig 文件从命令行进行 xcodebuild'ing Xcode UI 测试:

HERE_BUILD=./Build-command-line
HERE_INTERMEDIATES=$(HERE_BUILD)/Intermediates

// Paths
// the following paths are enough to redirect everything to $HERE_BUILD
MODULE_CACHE_DIR    = $(HERE_BUILD)/DerivedData/ModuleCache
OBJROOT             = $(HERE_INTERMEDIATES)
SHARED_PRECOMPS_DIR = $(HERE_INTERMEDIATES)/PrecompiledHeaders
SYMROOT             = $(HERE_BUILD)/Products

当我将 HERE_BUILD 更改为绝对路径时:

HERE_BUILD=$(SRCROOT)/Build-command-line

错误消失了。

In my case I was xcodebuild'ing Xcode UI Tests from command line using custom .xcconfig file:

HERE_BUILD=./Build-command-line
HERE_INTERMEDIATES=$(HERE_BUILD)/Intermediates

// Paths
// the following paths are enough to redirect everything to $HERE_BUILD
MODULE_CACHE_DIR    = $(HERE_BUILD)/DerivedData/ModuleCache
OBJROOT             = $(HERE_INTERMEDIATES)
SHARED_PRECOMPS_DIR = $(HERE_INTERMEDIATES)/PrecompiledHeaders
SYMROOT             = $(HERE_BUILD)/Products

When I changed HERE_BUILD to have absolute path:

HERE_BUILD=$(SRCROOT)/Build-command-line

the error went away.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文