我的项目在更新到Xcode 10.2之前编译良好。现在当我尝试编译时,出现了“错误:Abort trap: 6”。
- 我发现这条消息,但我不确定这是否是问题:“LLVM ERROR: out of memory”
- 我已经尝试将优化级别更改为none,并将调试信息格式更改为带有dSYM文件的DWAFT,但对我没有用。
- 我也尝试重新安装Xcode。
我找到了这个:
1. While emitting IR SIL function "@$sypIegn_Ieg_TR".
for <<debugloc at "<compiler-generated>":0:0>>0 swift 0x000000010c13cee3 PrintStackTraceSignalHandler(void*) + 51
1 swift 0x000000010c13c6bc SignalHandler(int) + 348
2 libsystem_platform.dylib 0x00007fff7071db5d _sigtramp + 29
3 libsystem_platform.dylib 0x0000000115e7cf87 _sigtramp + 2775970887
4 libsystem_c.dylib 0x00007fff705dd6a6 abort + 127
5 swift 0x000000010c0ed644 llvm::report_bad_alloc_error(char const*, bool) + 100
6 swift 0x000000010800b210 swift::irgen::CallEmission::setArgs(swift::irgen::Explosion&, bool, swift::irgen::WitnessMetadata*) + 2560
7 swift 0x00000001081bf335 (anonymous namespace)::IRGenSILFunction::visitFullApplySite(swift::FullApplySite) + 2053
8 swift 0x000000010819f6aa swift::irgen::IRGenModule::emitSILFunction(swift::SILFunction*) + 9898
9 swift 0x000000010805e259 swift::irgen::IRGenerator::emitLazyDefinitions() + 1353
10 swift 0x000000010817cdd7 swift::performIRGeneration(swift::IRGenOptions&, swift::ModuleDecl*, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> >, llvm::StringRef, swift::PrimarySpecificPaths const&, llvm::LLVMContext&, llvm::ArrayRef<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, llvm::GlobalVariable**) + 1895
11 swift 0x0000000107fa1030 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 49280
12 swift 0x0000000107f916de swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 6862
13 swift 0x0000000107f2f7be main + 1246
14 libdyld.dylib 0x00007fff705383d5 start + 1
error: Abort trap: 6
并且最终日志如下所示:
/Users/user/repos/xxx-ios/app-ios/views/Portfolio/PortfolioBarChart.swift /Users/user/repos/xxx-ios/app-ios/views/Menu/MenuCell.swift /Users/user/repos/xxx-ios/app-ios/Model/MarketStatus/MarketStatus.swift /Users/user/repos/xxx-ios/app-ios/Model/MarketTime.swift /Users/user/repos/xxx-ios/app-ios/views/Menu/AccountCell.swift /Users/user/repos/xxx-ios/app-ios/views/Common/LabelImageCell.swift /Users/user/repos/xxx-ios/app-ios/Converter/PriceDepthItemConverter.swift -output-file-map /Users/user/Library/Developer/Xcode/DerivedData/app-ios-hjlqbhxpptzultcjcyzoxjdodfod/Build/Intermediates.noindex/app-ios.build/Debug-iphoneos/app-ios.build/Objects-normal/arm64/app-ios-OutputFileMap.json -parseable-output -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/user/Library/Developer/Xcode/DerivedData/app-ios-hjlqbhxpptzultcjcyzoxjdodfod/Build/Intermediates.noindex/app-ios.build/Debug-iphoneos/app-ios.build/Objects-normal/arm64/app_ios.swiftmodule -Xcc -I/Users/user/Library/Developer/Xcode/DerivedData/app-ios-hjlqbhxpptzultcjcyzoxjdodfod/Build/Intermediates.noindex/app-ios.build/Debug-iphoneos/app-ios.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/user/Library/Developer/Xcode/DerivedData/app-ios-hjlqbhxpptzultcjcyzoxjdodfod/Build/Intermediates.noindex/app-ios.build/Debug-iphoneos/app-ios.build/app-ios-generated-files.hmap -Xcc -I/Users/user/Library/Developer/Xcode/DerivedData/app-ios-hjlqbhxpptzultcjcyzoxjdodfod/Build/Intermediates.noindex/app-ios.build/Debug-iphoneos/app-ios.build/app-ios-own-target-headers.hmap -Xcc -I/Users/user/Library/Developer/Xcode/DerivedData/app-ios-hjlqbhxpptzultcjcyzoxjdodfod/Build/Intermediates.noindex/app-ios.build/Debug-iphoneos/app-ios.build/app-ios-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/user/Library/Developer/Xcode/DerivedData/app-ios-hjlqbhxpptzultcjcyzoxjdodfod/Build/Intermediates.noindex/app-ios.build/Debug-iphoneos/app-ios.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/user/Library/Developer/Xcode/DerivedData/app-ios-hjlqbhxpptzultcjcyzoxjdodfod/Build/Intermediates.noindex/app-ios.build/Debug-iphoneos/app-ios.build/app-ios-project-headers.hmap -Xcc -I/Users/user/Library/Developer/Xcode/DerivedData/app-ios-hjlqbhxpptzultcjcyzoxjdodfod/Build/Products/Debug-iphoneos/include -Xcc -I/Users/user/Library/Developer/Xcode/DerivedData/app-ios-hjlqbhxpptzultcjcyzoxjdodfod/Build/Intermediates.noindex/app-ios.build/Debug-iphoneos/app-ios.build/DerivedSources-normal/arm64 -Xcc -I/Users/user/Library/Developer/Xcode/DerivedData/app-ios-hjlqbhxpptzultcjcyzoxjdodfod/Build/Intermediates.noindex/app-ios.build/Debug-iphoneos/app-ios.build/DerivedSources/arm64 -Xcc -I/Users/user/Library/Developer/Xcode/DerivedData/app-ios-hjlqbhxpptzultcjcyzoxjdodfod/Build/Intermediates.noindex/app-ios.build/Debug-iphoneos/app-ios.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -DCOCOAPODS=1 -Xcc -DCOCOAPODS=1 -emit-objc-header -emit-objc-header-path /Users/user/Library/Developer/Xcode/DerivedData/app-ios-hjlqbhxpptzultcjcyzoxjdodfod/Build/Intermediates.noindex/app-ios.build/Debug-iphoneos/app-ios.build/Objects-normal/arm64/app_ios-Swift.h -working-directory /Users/user/repos/xxx-ios
<unknown>:0: error: unable to execute command: Abort trap: 6
<unknown>:0: error: compile command failed due to signal 6 (use -v to see invocation)
<unknown>:0: error: unable to execute command: Abort trap: 6
<unknown>:0: error: compile command failed due to signal 6 (use -v to see invocation)
请问发生错误6的原因是什么?
谢谢