2017-04-05 66 views
1

將Xcode從8.2.1升級到8.3後,錯誤發生在RMActionController庫中,每次創建RMAction實例。Xcode 8.3編譯錯誤分割錯誤:11

例如:

func showRedeem() { 
    let actionController = RMActionController(style: .white)! 
    actionController.title = "TITLE" 

    let confirmAction = RMAction(title: "Confirm", style: .cancel) // #1 
    actionController.addAction(confirmAction!) // #2 

    self.present(actionController, animated: true, completion: nil) 
} 

當我評論的#1和#2,編譯成功!

和編譯日誌:

0 swift     0x000000010b081eb7 PrintStackTraceSignalHandler(void*) + 39 
1 swift     0x000000010b081366 SignalHandler(int) + 646 
2 libsystem_platform.dylib 0x00007fffd1021b3a _sigtramp + 26 
3 libsystem_platform.dylib 0x00007ffd6147c3f0 _sigtramp + 2420484304 
4 swift     0x0000000108ef2848 swift::GenericSignature::getSubstitutionMap(llvm::ArrayRef<swift::Substitution>, swift::SubstitutionMap&) const + 88 
5 swift     0x0000000108728228 swift::Lowering::SILGenFunction::buildThunkType(swift::Lowering::ManagedValue, swift::CanTypeWrapper<swift::SILFunctionType>, swift::CanTypeWrapper<swift::SILFunctionType>&, swift::GenericEnvironment*&, swift::SubstitutionMap&, swift::SubstitutionMap&) + 1064 
6 swift     0x000000010872b901 createThunk(swift::Lowering::SILGenFunction&, swift::SILLocation, swift::Lowering::ManagedValue, swift::Lowering::AbstractionPattern, swift::CanTypeWrapper<swift::AnyFunctionType>, swift::Lowering::AbstractionPattern, swift::CanTypeWrapper<swift::AnyFunctionType>, swift::Lowering::TypeLowering const&) + 289 
7 swift     0x0000000108729531 (anonymous namespace)::Transform::transform(swift::Lowering::ManagedValue, swift::Lowering::AbstractionPattern, swift::CanType, swift::Lowering::AbstractionPattern, swift::CanType, swift::Lowering::SGFContext) + 1617 
8 swift     0x000000010872b7c3 swift::Lowering::ManagedValue llvm::function_ref<swift::Lowering::ManagedValue (swift::Lowering::SILGenFunction&, swift::SILLocation, swift::Lowering::ManagedValue, swift::SILType)>::callback_fn<(anonymous namespace)::Transform::transform(swift::Lowering::ManagedValue, swift::Lowering::AbstractionPattern, swift::CanType, swift::Lowering::AbstractionPattern, swift::CanType, swift::Lowering::SGFContext)::$_5>(long, swift::Lowering::SILGenFunction&, swift::SILLocation, swift::Lowering::ManagedValue, swift::SILType) + 163 
9 swift     0x00000001086c94d1 swift::Lowering::SILGenFunction::emitOptionalToOptional(swift::SILLocation, swift::Lowering::ManagedValue, swift::SILType, llvm::function_ref<swift::Lowering::ManagedValue (swift::Lowering::SILGenFunction&, swift::SILLocation, swift::Lowering::ManagedValue, swift::SILType)>) + 1217 
10 swift     0x00000001087296f6 (anonymous namespace)::Transform::transform(swift::Lowering::ManagedValue, swift::Lowering::AbstractionPattern, swift::CanType, swift::Lowering::AbstractionPattern, swift::CanType, swift::Lowering::SGFContext) + 2070 
11 swift     0x0000000108728ecb swift::Lowering::SILGenFunction::emitOrigToSubstValue(swift::SILLocation, swift::Lowering::ManagedValue, swift::Lowering::AbstractionPattern, swift::CanType, swift::Lowering::SGFContext) + 155 
12 swift     0x0000000108692f01 (anonymous namespace)::ScalarResultPlan::finish(swift::Lowering::SILGenFunction&, swift::SILLocation, swift::CanType, llvm::ArrayRef<swift::Lowering::ManagedValue>&) + 641 
13 swift     0x0000000108692250 swift::Lowering::SILGenFunction::emitApply(swift::SILLocation, swift::Lowering::ManagedValue, llvm::ArrayRef<swift::Substitution>, llvm::ArrayRef<swift::Lowering::ManagedValue>, swift::CanTypeWrapper<swift::SILFunctionType>, swift::Lowering::AbstractionPattern, swift::CanType, swift::Lowering::ApplyOptions, llvm::Optional<swift::SILFunctionTypeRepresentation>, llvm::Optional<swift::ForeignErrorConvention> const&, swift::Lowering::SGFContext) + 8736 
14 swift     0x0000000108697eb1 (anonymous namespace)::CallEmission::apply(swift::Lowering::SGFContext) + 8449 
15 swift     0x00000001086e32ec swift::ASTVisitor<(anonymous namespace)::RValueEmitter, swift::Lowering::RValue, void, void, void, void, void, swift::Lowering::SGFContext>::visit(swift::Expr*, swift::Lowering::SGFContext) + 124 
16 swift     0x000000010869afea (anonymous namespace)::ArgEmitter::emit(swift::Lowering::ArgumentSource&&, swift::Lowering::AbstractionPattern) + 1322 
17 swift     0x000000010869fc64 (anonymous namespace)::ArgEmitter::emitShuffle(swift::Expr*, swift::Expr*, llvm::ArrayRef<swift::TupleTypeElt>, swift::ConcreteDeclRef, llvm::ArrayRef<swift::Expr*>, llvm::ArrayRef<int>, llvm::ArrayRef<unsigned int>, swift::Type, swift::Lowering::AbstractionPattern) + 5380 
18 swift     0x000000010869d676 (anonymous namespace)::ArgEmitter::emitExpanded(swift::Lowering::ArgumentSource&&, swift::Lowering::AbstractionPattern) + 1958 
19 swift     0x000000010869abde (anonymous namespace)::ArgEmitter::emit(swift::Lowering::ArgumentSource&&, swift::Lowering::AbstractionPattern) + 286 
20 swift     0x000000010869a246 (anonymous namespace)::CallSite::emit(swift::Lowering::SILGenFunction&, swift::Lowering::AbstractionPattern, (anonymous namespace)::ParamLowering&, llvm::SmallVectorImpl<swift::Lowering::ManagedValue>&, llvm::SmallVectorImpl<std::__1::pair<swift::Lowering::LValue, swift::SILLocation> >&, llvm::Optional<swift::ForeignErrorConvention> const&, swift::ImportAsMemberStatus const&) && + 438 
21 swift     0x000000010869759b (anonymous namespace)::CallEmission::apply(swift::Lowering::SGFContext) + 6123 
22 swift     0x00000001086e32ec swift::ASTVisitor<(anonymous namespace)::RValueEmitter, swift::Lowering::RValue, void, void, void, void, void, swift::Lowering::SGFContext>::visit(swift::Expr*, swift::Lowering::SGFContext) + 124 
23 swift     0x00000001086e310c swift::Lowering::SILGenFunction::emitExprInto(swift::Expr*, swift::Lowering::Initialization*) + 188 
24 swift     0x00000001086d0b56 swift::Lowering::SILGenFunction::emitPatternBinding(swift::PatternBindingDecl*, unsigned int) + 198 
25 swift     0x0000000108740388 swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(swift::Stmt*) + 14712 
26 swift     0x00000001086ff979 swift::Lowering::SILGenFunction::emitFunction(swift::FuncDecl*) + 409 
27 swift     0x0000000108680d2b swift::Lowering::SILGenModule::emitFunction(swift::FuncDecl*)::$_1::operator()(swift::SILFunction*) const + 1867 
28 swift     0x000000010867f902 swift::Lowering::SILGenModule::emitFunction(swift::FuncDecl*) + 642 
29 swift     0x000000010874539b (anonymous namespace)::SILGenType::emitType() + 971 
30 swift     0x0000000108744f6d swift::Lowering::SILGenModule::visitNominalTypeDecl(swift::NominalTypeDecl*) + 29 
31 swift     0x000000010868d33b swift::Lowering::SILGenModule::emitSourceFile(swift::SourceFile*, unsigned int) + 1483 
32 swift     0x000000010868ef19 swift::SILModule::constructSIL(swift::ModuleDecl*, swift::SILOptions&, swift::FileUnit*, llvm::Optional<unsigned int>, bool, bool) + 1593 
33 swift     0x0000000107ea10b2 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 42402 
34 swift     0x0000000107e5088c main + 9052 
35 libdyld.dylib   0x00007fffd0e12235 start + 1 
36 libdyld.dylib   0x00000000000000d4 start + 790552224 
Stack dump: 
0. Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -filelist /var/folders/yv/m9thf9fs3qg012jlp4sw3zd00000gn/T/sources-bbebe3 -primary-file /Path/ios/x/x/Code/ViewController/StrategyGroupViewController.swift -target x86_64-apple-ios9.0 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.3.sdk -I /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/ACTabScrollView -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/AMScrollingNavbar -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/ARChromeActivity -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/Alamofire -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/AsyncSwift -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/Bolts -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/Cheetah -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/EZSwipeController -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/FBSDKCoreKit -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/FBSDKLoginKit -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/FBSDKShareKit -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/FSCalendar -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/GTMOAuth2 -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/GTMSessionFetcher -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/IQKeyboardManagerSwift -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/JGProgressHUD -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/KCFloatingActionButton -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/KINWebBrowser -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/LicensesViewController -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/Localize-Swift -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/M13ProgressSuite -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/MarqueeLabel -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/PromiseKit -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/RMActionController -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/RMDateSelectionViewController -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/RMPickerViewController -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/Realm -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/RealmSwift -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/SDWebImage -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/ScrollableGraphView -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/SideMenu -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/SnapKit -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/Spring -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/SwiftDate -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/SwiftyJSON -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/SwiftyStoreKit -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/TTGSnackbar -F /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/TUSafariActivity -F /Path/ios/x/Pods/Crashlytics/iOS -F /Path/ios/x/Pods/FBAudienceNetwork -F /Path/ios/x/Pods/Fabric/iOS -F /Path/ios/x/Pods/FirebaseAnalytics/Frameworks -F /Path/ios/x/Pods/FirebaseAuth/Frameworks -F /Path/ios/x/Pods/FirebaseCore/Frameworks -F /Path/ios/x/Pods/FirebaseDatabase/Frameworks -F /Path/ios/x/Pods/FirebaseInstanceID/Frameworks -F /Path/ios/x/Pods/Google/Frameworks -F /Path/ios/x/Pods/GoogleSignIn/Frameworks -F /Path/ios/x/Pods/TwitterCore/iOS -F /Path/ios/x/Pods/TwitterKit/iOS -F /Path/ios/x/SDK/Line/LineAdapter -enable-testing -g -module-cache-path /Users/tericky/Library/Developer/Xcode/DerivedData/ModuleCache -D COCOAPODS -D DEBUG -serialize-debugging-options -Xcc -I/Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Intermediates/x.build/Debug-iphonesimulator/x.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Intermediates/x.build/Debug-iphonesimulator/x.build/x-generated-files.hmap -Xcc -I/Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Intermediates/x.build/Debug-iphonesimulator/x.build/x-own-target-headers.hmap -Xcc -I/Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Intermediates/x.build/Debug-iphonesimulator/x.build/x-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Intermediates/x.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Intermediates/x.build/Debug-iphonesimulator/x.build/x-project-headers.hmap -Xcc -I/Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Products/Debug-iphonesimulator/include -Xcc -I/Path/ios/x/Pods/Firebase/Core/Sources -Xcc -I/Path/ios/x/Pods/Google/Headers -Xcc -I/Path/ios/x/Pods/Headers/Public -Xcc -I/Path/ios/x/Pods/Headers/Public/Crashlytics -Xcc -I/Path/ios/x/Pods/Headers/Public/FBAudienceNetwork -Xcc -I/Path/ios/x/Pods/Headers/Public/Fabric -Xcc -I/Path/ios/x/Pods/Headers/Public/Firebase -Xcc -I/Path/ios/x/Pods/Headers/Public/FirebaseAnalytics -Xcc -I/Path/ios/x/Pods/Headers/Public/FirebaseAuth -Xcc -I/Path/ios/x/Pods/Headers/Public/FirebaseCore -Xcc -I/Path/ios/x/Pods/Headers/Public/FirebaseDatabase -Xcc -I/Path/ios/x/Pods/Headers/Public/FirebaseInstanceID -Xcc -I/Path/ios/x/Pods/Headers/Public/Google -Xcc -I/Path/ios/x/Pods/Headers/Public/GoogleSignIn -Xcc -I/Path/ios/x/Pods/Headers/Public/TwitterCore -Xcc -I/Path/ios/x/Pods/Headers/Public/TwitterKit -Xcc -I/Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Intermediates/x.build/Debug-iphonesimulator/x.build/DerivedSources/x86_64 -Xcc -I/Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Intermediates/x.build/Debug-iphonesimulator/x.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -DCOCOAPODS=1 -Xcc -DDEBUG=1 -Xcc -DGTM_OAUTH2_USE_FRAMEWORK_IMPORTS=1 -Xcc -working-directory/Path/ios/x -emit-module-doc-path /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Intermediates/x.build/Debug-iphonesimulator/x.build/Objects-normal/x86_64/StrategyGroupViewController~partial.swiftdoc -serialize-diagnostics-path /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Intermediates/x.build/Debug-iphonesimulator/x.build/Objects-normal/x86_64/StrategyGroupViewController.dia -import-objc-header /Path/ios/x/x/x-Bridging-Header.h -Onone -module-name NoQ_Themepark -emit-module-path /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Intermediates/x.build/Debug-iphonesimulator/x.build/Objects-normal/x86_64/StrategyGroupViewController~partial.swiftmodule -emit-dependencies-path /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Intermediates/x.build/Debug-iphonesimulator/x.build/Objects-normal/x86_64/StrategyGroupViewController.d -emit-reference-dependencies-path /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Intermediates/x.build/Debug-iphonesimulator/x.build/Objects-normal/x86_64/StrategyGroupViewController.swiftdeps -o /Users/tericky/Library/Developer/Xcode/DerivedData/x-fqcvlvimnhlizjcywfllclinonjz/Build/Intermediates/x.build/Debug-iphonesimulator/x.build/Objects-normal/x86_64/StrategyGroupViewController.o 
1. While emitting SIL for 'showRedeem' at /Path/ios/x/x/Code/ViewController/StrategyGroupViewController.swift:400:5 

我該怎麼辦?

回答

0

從調試我自己的Segmentation Fault 11問題我看到一個常見的建議,有時候工作是刪除/重新安裝依賴 - 這從來沒有幫助過我,但值得嘗試。

快速查看RMActionController項目,您可能需要調查在第1步中使用操作處理程序閉包(即使是空的閉包)創建動作並查看是否有幫助,例如,

let confirmAction = RMAction(title: "Confirm", style: .cancel, andHandler: { _ in }) // #1 

做不到這一切,你也可以在bugs.swift.org提交錯誤報告,但球隊需要,而不是僅僅指出第三方庫不起作用最小的可重複的例子。

+0

謝謝!添加空關閉後,編譯成功。但仍然不知道爲什麼我需要填充可選參數。 –

+0

我不熟悉從Objective-C nullable橋接到Swift可選,但它看起來是正確的。我的猜測是代碼是正確的,這是一個編譯器錯誤! – MathewS

+0

很奇怪,swift 3.0可以,但swift 3.1是失敗的。我甚至用null可選處理程序編寫一個小測試樣本,編譯非常成功:( –