1

When I update Xcode 6 from Beta 4 to the Beta 6, I have this (new) compiler error and I don't know how to fix it.

<unknown>:0: error: unable to execute command: Segmentation fault: 11
<unknown>:0: error: swift frontend command failed due to signal (use -v to see invocation)
Command /Applications/Xcode6-Beta6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 254

The concerned lines are these

let reuseId = "test"

    var anView = mapView.dequeueReusableAnnotationViewWithIdentifier(reuseId)
    if anView == nil{...}

Thanks.

PMIW
  • 757
  • 2
  • 7
  • 15

3 Answers3

2

I'm having a similar issue when archiving in beta 6 & 7. I finally tracked it down to something to do with the Swift Compiler - Code Generation - Optimization Level - Fastest[-O]. If set the optimization level to none everything works fine, but when set to anything else xcode throws a 254 error.

JTerry
  • 139
  • 8
1

I'd love to simply write this as a comment to your question, but I'm lacking reputation to do so.

I have a similar problem, and I have tracked it down to CoreLocation in combination with MapKit (from your other questions, I think you are building a location based app as well) by basically copying and pasting my old project line by line into a new one.

Once I use CoreLocation and MapKit combined (in two different controllers), this error comes up.

import UIKit
import CoreLocation

class ViewController: UIViewController, CLLocationManagerDelegate {

override func viewDidLoad() {
    super.viewDidLoad()

    }
}

and

import UIKit
import MapKit

class SecondViewController: UIViewController, MKMapViewDelegate {

override func viewDidLoad() {
    super.viewDidLoad()

    }
}

with both MapKit and CoreLocation added, I get

<unknown>:0: error: unable to execute command: Segmentation fault: 11
<unknown>:0: error: merge-module command failed due to signal (use -v to see invocation)
Command /Applications/Xcode6-Beta6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 254 

or

Use of undeclared type 'CLLocationManagerDelegate'

depending on if I also add MapKit to ViewController (without adding MKMapViewDelegate). I also makes a difference if I add MKMapViewDelegate to SecondViewController before adding an import MapKit statement to ViewController - just so you have an idea of how weird this behavior is.

I know, it's a long shot, but maybe you can gain some insight here.

EDIT: And oh - I'm quite sure this is simply an Xcode bug. They call it beta for a reason.

schnabler
  • 687
  • 7
  • 23
  • That would have been a really long comment :-) – vacawama Sep 02 '14 at 00:30
  • A really long one yeah ! :) But @schnabler, I think it is a simply Xcode bug too, and I have no idea to do with this strange behaviour... Try to Ask your question but I think the response will be the same ! – PMIW Sep 03 '14 at 06:22
0

The bug was solved in Beta 7 available online today.

PMIW
  • 757
  • 2
  • 7
  • 15