Xcode syntax highlighting is crashing all the time

Since Xcode 7 (currently running Version 7.3 (7D175)), the syntax highlighting engine of Xcode (which also seems to include the auto-completion) randomly crashes, meaning the text color of the code gets all white, no more warnings or build errors will be shown in the current file, breakpoints get ignored and auto-completion stops working, rendering the IDE useless for the currently opened file.


This happens sometimes while I am writing code, sometimes just while looking at code without touching trackpad or keyboard. The only way to resolve the issue is to restart Xcode.

I have tried re-installing Xcode and OS X (running 10.11.3 (15D21)), which did not resolve the issue.

In my office, I am not the only one experiencing this issue, so it seems not to be connected to my Mac / installation. Is anyone else also experiencing this and is there a fix?

Thanks

Replies

I'm also having this problem with Xcode 7.3 (7D175). It is crippling. The syntax highlighting returns if I wait. Once I change lines it immediately breaks again.

Yes, this is just awful. We have a large mixed objc and swift project. I never see issues in the objc files, only swift. And its usually around swift interacting with our objc classes.


This is syntax highlighting and code completion - it's just not working!


It is especially bad in our swift unit test files. Occasionally I get syntax highlighting to appear (usually after first opening xcode and the project). But once I run a test it just all goes away.


Please, if anyone has any ideas on how to fix this, please post. I've tried all the usual stuff, deleting derived data, installing 7.3.1, clean build folder, etc.


One note - a cursory look at a collegues xcode with same code base isnt nearly as bad.

+1 for this. We're experiencing the same issues on a larger mixed Swift/ObjC project. Autocompletion basically doesn't exist for Swift with 7.3, even when syntax highlighting seems to work. We also tried all the usual fixes, but indexing often doesn't even start, takes forever, syntax highlighting randomly goes away etc.


While we're seeing those issues on a bunch of developer machines it's hard to pinpoint a specific pattern, let alone reproduce it consistently. We'd be happy to try out any suggestion or possible solution.

I had the same issue...take a look at this thread: https://forums.developer.apple.com/thread/46223