Command failed due to signal: Abort trap: 6

2020-01-28 04:56发布

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

标签: swift xcode
30条回答
Viruses.
2楼-- · 2020-01-28 05:27

In Xcode 9.3, I have re-installed the specific pod, in which warnings appeared and cleared derived data again n again. It worked for me :)

查看更多
3楼-- · 2020-01-28 05:28

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>)
查看更多
Root(大扎)
4楼-- · 2020-01-28 05:29

In my case, it was with setting a value to a parameter in a function to nil that was causing the error.

Before:

public func comparableValidator<T: Comparable>(minValue : T? = nil, maxValue : T? = nil, value: T) -> Void {
    if let min = minValue {
        _assertFunc(min <= value, "\(value) must be at least \(min)")
    }

    if let max = maxValue {
        _assertFunc(max >= value, "\(value) must be at most \(max)")
    }
}

After:

public func comparableValidator<T: Comparable>(minValue : T?, maxValue : T?, value: T) -> Void {
    if let min = minValue {
        _assertFunc(min <= value, "\(value) must be at least \(min)")
    }

    if let max = maxValue {
        _assertFunc(max >= value, "\(value) must be at most \(max)")
    }
}
查看更多
5楼-- · 2020-01-28 05:32

I was able to resolve it by making a change to the bridging header. In my case adding a line break was sufficient. Very strange bug.

查看更多
神经病院院长
6楼-- · 2020-01-28 05:33

For me it was MD5.swift issue

What you have to do is search in your project for file name "MD5.swift" even in the pods

and replace all the content with this file here

https://github.com/onmyway133/SwiftHash/blob/master/Sources/MD5.swift

查看更多
迷人小祖宗
7楼-- · 2020-01-28 05:34

This issue is still present in Xcode 10.2.1. After cleaning the build folder, the error went away.

查看更多
登录 后发表回答