开发者

Xcode crashing on startup "parentPath must be nil but it is not"

开发者 https://www.devze.com 2023-04-13 05:22 出处:网络
I\'m having XCode (latest version) crash whenever I start up - can\'t get anything done until I resolve this - any ideas?

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 /SourceCach开发者_StackOverflow社区e/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 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


The solution that worked for me is to delete the Xcode autosave files in ~/Library/Autosave Information. Xcode then started up clean for me.


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


  • 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


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)


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号