skip to Main Content

Since a few days ago, I’ve been experiencing a repetitive crash on Xcode every 3-8 minutes.

The only tangible thing I can find in the crash logs is that it always shows:

Crashed Thread: Dispatch queue: DVTSourceControlGitXPCClient :: Proxy Completion Queue

It seems to be Source Control related, but I wonder how?

I will add everything related to my current project in case it is relevant:

  • Xcode 14.2 (14C18)
  • Using Source Control with GitHub
  • Swift targets iOS and macOS
  • SPM

It seems like some folks are experiencing a similar issue, as seen on the Developer Forums

Any leads as to why or how to solve it?

2

Answers


  1. Chosen as BEST ANSWER

    After some struggling I decided to check how was git doing, directly from the Terminal.

    It turns out there were some things that didn't make sense, specifically a file I deleted from my project but then added again, was showing as modified, even though I had already committed all changes for that file a few days ago; but I had done it directly from Xcode Source Control.

    From the Terminal, I staged all changes and committed them. Since then Xcode hasn't crashed for a few hours yet.

    My limited understanding of the problem points out that Xcode had issues staging those changes I made a few days ago, and since then the repository has not been in a "healthy state"; Xcode tries somehow to understand the state of the repository but after a while, it just crashes.

    Common scenarios where this could have happened:

    • A file was deleted
    • A file was renamed, specially with case-sensitive renames, for example from MyViewcontroller.swift to MyViewController.swift

    The solution for me was to just put it back in a "healthy state", aka make a commit directly from the Terminal.

    Example

    From the Terminal

    # navigate to the directory of your repository
    $ cd /someFolder/myProjectApp
    
    $ git status
    # check that you get "nothing to commit"
    # or if there are changes they should make sense
    
    # if some changes do not make sense
    # try staging and committing everything
    # example:
    $ git add .
    $ git commit -m "Cleaning state"
    

  2. I was able to prevent the crash by unchecking the Fetch and refresh server status automatically in Xcode > Preferences > Source Control > General. (Not a game-stopper for me since I’m the only one using the remote server, and I do all of my committing and other git operations in a third-party GUI app).

    I also tend to perpetually have locally modified files that I never commit, so the other answer wasn’t an option for me.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search