Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode failed with exit code 254

I've looked for a solution but i found nothing. Withe the beta 3 of XCode 6 my code doesn't work anymore. Xcode returns me this error:

While emitting SIL for 'tableView' at /Users/Marco/Desktop/iPrescription/iPrescription/MedicineTableViewController.swift:109:14 :0: error: unable to execute command: Segmentation fault: 11 :0: error: swift frontend command failed due to signal (use -v to see invocation) Command /Applications/Xcode6-Beta3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift failed with exit code 254

i'm new to ios programming and i don't know what to do to finding the origin of this problem. I'm very frustrated because i don't know what looking for.

like image 713
Andorath Avatar asked Jul 08 '14 10:07

Andorath


1 Answers

The same issue for me, but with collection view in my case. I found it caused by line:

let cell = collectionView?.dequeueReusableCellWithReuseIdentifier(reuseIdentifier, forIndexPath: indexPath) as CustomCell

I just changed it to:

let cell = collectionView!.dequeueReusableCellWithReuseIdentifier(reuseIdentifier, forIndexPath: indexPath) as CustomCell

and my app back to life again. Still have no idea why.

UPDATE:

Just noticed that method signature changed in beta3 and collectionView (to tableView in your case) forced to unwrap:

override func collectionView(collectionView: UICollectionView**!**, cellForItemAtIndexPath indexPath: NSIndexPath!) -> UICollectionViewCell!

so we need to fix data source methods and use collectionView or tableView directly.

like image 84
Ilya Belikin Avatar answered Nov 06 '22 17:11

Ilya Belikin