Does anyone else see the problem "Command failed due to signal: Segmentation fault: 11" when compiling a recently converted project from Swift 2.3 to Swift 3.0?

The converter works okay taking Swift 2.2 to 2.3, but totally destroys my project code trying to go from 2.3 to 3.0. I get dozens of errors, and when I try to clean those up it just results in getting dozens more. Each and every compile ends with the error: "Command failed due to signal: Segmentation fault: 11". Nothing I do (i.e. Clean, Clean Build Folder, delete Derived Data, etc.) has any effect resolving this.


Does anyone have a work-around for this?

Replies

The “Segmentation fault: 11” message indicates that the compiler crashed; you should definitely file a bug about that, ideally including a minimal project that reproduces the problem.

As to how to get your project successfully migrated, I have a few suggestions:

  • read the migration guide — It contains wealth of useful info.

  • start at the bottom and work up — If your project contains any frameworks, get those compiling with Swift 3 before you start working on your app. Likewise, in a layered app, disable compilation for the top layers of your code (views and controllers, say) and work on the lower layers first (model, networking, and so on).

  • process errors in groups — A lot of the time migration errors can be placed in a small number of common groups. Deal with each group at a time.

  • trust the fix its (but only so far :-) — Most of the time the fix its will do an excellent job of pointing you in the right direction.

  • for thorny stuff, ask for help — If you encounter issues where you’re not sure how to proceed, post specific details of those.

Share and Enjoy

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

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

I just survived this process.


My work around was to make sure the project was set to deployment target 10.0 in project info and upgrade the project. If its linking against the old libraries you get wierd fixit behavior in the editor. Also, about 10 percent of the files were not converted because the translater crashed. So, in those cases, I had to migrate by hand. Most of the other problem spots was code that had any kind of pointer logic.

Hello,


I've hit this crash as well, and am totally blocked on updating to Swift 3.0.


I've filed a radar:


rdar://problem/28890409


Hope this helps,

E.