0

I updated my iOS swift app to Swift 2 syntax. I solved all the errors as requested but the App does not compile at all. Instead I get this crazy error that I've never seen before:

enter image description here

What does this mean?

Alessandro
  • 4,000
  • 12
  • 63
  • 131
  • Possible duplicate of [unable to execute command: Segmentation fault: 11 swift frontend command failed due to signal (use -v to see invocation)](http://stackoverflow.com/questions/25007755/unable-to-execute-command-segmentation-fault-11-swift-frontend-command-failed) – Arthur Gevorkyan Oct 13 '15 at 08:32

2 Answers2

3

It's a compiler bug - the Swift compiler is crashing.

What you need to do is reduce the source file to only the lines that cause the segmentation fault and then you need to raise a bug report at Apple attaching the source file that causes the crash,

https://bugreport.apple.com

There may be an error in your code that is triggering the bug, but, nevertheless, the compiler should not crash.

JeremyP
  • 84,577
  • 15
  • 123
  • 161
0

The screenshot reveals that the errors are related to error handling.
Update your code to use the new error handling syntax like

do {
 try someFunctionThatCanThrow()
 // do something on success
} catch let error as NSError {
 // do something on error
}

The error listing displays the code and the line where the error occurs for each error.

vadian
  • 274,689
  • 30
  • 353
  • 361
  • These are other errors related for upgrading from swift 1 to swift 2. I had changed all my error handling code according to the new swift 2 do-try-catch and I still have segmentation fault 11 – Khaled Alanezi Oct 13 '15 at 17:34
  • All errors are pretty well described in the error listing – vadian Oct 13 '15 at 21:46