Xcode 8 Crash on Build

I have a project which up to yesterday was rock solid.


Then, yesterday, on beta 4, and now beta 5, it's crashing - and I can't find a solution, neither by setting nor by searching online.


If anyone has any suggestions I would be open to trying them, as it's a huge blocker for me.


The relevant part of the Xcode crash log seems to be:


Crashed Thread:        34  Dispatch queue: ConcurrentQueue: __51-[XCWorkQueueCommandBuiltinInvocation startRunning]_block_invoke.82


Exception Type:        EXC_BAD_ACCESS (Code Signature Invalid)
Exception Codes:       0x0000000000000032, 0x000000013319b000
Exception Note:        EXC_CORPSE_NOTIFY

kernel messages:
-1 sec           CODE SIGNING: cs_invalid_page(0x13319b000): p=5063[Xcode] final status 0x3006a00, denying page sending SIGKILL
-1 sec           CODE SIGNING: process 5063[Xcode]: rejecting invalid page at address 0x13319b000 from offset 0x1000 in file "/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-08-07-a.xctoolchain/usr/lib/swift/macosx/libswiftos.dylib" (cs_mtime:1470638622.0 == mtime:1470638622.0) (signed:1 validated:1 tainted:1 wpmapped:0 slid:0)


It seems to build ok if I reboot, but all subsequent build/run crashes Xcode.

Answered by iamjono in 169182022

Fixed with Xcode beta 6 🙂

A really inconvenient workaround...

  • Quit Xcode
  • sudo chmod -R 777 ~/Library/Developer
  • Re-open Xcode
  • Build/Run.


It's smacking it with a REALLY heavy brick. But it makes me think it's a permissions issue with the beta?

Sadly, i was wrong.

Accepted Answer

Fixed with Xcode beta 6 🙂

Xcode 8 Crash on Build
 
 
Q