Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 8 random command failed due to signal segmentation fault 11

I have a strange problem with the new Xcode 8 (no beta version) and swift3.

Once every other 3-4 times that I compile my code I get a 'command failed due to signal segmentation fault 11' error. I just need to enter new empty line, or sometimes changing some spaces, or add a comment (everywhere in the code) and the error disappears and I can compile again. This is really strange because I'm not changing anything in the code! And sometimes I can compile and it works, then I don't change anything, I compile again and I get the error. This is really annoying!

I have noticed this is happening since I have installed several 'Firebase' pods (Firebase, Firebase/Auth etc...). But I need them.

Anyone has any suggestion?

PS: I have set the Enable Bitcode of my project to No as many solution suggested, but nothing. In the error message it is not indicated any swift page where the error can be, an example is:

  1. While loading members for 'Class_name' at
  2. While deserializing 'func_name' (FuncDecl #42)

'func_name' is this one:

public class func loginUser(fir_user: FIRUser) {
    let user = SFUser()
    user.email = fir_user.email 
    user.isLogged = true
    try! sfRealm.write() {
        sfRealm.add(user, update:true)
    }

    var userToAdd = [String:AnyObject]()
    userToAdd["email"] = fir_user.email! as NSString

    let ref=FIRDatabase.database().reference()
    let usersRef = ref.child(childName)
    usersRef.setValue([key:value])
}

But then, as I said, I can just enter an empty row in another file and it compiles!

Thanks

like image 684
Andrea.Ferrando Avatar asked Sep 15 '16 08:09

Andrea.Ferrando


1 Answers

I have the same issue i just figure out that i was using xcode 8.1 and the project's working copy was in xcode 8.2.1 so i just re install xcode 8.2.1 and problem got solved. Hope other can get the help trough this.

like image 78
Premal Khetani Avatar answered Nov 11 '22 03:11

Premal Khetani