xcode10 crashes when typing include

xcode 10 is consistently crashing immediately after opening quotes after #include, the crash will also happen when modifying any text within quotes next to an include. It's as though the auto complete is crashing.


I have tried this on multiple projects, deleted and regenerated xcode projects using premake and also deleted all derrived data. The same issue still occurs.


It is much more debilitating than I first anticipated, I am having to copy and paste includes from another text editor which is far from ideal and even with this workaround I am still without thinking going to add an include and encountering a crash.


Anyone else experiencing this issue, any known decent workaround or fix or any eta on a proper fix?


Thanks

Replies

I have similar issue. When I press ^+space in the #include <...> xcode crashes. Crash log says I have recursive search path like ${PROJECT_DIR}/../path. I wonder why xcode 10 stops resolve such things. With previous versions of the xcode all was fine there. Looks like pure bug in xcode.


Update: BTW - It didn't crash from the beginning. I feel it start doing so after I cleaned up DerivedData folder for some reason.

Update 2: Just checked on other mac with the same project and it crashes from the beginning. So deleting DerivedData has no impact on this issue.

Sorry to hear you have the problem too but at least the issue is not specific to me... Hopefully they will get a fix out soon, finding xcode10 to be quite buggy and am working around a few other issues as well as this at the moment!


Wish I had waited a little while before updating but I needed to update iOS and this forced me to get latest xcode.

Hi,


this is not an Xcode 10 issue. It already exists at least since Xcode 9.

Hello,


I used xcode 9 a lot of time and didn't notice such kind of crash. Probably there is broken config file. Currently it's not clear.

No, not a corrupt config file. It happens with all projects. But I have to agree that Xcode 10 is really terrible (more or less unusable with regards to this respect).

Crashing all the time when editing what's inside the double quotes of a #include statement.


In XCode 9 it never happened, only XCode 10 release version.

I can confirm this crash --- happens very often and is EXTREMELY annoying!

It happens when I'm adding an #include statement in a C++ project.

Only happens since Xcode 10 (10A255)


The system console shows this output:


Nov 13 11:40:05 LoMac Console[92607]: BUG in libdispatch client: kevent[vnode] monitored resource vanished before the source cancel handler was invoked
Nov 13 11:41:05 LoMac systemstats[56]: assertion failed: 17G65: systemstats + 914800 [D1E75C38-62CE-3D77-9ED3-5F6D38EF0676]: 0x40
Nov 13 11:41:06 --- last message repeated 7 times ---
Nov 13 11:41:06 LoMac com.apple.xpc.launchd[1] (com.apple.dt.SKAgent[92555]): Service exited due to signal: Killed: 9 sent by com.apple.dt.SKAgent[92555]
Nov 13 11:41:06 LoMac systemstats[56]: assertion failed: 17G65: systemstats + 914800 [D1E75C38-62CE-3D77-9ED3-5F6D38EF0676]: 0x40

I reported this as a bug #45073608 and it has been closed as a duplicate of 42425247.


Since the crash causes data loss, I recommend that everyone who suffers from it submit a bug report.


I found it was happening more with "<...>" headers than quoted ones, but that may be spurious.


My own workround – annoying but safe – is to hit Return after "#include", so that it looks like this:


#include
<UserNotifications/UserNotifications.h>


and then to backspace at the start of the second line once you have finished editing. Less bother than opening a separate editor.