command failed due to signal: segmentation fault: 11

A day ago I had a perfectly functioning app that run smoothly. I edited few lines of code mostly if statements and hit the run button. It came up with an error, "command failed due to signal: segmentation fault: 11". I have been looking on the internet for fixes for this but I haven't found any. Any help would be great.


Thanks,

gecko678

This is not your app crashing, but the Swift compiler is crashing.


Try it again with the just-released Xcode 7.3.1 to get the latest Swift compiler version. If it still crashes, submit a bug report with the project that causes it.


If you're lucky, you can try commenting code to find the particular construct that's causing the crash, and try reworking it into a different form that the compiler doesn't choke on.

Thanks for the reply, I have just updated to Xcode 7.3.1 and the error still occurs. Commenting out code would not help because it would be extremely time consuming for the number of lines of code. I have submitted a bug report to Apple though.


Thanks,

Gecko678

I have submitted a bug report to Apple though.

Thanks!

Just for the record, what was the bug number?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I'm experiencing the same problem with Xcode 7.3.1
Is there a way to fix it?
Thanks!

There is not a general way to fix compiler crashes like this. My recommendations:

  1. upgrade to the latest compiler

  2. if the problem still occurs, file a [bug report][bug], ideally with a project that reproduces the crash

  3. look at the backtrace in the crash to see if it gives you any hints as to what’s going wrong

  4. shuffle your code around to avoid the crash.

In your case point 1 is interesting because you have two choices:

  • Xcode 8 includes Swift 2.3, which is a minor update that includes compatibility with the latest SDKs.

  • It also includes Swift 3, which is a major language change.

For minimal disruption you should test with Swift 2.3 to see if that improves things. If not, things get trickier. Migrating to Swift 3 is a bunch of work, and there’s no guarantee that it’ll fix any specific crash.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
command failed due to signal: segmentation fault: 11
 
 
Q