Command failed due to signal: Abort trap: 6

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


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.


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

enter image description here


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.


This worked for me, so just give it a try. i got this error while converting the code from swift 3 to swift 4.

Simply, go to Project>Target>Build Setting and search 'Swift Compiler - Code Generation' and set Optimization level to 'No Optimization[-Onone]'.


In my case

Error

override func observeValueForKeyPath(keyPath: (String!)?, ofObject object: (AnyObject!)?, change: ([NSObject : AnyObject]!)?, context: UnsafeMutablePointer<Void>)

Ok

override func observeValueForKeyPath(keyPath: String?, ofObject object: AnyObject?, change: [NSObject : AnyObject]?, context: UnsafeMutablePointer<Void>)