2017-08-08 61 views
0

當試圖編譯雨燕3.1的Xcode 8.3.3 Xcode的說,我有一個問題:如何識別這將導致分段故障源文件:11

:0: error: unable to execute command: Segmentation fault: 11 :0: error: compile command failed due to signal (use -v to see invocation)

但我想不通的迅速導致分段錯誤的文件。

日誌說明:

CompileSwift normal x86_64 cd /Users/hainguyen/Workspace/Flo/FloUniversal/Flo /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -filelist /var/folders/cb/n_ccw95n7zs11l87f9w98s7h0000gn/T/sources-ca5acd -target x86_64-apple-ios8.3 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.3.sdk -I /Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Products/Debug-iphonesimulator -F /Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Products/Debug-iphonesimulator -F /Users/hainguyen/Workspace/Flo/FloUniversal/Flo/Flo/Platforms/ios/Frameworks -enable-testing -g -module-cache-path /Users/hainguyen/Library/Developer/Xcode/DerivedData/ModuleCache -D DEBUG -serialize-debugging-options -Xcc -I/Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Intermediates/Flo.build/Debug-iphonesimulator/Flo.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Intermediates/Flo.build/Debug-iphonesimulator/Flo.build/Flo-generated-files.hmap -Xcc -I/Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Intermediates/Flo.build/Debug-iphonesimulator/Flo.build/Flo-own-target-headers.hmap -Xcc -I/Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Intermediates/Flo.build/Debug-iphonesimulator/Flo.build/Flo-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Intermediates/Flo.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Intermediates/Flo.build/Debug-iphonesimulator/Flo.build/Flo-project-headers.hmap -Xcc -I/Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Intermediates/Flo.build/Debug-iphonesimulator/Flo.build/DerivedSources/x86_64 -Xcc -I/Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Intermediates/Flo.build/Debug-iphonesimulator/Flo.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -working-directory/Users/hainguyen/Workspace/Flo/FloUniversal/Flo -emit-module-doc-path /Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Intermediates/Flo.build/Debug-iphonesimulator/Flo.build/Objects-normal/x86_64/Flo.swiftdoc -serialize-diagnostics-path /Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Intermediates/Flo.build/Debug-iphonesimulator/Flo.build/Objects-normal/x86_64/AppDelegate.dia -import-objc-header /Users/hainguyen/Workspace/Flo/FloUniversal/Flo/Flo/Platforms/ios/Application/Flo-Bridging-Header.h -O -module-name Flo -emit-module-path /Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Intermediates/Flo.build/Debug-iphonesimulator/Flo.build/Objects-normal/x86_64/Flo.swiftmodule -emit-objc-header-path /Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Intermediates/Flo.build/Debug-iphonesimulator/Flo.build/Objects-normal/x86_64/Flo-Swift.h -emit-dependencies-path /Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Intermediates/Flo.build/Debug-iphonesimulator/Flo.build/Objects-normal/x86_64/AppDelegate.d -num-threads 4 -output-filelist /var/folders/cb/n_ccw95n7zs11l87f9w98s7h0000gn/T/outputs-11dbac

0 swift 0x000000010412b4f7 PrintStackTraceSignalHandler(void*) + 39 1 swift
0x000000010412a9a6 SignalHandler(int) + 646 2 libsystem_platform.dylib 0x00007fff9a5b5b3a _sigtramp + 26 3 libsystem_platform.dylib 0x00007fff5ed2a0c8 _sigtramp + 3296150952 4 swift 0x0000000101b80ba2 swift::Lowering::TypeConverter::getFunctionInterfaceTypeWithCaptures(swift::CanTypeWrapper, swift::AnyFunctionRef) + 242 5 swift
0x0000000101b30f1d swift::Lowering::TypeConverter::getConstantInfo(swift::SILDeclRef) + 157 6 swift 0x0000000101b52af0 swift::SILModule::getOrCreateFunction(swift::SILLocation, swift::SILDeclRef, swift::ForDefinition_t) + 96 7 swift
0x00000001017284c0 swift::Lowering::SILGenModule::getFunction(swift::SILDeclRef, swift::ForDefinition_t) + 304 8 swift
0x00000001017ed93c swift::Lowering::SILGenModule::emitVTableMethod(swift::SILDeclRef, swift::SILDeclRef, swift::SILLinkage&) + 60 9 swift
0x00000001017efc6c (anonymous namespace)::SILGenVTable::addEntry(swift::SILDeclRef) + 876 10 swift
0x00000001017ef5fa swift::ASTVisitor<(anonymous namespace)::SILGenVTable, void, void, void, void, void, void>::visit(swift::Decl*) + 778 11 swift
0x00000001017eeca3 (anonymous namespace)::SILGenType::emitType() + 371 12 swift 0x00000001017eeacd swift::Lowering::SILGenModule::visitNominalTypeDecl(swift::NominalTypeDecl*) + 29 13 swift 0x0000000101736ecb swift::Lowering::SILGenModule::emitSourceFile(swift::SourceFile*, unsigned int) + 1483 14 swift 0x0000000101738af2 swift::SILModule::constructSIL(swift::ModuleDecl*, swift::SILOptions&, swift::FileUnit*, llvm::Optional, bool, bool) + 1666 15 swift 0x0000000100f49561 swift::performFrontend(llvm::ArrayRef, char const*, void*, swift::FrontendObserver*) + 42353 16 swift
0x0000000100ef8d6c main + 9052 17 libdyld.dylib
0x00007fff9a3a6235 start + 1 18 libdyld.dylib
0x0000000000000046 start + 1707449874 Stack dump: 0. Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -filelist /var/folders/cb/n_ccw95n7zs11l87f9w98s7h0000gn/T/sources-ca5acd -target x86_64-apple-ios8.3 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.3.sdk -I /Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Products/Debug-iphonesimulator -F /Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Products/Debug-iphonesimulator -F /Users/hainguyen/Workspace/Flo/FloUniversal/Flo/Flo/Platforms/ios/Frameworks -enable-testing -g -module-cache-path /Users/hainguyen/Library/Developer/Xcode/DerivedData/ModuleCache -D DEBUG -serialize-debugging-options -Xcc -I/Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Intermediates/Flo.build/Debug-iphonesimulator/Flo.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Intermediates/Flo.build/Debug-iphonesimulator/Flo.build/Flo-generated-files.hmap -Xcc -I/Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Intermediates/Flo.build/Debug-iphonesimulator/Flo.build/Flo-own-target-headers.hmap -Xcc -I/Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Intermediates/Flo.build/Debug-iphonesimulator/Flo.build/Flo-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Intermediates/Flo.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Intermediates/Flo.build/Debug-iphonesimulator/Flo.build/Flo-project-headers.hmap -Xcc -I/Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Intermediates/Flo.build/Debug-iphonesimulator/Flo.build/DerivedSources/x86_64 -Xcc -I/Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Intermediates/Flo.build/Debug-iphonesimulator/Flo.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -working-directory/Users/hainguyen/Workspace/Flo/FloUniversal/Flo -emit-module-doc-path /Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Intermediates/Flo.build/Debug-iphonesimulator/Flo.build/Objects-normal/x86_64/Flo.swiftdoc -serialize-diagnostics-path /Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Intermediates/Flo.build/Debug-iphonesimulator/Flo.build/Objects-normal/x86_64/AppDelegate.dia -import-objc-header /Users/hainguyen/Workspace/Flo/FloUniversal/Flo/Flo/Platforms/ios/Application/Flo-Bridging-Header.h -O -module-name Flo -emit-module-path /Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Intermediates/Flo.build/Debug-iphonesimulator/Flo.build/Objects-normal/x86_64/Flo.swiftmodule -emit-objc-header-path /Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Intermediates/Flo.build/Debug-iphonesimulator/Flo.build/Objects-normal/x86_64/Flo-Swift.h -emit-dependencies-path /Users/hainguyen/Library/Developer/Xcode/DerivedData/Flo-dvhxokbnekzqxkdydjtabfyrwxeb/Build/Intermediates/Flo.build/Debug-iphonesimulator/Flo.build/Objects-normal/x86_64/AppDelegate.d -num-threads 4 -output-filelist /var/folders/cb/n_ccw95n7zs11l87f9w98s7h0000gn/T/outputs-11dbac

回答

0

Segmentation fault: 11的原因是複雜的表達或功能,你已經寫在你的.swift文件。

swift::Lowering::TypeConverter::getFunctionInterfaceTypeWithCaptures(swift::CanTypeWrapper, swift::AnyFunctionRef) + 242 5 swift

如果仍然無法調試的問題,請把演示代碼或以上網上提到的文件,我會幫你:你可以通過檢查出錯誤中提到的行號,如調試問題。

+0

我已經添加了完整的Xcode錯誤日誌,您能否給我一個幫助? 謝謝Sohil R. Memon! – haithngn

+0

@haithngn我想查看編碼。這不會以任何方式幫助我。 –

+0

源代碼太大,太多文件:( 我們可以分析錯誤日誌嗎? – haithngn

-1

無法從錯誤日誌中識別分段錯誤swift文件。

我試着刪除源代碼中的一些swift文件並重新導入它們,然後現在分段錯誤錯誤現在消失。

我不知道爲什麼,但解決了。

感謝Sohil R. Memon爲您的時間。