0

Since I've updated to Sierra and started using XCode 8, XCode started freezing a lot, specially (but not only) when saving. The beachball appears and nothing can be done in XCode. Sometimes it freezes for some seconds and resumes, other times it won't resume (or at least, not in a reasonable time).

Already tried XCode 8.1 and 8.2. Same problem.

Is there any fix? Or anyway to troubleshoot this (like logs and such).

4
  • What errors are you receiving? It's very difficult to troubleshoot the problem or offer a fix when we don't even know the problem.
    – fsb
    Commented Nov 4, 2016 at 13:07
  • No errors. That's why I asked for a way to troubleshoot, like logs. Console shows nothing related with xcode.
    – amfcosta
    Commented Nov 4, 2016 at 14:46
  • Could you try updating to Xcode 8.1?
    – Edric
    Commented Nov 8, 2016 at 4:08
  • Already tried 8.1 and 8.2 Beta.
    – amfcosta
    Commented Nov 8, 2016 at 17:34

2 Answers 2

1
  1. Close Xcode
  2. Open Terminal
  3. Type defaults delete com.apple.dt.Xcode
  4. Re-open Xcode

Note: Xcode will be reset to its default settings. This might help if you would like to do so.

0

To avoid the hangs in Xcode: * Copy/paste the code you want to change in a C++ source file.
* When done, Cut/Paste into the header and immediately save.


Other solutions are band-aids that fall off pretty fast. This issue has been around since the early versions of Xcode.

It seems to occur in C++ projects when you modify a header file and it decides that its time for indexing to start. All of the files that you were editing get saved and then Xcode locks up. Its about time that Apple takes this seriously and fixes their deadlocking mutexes.

1
  • Hi Walter - Welcome to Ask Different. Could you link to the answer / solution you are saying isn't great? That makes this stand better as a proper answer - perhaps explaining how you can tell a deadlocked mutex is causing a hang that would help us all know / diagnose that as opposed to slow filesystem access or network pauses. I'll edit the proposed solution you mentioned so that's on the top as opposed to "burying the lede" at the end.
    – bmike
    Commented Jul 13, 2018 at 4:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .