Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Command failed due to signal: Abort trap: 6

Tags:

xcode

swift

Since Xcode 7 and Swift 2.0, I get the error above, like in the screenshot shown here:

screenshot of error log

I have no idea where this is coming from, cleaning and deleting derived data didn't work.

Anyone else experiencing this problem?

Project settings:

project settings

Target settings:

target settings

like image 858
swalkner Avatar asked Jun 09 '15 06:06

swalkner


3 Answers

I faced this issue when used the same constant names in a guard construction

let activityVC = ...
        
guard let activityVC = activityVC else { return }

But xcode didn't show me any warning for this row.

like image 101
VyacheslavBakinkskiy Avatar answered Nov 03 '22 03:11

VyacheslavBakinkskiy


This is normally a Swift compiler bug, and if compiler is already late-version, we can only workaround it, for example:

Go to project Build settings -> Swift Compiler - code generation -> Optimization Level -> For both Debug & Release select option "Fast,Single-File Optimization[-O]

settings

Above forces compiler to operate a little differently, which seems to prevent crash.

Note that both "-O" and "-Osize" may fix the crash, but I prefer -O to match release's settings, and avoid surprises in release.

like image 21
S_iOS Avatar answered Nov 03 '22 03:11

S_iOS


I have the same problem with all Xcode 6.3 projects, I open in Xcode 7.0. I created a new project, copied all my source files and resources and everything worked without this compiler error. I thought this has something to do with the project settings. I turned off the Swift compile Optimization to "none" and the Trap 6 was gone away. Perhaps there are other settings, which also generate trouble, but for me this it was.

like image 7
j.s.com Avatar answered Nov 03 '22 04:11

j.s.com