Xcode 8 (Swift 3) El command falló debido a la señal: Asesinado: 9

Después de actualizar a Xcode 8 y convertir todo mi código a Swift 3, tengo problemas para comstackr resources rápidos. Me lleva mucho time, y mi computadora se vuelve muy lamida y después de unos 30 minutos obtengo esto

CompileSwift normal arm64 /Users/choojayson/Dropbox/BottomsUp/Thirst/UserDrank.swift cd / Users / choojayson / Dropbox / BottomsUp /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/choojayson/Dropbox/BottomsUp/Thirst/PendingVC.swift /Users/choojayson/Dropbox/BottomsUp/Thirst/NotificationCell.swift /Users/choojayson/Dropbox/BottomsUp/Thirst/ProfileCell.swift / Users / choojayson / Dropbox /BottomsUp/Thirst/NotificationsVC.swift /Users/choojayson/Dropbox/BottomsUp/Thirst/UserPendingAction.swift /Users/choojayson/Dropbox/BottomsUp/Thirst/ChooseDrinkVC.swift /Users/choojayson/Dropbox/BottomsUp/Thirst/AppDelegate.swift /Users/choojayson/Dropbox/BottomsUp/Thirst/UserCell.swift /Users/choojayson/Dropbox/BottomsUp/Thirst/FirebaseReferences.swift /Users/choojayson/Dropbox/BottomsUp/Thirst/ProfileStatsCell.swift / Users / choojayson / Dropbox / BottomsUp /Thir/UserDrankTime.swift /Users/choojayson/Dropbox/BottomsUp/Thirst/MyProfileVC.swift / Users / chooj ayson / Dropbox / BottomsUp / Thirst / ProfileStatsFooterCell.swift /Users/choojayson/Dropbox/BottomsUp/Thirst/WeeklyDrank.swift /Users/choojayson/Dropbox/BottomsUp/Thirst/DrinkList.swift / Users / choojayson / Dropbox / BottomsUp / Thirst / DrinkCell.swift /Users/choojayson/Dropbox/BottomsUp/Thirst/User.swift /Users/choojayson/Dropbox/BottomsUp/Thirst/HeaderCell.swift /Users/choojayson/Dropbox/BottomsUp/Thirst/EndorseVC.swift / Users / choojayson / Dropbox / BottomsUp / Thirst / GlobalScore.swift /Users/choojayson/Dropbox/BottomsUp/Thirst/Username.swift /Users/choojayson/Dropbox/BottomsUp/HomeVC.swift /Users/choojayson/Dropbox/BottomsUp/Thirst/LoginVC.swift / Usuarios / choojayson / Dropbox / BottomsUp / Thirst / LeaderBoardVC.swift /Users/choojayson/Dropbox/BottomsUp/Thirst/CollectionViewHeaderCell.swift /Users/choojayson/Dropbox/BottomsUp/Thirst/Global.swift / Users / choojayson / Dropbox / BottomsUp / Sed / CircularTransition.swift /Users/choojayson/Dropbox/BottomsUp/Thirst/Drink.swift / Users / choojayson / Dropbox / BottomsUp / Thirst / Week lyBestVC.swift /Users/choojayson/Dropbox/BottomsUp/Thirst/DrinkStatus.swift /Users/choojayson/Dropbox/BottomsUp/Thirst/LeaderBoardCell.swift /Users/choojayson/Dropbox/BottomsUp/Thirst/PendingCell.swift -primary-file / Usuarios / choojayson / Dropbox / BottomsUp / Thirst / UserDrank.swift -target arm64-apple-ios8.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms /iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk -I / Users / choojayson / Library / Developer / Xcode / DerivedData / Thirst-fbgpdykwgpyxllfixfnpenbijinz / Build / Products / Debug-iphoneos -F / Users / choojayson / Library / Developer / Xcode / DerivedData / Thirst-fbgpdykwgpyxllfixfnpenbijinz / Build / Products / Debug-iphoneos -F / Users / choojayson / Library / Developer / Xcode / DerivedData / Thirst-fbgpdykwgpyxllfixfnpenbijinz / Build / Products / Debug-iphoneos / SDWebImage -F / Users / choojayson / Dropbox / BottomsUp / Pods / FirebaseAnalytics / Frameworks / frameworks -F / Users / choojayson / Dropbox / BottomsUp / Pods / FirebaseAuth / Frameworks / frameworks -F / Users / choojayson / Dropbox / BottomsUp / Pods / FirebaseDatabase / Frameworks -F / Users / choojayson / Dropbox / BottomsUp / Pods / FirebaseInstanceID / Frameworks / frameworks -F / Users / choojayson / Dropbox / BottomsUp / Pods / FirebaseMessaging / Frameworks / frameworks -F / Users / choojayson / Dropbox / BottomsUp / Pods / FirebaseStorage / Frameworks -F / Users / choojayson / Dropbox / BottomsUp / Pods / GoogleIPhoneUtilities / Frameworks -F / Users / choojayson / Dropbox / BottomsUp / Pods / GoogleInterchangeUtilities / Frameworks -F / Users / choojayson / Dropbox / BottomsUp / Pods / GoogleUtilizadores / Frameworks -F / Users / choojayson / Dropbox / BottomsUp / Pods / GoogleParsingUtilities / Frameworks -F / Users / choojayson / Dropbox / BottomsUp / Pods / GoogleSymbolUtilities / Frameworks -F / Users / choojayson / Dropbox / BottomsUp / Pods / GoogleUtilities / Frameworks -F / Users / choojayson / Dropbox / BottomsUp -enable-testing -g -module-cache-path / Usuarios / choojayson / Library / Developer / Xcode / DerivedData / ModuleCache -serialize -debugging-options -Xcc -I / Users / choojayson / Library / Developer / Xcode / Der ivedData / Thirst-fbgpdykwgpyxllfixfnpenbijinz / Build / Intermediates / Thirst.build / Debug-iphoneos / Thirst.build / swift-overrides.hmap -Xcc -iquote -Xcc / Users / choojayson / Library / Developer / Xcode / DerivedData / Thirst-fbgpdykwgpyxllfixfnpenbijinz / Build / Intermediates / Thirst.build / Debug-iphoneos / Thirst.build / Thirst-generated-files.hmap-Xcc -I / Users / choojayson / Library / Developer / Xcode / DerivedData / Thirst-fbgpdykwgpyxllfixfnpenbijinz / Build / Intermediates / Thirst. build / Debug-iphoneos / Thirst.build / Thirst-own-target-headers.hmap -Xcc -I / Users / choojayson / Library / Developer / Xcode / DerivedData / Thirst-fbgpdykwgpyxllfixfnpenbijinz / Build / Intermediates / Thirst.build / Debug- iphoneos / Thirst.build / Thirst-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/choojayson/Library/Developer/Xcode/DerivedData/Thirst-fbgpdykwgpyxllfixfnpenbijinz/Build/Intermediates/Thirst.build/ all-product-headers.yaml -Xcc -iquote -Xcc / Users / choojayson / Library / Developer / Xcode / DerivedData / Thirst-fbgpdykwgpyxllfixfnpenbijinz / Build /Intermediates/Thirst.build/Debug-iphoneos/Thirst.build/Thirst-project-headers.hmap -Xcc -I / Users / choojayson / Library / Developer / Xcode / DerivedData / Thirst-fbgpdykwgpyxllfixfnpenbijinz / Build / Products / Debug-iphoneos / include -Xcc -I / Users / choojayson / Dropbox / BottomsUp / Pods / Firebase / Analytics / Sources -Xcc -I / Users / choojayson / Dropbox / BottomsUp / Pods / Headers / Public -Xcc -I / Users / choojayson / Dropbox / BottomsUp / Pods / Headers / Public / Firebase -Xcc -I / Users / choojayson / Dropbox / BottomsUp / Pods / Headers / Public / FirebaseAnalytics -Xcc -I / Users / choojayson / Dropbox / BottomsUp / Pods / Headers / Public / FirebaseAuth -Xcc -I / Users / choojayson / Dropbox / BottomsUp / Pods / Headers / Public / FirebaseDatabase -Xcc -I / Users / choojayson / Dropbox / BottomsUp / Pods / Headers / Public / FirebaseInstanceID -Xcc -I / Users / choojayson / Dropbox / BottomsUp / Pods / Headers / Public / FirebaseMessaging -Xcc -I / Users / choojayson / Dropbox / BottomsUp / Pods / Headers / Public / FirebaseStorage -Xcc -I / Users / choojayson / Dropbox / BottomsUp / Pods / Headers / Public / GoogleIPhoneUtilities -Xcc -I / Users / choojayson / Dropbox / BottomsUp / Pods / Headers / Public / GoogleInterchangeUtilities -Xcc -I / Users / choojayson / Dropbox / BottomsUp / Pods / Headers / Public / GoogleUtilizadores de networking -Xcc -I / Users / choojayson / Dropbox / BottomsUp / Pods / Headers / Public / GoogleParsingUtilities -Xcc -I / Users / choojayson / Dropbox / BottomsUp / Pods / Headers / Public / GoogleSymbolUtilities -Xcc -I / Users / choojayson / Dropbox / BottomsUp / Pods / Headers / Public / GoogleUtilities -Xcc -I /Users/choojayson/Library/Developer/Xcode/DerivedData/Thirst-fbgpdykwgpyxllfixfnpenbijinz/Build/Intermediates/Thirst.build/Debug-iphoneos/Thirst.build/DerivedSources/arm64 -Xcc -I / Users / choojayson / Library / Developer / Xcode /DerivedData/Thirst-fbgpdykwgpyxllfixfnpenbijinz/Build/Intermediates/Thirst.build/Debug-iphoneos/Thirst.build/DerivedSources -Xcc -DDEBUG = 1 -Xcc -DCOCOAPODS = 1 -Xcc -working-directory / Users / choojayson / Dropbox / BottomsUp -emit-module-doc-path / Users / choojayson / Library / Developer / Xcode / DerivedData / Thirst-fbgpdykwgpyxllfixfnpenbijinz / Build / Intermediates / T hirst.build/Debug-iphoneos/Thirst.build/Objects-normal/arm64/UserDrank~partial.swiftdoc -One -module-name Thirst -emit-module-path / Users / choojayson / Library / Developer / Xcode / DerivedData / Thirst -fbgpdykwgpyxllfixfnpenbijinz / Build / Intermediates / Thirst.build / Debug-iphoneos / Thirst.build / Objects-normal / arm64 / UserDrank ~ partial.swiftmodule -serialize-diagnostics-path / Usuarios / choojayson / Library / Developer / Xcode / DerivedData / Thirst -fbgpdykwgpyxllfixfnpenbijinz / Build / Intermediates / Thirst.build / Debug-iphoneos / Thirst.build / Objects-normal / arm64 / UserDrank.dia -emit-dependencies-path / Users / choojayson / Library / Developer / Xcode / DerivedData / Thirst-fbgpdykwgpyxllfixfnpenbijinz /Build/Intermediates/Thirst.build/Debug-iphoneos/Thirst.build/Objects-normal/arm64/UserDrank.d -emit-reference-dependencies-path / Users / choojayson / Library / Developer / Xcode / DerivedData / Thirst-fbgpdykwgpyxllfixfnpenbijinz /Build/Intermediates/Thirst.build/Debug-iphoneos/Thirst.build/Objects-normal/arm64/UserDrank.swiftdeps -o / Users / choojay son / Library / Developer / Xcode / DerivedData / Thirst-fbgpdykwgpyxllfixfnpenbijinz / Build / Intermediates / Thirst.build / Debug-iphoneos / Thirst.build / Objects-normal / arm64 / UserDrank.o -embed-bitcode-marker

Créalo o no, esta es la pieza de código que estaba causando el problema para mí. Con esto, la compilation tarda unos 30 minutos. Si simplemente comento ese trozo de código, se comstackrá en less de 30 segundos.

let params : [String: Any] = [ "person_id" : kPersonId, "person_promo_id" : promo.personPromoId!, "promo_page_id" : promo.promoPageId!, "seq_no" : promo.seqNo!, "promo_type" : promo.promoType!, "page_name" : promo.pageName!, "image_name" : promo.imageName!, "start_date" : promo.startDate!, "end_date" : promo.endDate!, "website" : promo.website!, "facility_name" : promo.facilityName!, "address" : promo.street!, "city" : promo.city!, "prov_state_cd" : promo.provState!, "country_cd" : promo.country!, "contact_name" : promo.contactName!, "contact_phone" : promo.contactPhone!, "latitude" : promo.latitude!, "longitude" : promo.longitude!, "bgColorRed" : promo.bgColorRed!, "bgColorGreen" : promo.bgColorGreen!, "bgColorBlue" : promo.bgColorBlue!, "promoCategories" : promoCat ] 

Basado en esto y otras cosas que he leído, searchía un caso en el que esté asignando valores a un dictionary grande o nested con un Any o AnyObject en la definición. Supongo que es el Any que está enviando el comstackdor en una buena persecución.

Si revisa su logging en el que falla, debería tener el error correcto en el object que falló. Esto debería darle una pista sobre qué file search.

Edit: @Jay Chow, así es como resolví el problema del comstackdor con el código anterior:

 var params : [String : Any] = [:] params["person_id"] = kPersonId params["person_promo_id"] = promo.personPromoId params["promo_page_id"] = promo.promoPageId params["seq_no"] = promo.seqNo params["promo_type"] = promo.promoType params["page_name"] = promo.pageName params["image_name"] = promo.imageName params["start_date"] = promo.startDate params["end_date"] = promo.endDate params["website"] = promo.website params["facility_name"] = promo.facilityName params["address"] = promo.street params["city"] = promo.city params["prov_state_cd"] = promo.provState params["country_cd"] = promo.country params["contact_name"] = promo.contactName params["contact_phone"] = promo.contactPhone params["latitude"] = promo.latitude params["longitude"] = promo.longitude params["bgColorRed"] = promo.bgColorRed params["bgColorGreen"] = promo.bgColorGreen params["bgColorBlue"] = promo.bgColorBlue params["promoCategories"] = promoCat 

En mi caso, cuando encontré ese problema, el trozo de código era:

  return realm2.objects(Alert.self).sorted(by: { (alert1, alert2) -> Bool in return alert1.hour < alert2.hour && alert1.minute < alert2.minute && alert1.label < alert2.label }) 

Mi caso tenía que ver con anexar demasiadas restricciones creadas por progtwigción a la vista de un controller de vista. Tenía varias matrices de restricciones definidas a nivel de class de la siguiente manera:

 lazy var labelConstraints: [NSLayoutConstraint] = [...] 

Estaba usando esta notación para todos los elementos de la interfaz de usuario en mi vista. Cuando terminé de build la vista, tenía aproximadamente 10 matrices de 3-5 NSLayoutConstraints.

Entonces estaba agregando una matriz concatenada a la matriz de restricciones de la vista como sigue:

 self.view.addConstraints(labelConstraints + buttonConstraints + viewConstraints, ...) 

Esta línea resultó ser el problema. Debe ser algo con initialization perezosa y concatenación de matriz en línea. Cualquiera sea la causa, he solucionado esto usando flatMap de la siguiente manera.

 let constraints = [labelConstraints, buttonConstraints, viewConstraints].flatMap{ $0 } self.view.addConstraints(constraints) 

En mi caso, estaba escribiendo una class que implementó Equatable y también tenía miembros generics. Mi problema se originó al comparar los miembros generics con == , cuando la class genérica no tenía un operador == implementado.

Por ejemplo (usando Variable desde RxSwift ):

 class Foo: Equatable { var fieldOne: Variable<String> = Variable("fieldOne") var fieldTwo: Variable<String?> = Variable(nil) public static func ==(lhs: Foo, rhs: Foo) -> Bool { //should be marked as a compiler error, since Variable doesn't have == return lhs.fieldOne == rhs.fieldOne && lhs.fieldTwo == rhs.fieldTwo } } 

Debería haber visto un error de compilation para esto, ya que no existe una definición de == para Variable , pero el comstackdor se bloquearía (así como el análisis estático) antes de poder mostrarlo. Estaba viendo el uso de memory de 60 GB + antes del crash. Yikes.

Parece rápido todavía tiene algunos errores persistentes cuando se trata de generics.

En mi caso, Xcode 9, Swift 4, el comstackdor no pudo soportar la adición de 8 numbers:

 let aBitPattern: UInt64 = ((UInt64(a) & UInt64(0xff)) << 0) + ((UInt64(b) & UInt64(0xff)) << 8) + ((UInt64(c) & UInt64(0xff)) << 16) + ((UInt64(d) & UInt64(0xff)) << 24) + ((UInt64(e) & UInt64(0xff)) << 32) + ((UInt64(f) & UInt64(0xff)) << 40) + ((UInt64(g) & UInt64(0xff)) << 48) + ((UInt64(h) & UInt64(0xff)) << 56) 

Transformando a esto resuelto la compilation infinita:

 var aBitPattern: UInt64 = ((UInt64(a) & UInt64(0xff)) << 0); aBitPattern += ((UInt64(b) & UInt64(0xff)) << 8); aBitPattern += ((UInt64(c) & UInt64(0xff)) << 16); aBitPattern += ((UInt64(d) & UInt64(0xff)) << 24); aBitPattern += ((UInt64(e) & UInt64(0xff)) << 32); aBitPattern += ((UInt64(f) & UInt64(0xff)) << 40); aBitPattern += ((UInt64(g) & UInt64(0xff)) << 48); aBitPattern += ((UInt64(h) & UInt64(0xff)) << 56); 

Sí, ya veces los puntos y comas ayudan al comstackdor a comprender su código también.

Siempre espero con ansia el nuevo comstackdor Swift y siempre es una gran decepción para Apple.