gpt4 book ai didi

ios - 分段故障 Swift 2 App

转载 作者:搜寻专家 更新时间:2023-11-01 06:43:47 25 4
gpt4 key购买 nike

我刚刚将我的项目转换为 Swift 2,并将整个代码转换为新语法。但是,当我尝试构建应用程序时出现段错误。以下是构建输出。

CompileSwift normal x86_64 /Users/satre/Developer/Projects/STSI/MedConf/Event.swift
cd /Users/satre/Developer/Projects/STSI
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/satre/Developer/Projects/STSI/MedConf/SpeakerDetailsViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/AboutUsViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/AttendeeCell.swift /Users/satre/Developer/Projects/STSI/MedConf/ConfirmNewProfileImageViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/SurveyViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/NotificationsTableViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/SponsorWebsiteViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/FavoritesTableViewController.swift /Users/satre/Developer/Projects/STSI/AgendaViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/AppDelegate.swift /Users/satre/Developer/Projects/STSI/MedConf/Sponsor.swift /Users/satre/Developer/Projects/STSI/MedConf/CustomNavController.swift /Users/satre/Developer/Projects/STSI/MedConf/StickyNotification.swift /Users/satre/Developer/Projects/STSI/MedConf/MoreInfoViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/TravelVC.swift /Users/satre/Developer/Projects/STSI/MedConf/SponsorsTableViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/SpeakerCell.swift /Users/satre/Developer/Projects/STSI/MedConf/BasicNavController.swift -primary-file /Users/satre/Developer/Projects/STSI/MedConf/Event.swift /Users/satre/Developer/Projects/STSI/MedConf/PublicConstants.swift /Users/satre/Developer/Projects/STSI/MedConf/Attendee.swift /Users/satre/Developer/Projects/STSI/MedConf/Conference.swift /Users/satre/Developer/Projects/STSI/MedConf/ConfInfoViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/DBQuestion.swift /Users/satre/Developer/Projects/STSI/MedConf/TravelBusiness.swift /Users/satre/Developer/Projects/STSI/MedConf/MyAcountPrefsTableViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/PeopleViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/EventDetailsViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/SideMenuTableVC.swift /Users/satre/Developer/Projects/STSI/MedConf/Speaker.swift /Users/satre/Developer/Projects/STSI/MedConf/NotificationManager.swift /Users/satre/Developer/Projects/STSI/MedConf/QRViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/ConfListTableViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/DiscussionBoard.swift /Users/satre/Developer/Projects/STSI/MedConf/ENSideMenu.swift /Users/satre/Developer/Projects/STSI/MedConf/Session.swift /Users/satre/Developer/Projects/STSI/MedConf/QRWebViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/ManTabBarController.swift /Users/satre/Developer/Projects/STSI/MedConf/ObjectManager.swift /Users/satre/Developer/Projects/STSI/MedConf/ColoredSegmentButton.swift /Users/satre/Developer/Projects/STSI/MedConf/DBManager.swift /Users/satre/Developer/Projects/STSI/MedConf/ENSideMenuNavigationController.swift -target x86_64-apple-ios8.0 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -I /Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Products/Debug-iphonesimulator -F /Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Products/Debug-iphonesimulator -F /Users/satre/Developer/Projects/STSI -F /Users/satre/Developer/Projects/STSI/MedConf -F /Users/satre/Downloads/parse-library-1 -enable-testing -g -import-objc-header /Users/satre/Developer/Projects/STSI/MedConf-Bridging-Header.h -module-cache-path /Users/satre/Library/Developer/Xcode/DerivedData/ModuleCache -D COCOAPODS -serialize-debugging-options -Xcc -I/Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Intermediates/STSI.build/Debug-iphonesimulator/STSI.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Intermediates/STSI.build/Debug-iphonesimulator/STSI.build/STSI-generated-files.hmap -Xcc -I/Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Intermediates/STSI.build/Debug-iphonesimulator/STSI.build/STSI-own-target-headers.hmap -Xcc -I/Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Intermediates/STSI.build/Debug-iphonesimulator/STSI.build/STSI-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Intermediates/STSI.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Intermediates/STSI.build/Debug-iphonesimulator/STSI.build/STSI-project-headers.hmap -Xcc -I/Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Intermediates/STSI.build/Debug-iphonesimulator/STSI.build/DerivedSources/x86_64 -Xcc -I/Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Intermediates/STSI.build/Debug-iphonesimulator/STSI.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -DCOCOAPODS=1 -Xcc -working-directory/Users/satre/Developer/Projects/STSI -emit-module-doc-path /Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Intermediates/STSI.build/Debug-iphonesimulator/STSI.build/Objects-normal/x86_64/Event~partial.swiftdoc -Onone -module-name STSI -emit-module-path /Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Intermediates/STSI.build/Debug-iphonesimulator/STSI.build/Objects-normal/x86_64/Event~partial.swiftmodule -serialize-diagnostics-path /Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Intermediates/STSI.build/Debug-iphonesimulator/STSI.build/Objects-normal/x86_64/Event.dia -emit-dependencies-path /Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Intermediates/STSI.build/Debug-iphonesimulator/STSI.build/Objects-normal/x86_64/Event.d -emit-reference-dependencies-path /Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Intermediates/STSI.build/Debug-iphonesimulator/STSI.build/Objects-normal/x86_64/Event.swiftdeps -o /Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Intermediates/STSI.build/Debug-iphonesimulator/STSI.build/Objects-normal/x86_64/Event.o

0 swift 0x000000010cc2cedb llvm::sys::PrintStackTrace(__sFILE*) + 43
1 swift 0x000000010cc2d61b SignalHandler(int) + 379
2 libsystem_platform.dylib 0x00007fff91811f1a _sigtramp + 26
3 libsystem_platform.dylib 0x00007fff54ec0d50 _sigtramp + 3278564944
4 swift 0x000000010b4038d5 swift::Type::transform(std::__1::function<swift::Type (swift::Type)> const&) const + 53
5 swift 0x000000010b245086 swift::constraints::ConstraintSystem::simplifyType(swift::Type, llvm::SmallPtrSet<swift::TypeVariableType*, 16u>&) + 54
6 swift 0x000000010b266cba swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 2362
7 swift 0x000000010b2693cf swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 143
8 swift 0x000000010b2c3bfc swift::TypeChecker::solveForExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem&, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 732
9 swift 0x000000010b2c87ba swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 474
10 swift 0x000000010b26e366 (anonymous namespace)::FailureDiagnosis::typeCheckChildIndependently(swift::Expr*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<TCCFlags, unsigned int>) + 806
11 swift 0x000000010b26c2cf swift::ASTVisitor<(anonymous namespace)::FailureDiagnosis, bool, void, void, void, void, void>::visit(swift::Expr*) + 4863
12 swift 0x000000010b2665c0 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 576
13 swift 0x000000010b2693cf swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 143
14 swift 0x000000010b2c3bfc swift::TypeChecker::solveForExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem&, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 732
15 swift 0x000000010b2c87ba swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 474
16 swift 0x000000010b26e366 (anonymous namespace)::FailureDiagnosis::typeCheckChildIndependently(swift::Expr*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<TCCFlags, unsigned int>) + 806
17 swift 0x000000010b26f305 std::__1::__function::__func<(anonymous namespace)::FailureDiagnosis::visitExpr(swift::Expr*)::$_9, std::__1::allocator<(anonymous namespace)::FailureDiagnosis::visitExpr(swift::Expr*)::$_9>, void (swift::Expr*)>::operator()(swift::Expr*&&) + 37
18 swift 0x000000010b3c8547 swift::Expr::forEachChildExpr(std::__1::function<void (swift::Expr*)> const&)::ChildWalker::walkToExprPre(swift::Expr*) + 39
19 swift 0x000000010b36dfa2 (anonymous namespace)::Traversal::visit(swift::Expr*) + 2610
20 swift 0x000000010b36cc85 swift::Expr::walk(swift::ASTWalker&) + 53
21 swift 0x000000010b3c61fc swift::Expr::forEachChildExpr(std::__1::function<void (swift::Expr*)> const&) + 44
22 swift 0x000000010b26c098 swift::ASTVisitor<(anonymous namespace)::FailureDiagnosis, bool, void, void, void, void, void>::visit(swift::Expr*) + 4296
23 swift 0x000000010b2665c0 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 576
24 swift 0x000000010b2693cf swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 143
25 swift 0x000000010b2c3bfc swift::TypeChecker::solveForExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem&, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 732
26 swift 0x000000010b2c87ba swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 474
27 swift 0x000000010b26e366 (anonymous namespace)::FailureDiagnosis::typeCheckChildIndependently(swift::Expr*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<TCCFlags, unsigned int>) + 806
28 swift 0x000000010b266583 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 515
29 swift 0x000000010b2693cf swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 143
30 swift 0x000000010b2c3bfc swift::TypeChecker::solveForExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem&, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 732
31 swift 0x000000010b2c87ba swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 474
32 swift 0x000000010b31ae5b swift::ASTVisitor<(anonymous namespace)::StmtChecker, void, swift::Stmt*, void, void, void, void>::visit(swift::Stmt*) + 411
33 swift 0x000000010b3199b2 swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 370
34 swift 0x000000010b31a2d3 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 179
35 swift 0x000000010b2b43b2 typeCheckFunctionsAndExternalDecls(swift::TypeChecker&) + 242
36 swift 0x000000010b2b50f7 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1831
37 swift 0x000000010b104224 swift::CompilerInstance::performSema() + 4340
38 swift 0x000000010ad3b605 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&) + 741
39 swift 0x000000010ad3b10a frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2682
40 swift 0x000000010ad37797 main + 2247
41 libdyld.dylib 0x00007fff99c895c9 start + 1
Stack dump:
0. Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/satre/Developer/Projects/STSI/MedConf/SpeakerDetailsViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/AboutUsViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/AttendeeCell.swift /Users/satre/Developer/Projects/STSI/MedConf/ConfirmNewProfileImageViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/SurveyViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/NotificationsTableViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/SponsorWebsiteViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/FavoritesTableViewController.swift /Users/satre/Developer/Projects/STSI/AgendaViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/AppDelegate.swift /Users/satre/Developer/Projects/STSI/MedConf/Sponsor.swift /Users/satre/Developer/Projects/STSI/MedConf/CustomNavController.swift /Users/satre/Developer/Projects/STSI/MedConf/StickyNotification.swift /Users/satre/Developer/Projects/STSI/MedConf/MoreInfoViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/TravelVC.swift /Users/satre/Developer/Projects/STSI/MedConf/SponsorsTableViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/SpeakerCell.swift /Users/satre/Developer/Projects/STSI/MedConf/BasicNavController.swift -primary-file /Users/satre/Developer/Projects/STSI/MedConf/Event.swift /Users/satre/Developer/Projects/STSI/MedConf/PublicConstants.swift /Users/satre/Developer/Projects/STSI/MedConf/Attendee.swift /Users/satre/Developer/Projects/STSI/MedConf/Conference.swift /Users/satre/Developer/Projects/STSI/MedConf/ConfInfoViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/DBQuestion.swift /Users/satre/Developer/Projects/STSI/MedConf/TravelBusiness.swift /Users/satre/Developer/Projects/STSI/MedConf/MyAcountPrefsTableViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/PeopleViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/EventDetailsViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/SideMenuTableVC.swift /Users/satre/Developer/Projects/STSI/MedConf/Speaker.swift /Users/satre/Developer/Projects/STSI/MedConf/NotificationManager.swift /Users/satre/Developer/Projects/STSI/MedConf/QRViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/ConfListTableViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/DiscussionBoard.swift /Users/satre/Developer/Projects/STSI/MedConf/ENSideMenu.swift /Users/satre/Developer/Projects/STSI/MedConf/Session.swift /Users/satre/Developer/Projects/STSI/MedConf/QRWebViewController.swift /Users/satre/Developer/Projects/STSI/MedConf/ManTabBarController.swift /Users/satre/Developer/Projects/STSI/MedConf/ObjectManager.swift /Users/satre/Developer/Projects/STSI/MedConf/ColoredSegmentButton.swift /Users/satre/Developer/Projects/STSI/MedConf/DBManager.swift /Users/satre/Developer/Projects/STSI/MedConf/ENSideMenuNavigationController.swift -target x86_64-apple-ios8.0 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -I /Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Products/Debug-iphonesimulator -F /Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Products/Debug-iphonesimulator -F /Users/satre/Developer/Projects/STSI -F /Users/satre/Developer/Projects/STSI/MedConf -F /Users/satre/Downloads/parse-library-1 -enable-testing -g -import-objc-header /Users/satre/Developer/Projects/STSI/MedConf-Bridging-Header.h -module-cache-path /Users/satre/Library/Developer/Xcode/DerivedData/ModuleCache -D COCOAPODS -serialize-debugging-options -Xcc -I/Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Intermediates/STSI.build/Debug-iphonesimulator/STSI.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Intermediates/STSI.build/Debug-iphonesimulator/STSI.build/STSI-generated-files.hmap -Xcc -I/Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Intermediates/STSI.build/Debug-iphonesimulator/STSI.build/STSI-own-target-headers.hmap -Xcc -I/Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Intermediates/STSI.build/Debug-iphonesimulator/STSI.build/STSI-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Intermediates/STSI.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Intermediates/STSI.build/Debug-iphonesimulator/STSI.build/STSI-project-headers.hmap -Xcc -I/Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Intermediates/STSI.build/Debug-iphonesimulator/STSI.build/DerivedSources/x86_64 -Xcc -I/Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Intermediates/STSI.build/Debug-iphonesimulator/STSI.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -DCOCOAPODS=1 -Xcc -working-directory/Users/satre/Developer/Projects/STSI -emit-module-doc-path /Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Intermediates/STSI.build/Debug-iphonesimulator/STSI.build/Objects-normal/x86_64/Event~partial.swiftdoc -Onone -module-name STSI -emit-module-path /Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Intermediates/STSI.build/Debug-iphonesimulator/STSI.build/Objects-normal/x86_64/Event~partial.swiftmodule -serialize-diagnostics-path /Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Intermediates/STSI.build/Debug-iphonesimulator/STSI.build/Objects-normal/x86_64/Event.dia -emit-dependencies-path /Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Intermediates/STSI.build/Debug-iphonesimulator/STSI.build/Objects-normal/x86_64/Event.d -emit-reference-dependencies-path /Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Intermediates/STSI.build/Debug-iphonesimulator/STSI.build/Objects-normal/x86_64/Event.swiftdeps -o /Users/satre/Library/Developer/Xcode/DerivedData/STSI-gpjzpccyzlbzmdciwcbqdfguddto/Build/Intermediates/STSI.build/Debug-iphonesimulator/STSI.build/Objects-normal/x86_64/Event.o
1. While type-checking 'fetchSpeakersForEvent' at /Users/satre/Developer/Projects/STSI/MedConf/Event.swift:220:5
2. While type-checking expression at [/Users/satre/Developer/Projects/STSI/MedConf/Event.swift:228:9 - line:256:10] RangeText="query?.findObjectsInBackgroundWithBlock({ (speakerObjects:[AnyObject]?, error:NSError?) -> Void in
if error != nil {
print( error )
return
}



let theSpeakers: [Speaker] = speakerObjects!.map({ (aSpeaker: AnyObject) -> Speaker in
let theSpeaker = aSpeaker as! Speaker

//Don't want to hog up the main thread, so dispatch to queue
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), { () -> Void in
for someSpeaker in ObjectManager.speakers {
if someSpeaker.objectId == theSpeaker.objectId {
if !someSpeaker.eventsForSpeaker.contains(self) {
someSpeaker.eventsForSpeaker.append(self)
}
}
}
NSNotificationCenter.defaultCenter().postNotificationName(DataConstants.newSpeakerEventRelationships, object: nil)
})


return theSpeaker
})

self.speakersForEvent = theSpeakers
})"
3. While type-checking expression at [/Users/satre/Developer/Projects/STSI/MedConf/Event.swift:228:9 - line:256:10] RangeText="query?.findObjectsInBackgroundWithBlock({ (speakerObjects:[AnyObject]?, error:NSError?) -> Void in
if error != nil {
print( error )
return
}



let theSpeakers: [Speaker] = speakerObjects!.map({ (aSpeaker: AnyObject) -> Speaker in
let theSpeaker = aSpeaker as! Speaker

//Don't want to hog up the main thread, so dispatch to queue
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), { () -> Void in
for someSpeaker in ObjectManager.speakers {
if someSpeaker.objectId == theSpeaker.objectId {
if !someSpeaker.eventsForSpeaker.contains(self) {
someSpeaker.eventsForSpeaker.append(self)
}
}
}
NSNotificationCenter.defaultCenter().postNotificationName(DataConstants.newSpeakerEventRelationships, object: nil)
})


return theSpeaker
})

self.speakersForEvent = theSpeakers
})"
4. While type-checking expression at [/Users/satre/Developer/Projects/STSI/MedConf/Event.swift:228:9 - line:256:10] RangeText="query?.findObjectsInBackgroundWithBlock({ (speakerObjects:[AnyObject]?, error:NSError?) -> Void in
if error != nil {
print( error )
return
}



let theSpeakers: [Speaker] = speakerObjects!.map({ (aSpeaker: AnyObject) -> Speaker in
let theSpeaker = aSpeaker as! Speaker

//Don't want to hog up the main thread, so dispatch to queue
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), { () -> Void in
for someSpeaker in ObjectManager.speakers {
if someSpeaker.objectId == theSpeaker.objectId {
if !someSpeaker.eventsForSpeaker.contains(self) {
someSpeaker.eventsForSpeaker.append(self)
}
}
}
NSNotificationCenter.defaultCenter().postNotificationName(DataConstants.newSpeakerEventRelationships, object: nil)
})


return theSpeaker
})

self.speakersForEvent = theSpeakers
})"
5. While type-checking expression at [/Users/satre/Developer/Projects/STSI/MedConf/Event.swift:228:49 - line:256:9] RangeText="{ (speakerObjects:[AnyObject]?, error:NSError?) -> Void in
if error != nil {
print( error )
return
}



let theSpeakers: [Speaker] = speakerObjects!.map({ (aSpeaker: AnyObject) -> Speaker in
let theSpeaker = aSpeaker as! Speaker

//Don't want to hog up the main thread, so dispatch to queue
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), { () -> Void in
for someSpeaker in ObjectManager.speakers {
if someSpeaker.objectId == theSpeaker.objectId {
if !someSpeaker.eventsForSpeaker.contains(self) {
someSpeaker.eventsForSpeaker.append(self)
}
}
}
NSNotificationCenter.defaultCenter().postNotificationName(DataConstants.newSpeakerEventRelationships, object: nil)
})


return theSpeaker
})

self.speakersForEvent = theSpeakers
}"

这个故障的原因是什么?我看到它与类型检查有关,但我无法找出原因。我也在使用最新版本的 Parse SDK。

最佳答案

PFQuery.findObjectsInBackgroundWithBlock 的方法签名已更改。引用:https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/issues/280

(speakerObjects:[AnyObject]?, error:NSError?) -> Void in 替换为 (speakerObjects:[PFObject]?, error:NSError?) -> Void in

关于ios - 分段故障 Swift 2 App,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32725811/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com