A few days ago I deleted a file in my project, then added it again, after that I renamed it, to finally commit it with Xcode’s Source Control.
Since then and for a few days Xcode was constantly crashing, on a span of every 3-8 minutes; at first I thought it was the app I’m developing behaving weirdly, then I found out it still happened even without having an app running.
I couldn’t understand exactly what the problem was by looking at the logs, but I did notice all of them had the same issue:
Crashed Thread: Dispatch queue: DVTSourceControlGitXPCClient :: Proxy Completion Queue
The part of DVTSourceControlGitXPCClient gave me a hint: it had to do with source control, and specifically with git.
I opened the Terminal, navigated to my project’s repository, asked git status
, and there it was: that file I deleted, renamed and committed a few days ago was showing as modified
.
Did a staging of all changes, committed them, and since then I haven’t had any more crashes (so far).
I have to say is not the first time I notice some limitations on the way Xcode interacts with git; renaming, and specifically, case-sensitive renames are always an issue.
In case you are having a similar experience with Xcode (14.2 (14C18) in my case), I recommend to try staging everything directly from Terminal and see if it fixes your issue.
Example:
$ cd /myProjectApp
$ git status
$ git add .
$ git commit -m "Cleaning state"