由于信号导致命令失败:分段错误:11 Xcode 8.0

Posted

技术标签:

【中文标题】由于信号导致命令失败:分段错误:11 Xcode 8.0【英文标题】:Command failed due to signal: Segmentation fault: 11 Xcode 8.0 【发布时间】:2016-10-04 18:43:48 【问题描述】:

在一个 swift 项目中,我使用 alamofire 进行 web 服务调用,在升级到最新的 xcode 8.0 之前一切正常。 它开始给我这个错误

由于信号而导致命令失败:分段错误:11

我终于找到了导致问题的原因。调用 Web 服务时,我使用 ResponseJSON 来解析响应。删除 ResponseJSON 调用后,错误就消失了。

我的代码我喜欢这个

request(urlToWebService, method: .get, parameters: nil, encoding: URLEncoding.queryString, headers: nil)
.validate(statusCode: 200..<300)

.responseJSON (响应)在

我已将 Alamofire 添加到框架中,并通过引用框架来使用它。 但是我尝试将源添加到我当前的项目中,但它给出了同样的错误。 完整的错误/xcode 输出是

CompileSwift normal x86_64 /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Services/ServiceHelper.swift
    cd /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/AdTypes.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/DrugStore+CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Ads+CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/ActivityLevels.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/SectionHelper.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Product+CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/ImageHelper.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/Genders.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/EnteralCalculationTypes.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/Roles.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Visit+CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/ViewController.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Congress+CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Patient+CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/CongressSchedules+CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Resources/Images.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/NotificationHelper.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/GUIHelper.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/CongressSchedules+CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/User+CoreDataProperties.swift -primary-file /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Services/ServiceHelper.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Ads+CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/AppDelegate.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/StressLevels.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/ActivityLevel+CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/DrugStore+CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/SearchBase.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/User+CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/TreatmentTypes.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/Entities.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/MalnutritionStatus.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Result+CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Product+CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Patient+CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/FileManager/FileManager.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/Menus.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/ProductPackageTypes.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/DefaultKeys.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/News+CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/FileManager/FileManager+Congress.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/Users.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Visit+CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/FileManager/FileManager+Product.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/News+CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/ActivityLevel+CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/StressLevel+CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Result+CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/WeightLossPeriods.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/DataTypes.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Congress+CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/FileManager/FileManager+Ads.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/StressLevel+CoreDataProperties.swift -target x86_64-apple-ios9.0 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.0.sdk -I /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Products/Debug-iphonesimulator -F /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Products/Debug-iphonesimulator -enable-testing -g -module-cache-path /Users/Hassan2/Library/Developer/Xcode/DerivedData/ModuleCache -D DEBUG -serialize-debugging-options -Xcc -I/Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/MyNutriCalc-generated-files.hmap -Xcc -I/Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/MyNutriCalc-own-target-headers.hmap -Xcc -I/Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/MyNutriCalc-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/MyNutriCalc-project-headers.hmap -Xcc -I/Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/DerivedSources/x86_64 -Xcc -I/Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -working-directory/Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc -emit-module-doc-path /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/Objects-normal/x86_64/ServiceHelper~partial.swiftdoc -Onone -module-name MyNutriCalc -emit-module-path /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/Objects-normal/x86_64/ServiceHelper~partial.swiftmodule -serialize-diagnostics-path /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/Objects-normal/x86_64/ServiceHelper.dia -emit-dependencies-path /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/Objects-normal/x86_64/ServiceHelper.d -emit-reference-dependencies-path /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/Objects-normal/x86_64/ServiceHelper.swiftdeps -o /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/Objects-normal/x86_64/ServiceHelper.o

0  swift                    0x00000001095cab6d PrintStackTraceSignalHandler(void*) + 45
1  swift                    0x00000001095ca5b6 SignalHandler(int) + 470
2  libsystem_platform.dylib 0x00007fff8984652a _sigtramp + 26
3  libsystem_platform.dylib 0x00007fff59288b00 _sigtramp + 3483641328
4  swift                    0x00000001073fd508 swift::TypeBase::getCanonicalType() + 872
5  swift                    0x0000000107301648 swift::FunctionType::get(swift::Type, swift::Type, swift::AnyFunctionType::ExtInfo const&) + 56
6  swift                    0x0000000106fb911e swift::ModuleFile::getType(llvm::PointerEmbeddedInt<unsigned int, 31>) + 1422
7  swift                    0x0000000106fb910c swift::ModuleFile::getType(llvm::PointerEmbeddedInt<unsigned int, 31>) + 1404
8  swift                    0x0000000106fb68c1 swift::ModuleFile::getDecl(llvm::PointerEmbeddedInt<unsigned int, 31>, llvm::Optional<swift::DeclContext*>) + 39137
9  swift                    0x0000000106fc1947 swift::ModuleFile::loadAllMembers(swift::Decl*, unsigned long long) + 647
10 swift                    0x00000001073efbda swift::NominalTypeDecl::lookupDirect(swift::DeclName, bool) + 138
11 swift                    0x0000000106fb7938 swift::ModuleFile::getDecl(llvm::PointerEmbeddedInt<unsigned int, 31>, llvm::Optional<swift::DeclContext*>) + 43352
12 swift                    0x0000000106fb8ed4 swift::ModuleFile::getType(llvm::PointerEmbeddedInt<unsigned int, 31>) + 836
13 swift                    0x0000000106fb15c7 swift::ModuleFile::getDecl(llvm::PointerEmbeddedInt<unsigned int, 31>, llvm::Optional<swift::DeclContext*>) + 17895
14 swift                    0x0000000106fc1947 swift::ModuleFile::loadAllMembers(swift::Decl*, unsigned long long) + 647
15 swift                    0x0000000106fa56aa (anonymous namespace)::LowerType::visitAnyStructType(swift::CanType, swift::StructDecl*) + 250
16 swift                    0x0000000106fa4630 swift::Lowering::TypeConverter::getTypeLoweringForUncachedLoweredType(swift::Lowering::TypeConverter::TypeKey) + 80
17 swift                    0x0000000106fa3c86 swift::Lowering::TypeConverter::getTypeLowering(swift::Lowering::AbstractionPattern, swift::Type, unsigned int) + 3334
18 swift                    0x0000000106fa6c58 (anonymous namespace)::TypeClassifierBase<(anonymous namespace)::TypeClassifier, LoweredTypeKind>::visitAnyStructType(swift::CanType, swift::StructDecl*) + 280
19 swift                    0x0000000106fa541d (anonymous namespace)::LowerType::visitAnyEnumType(swift::CanType, swift::EnumDecl*) + 893
20 swift                    0x0000000106fa4630 swift::Lowering::TypeConverter::getTypeLoweringForUncachedLoweredType(swift::Lowering::TypeConverter::TypeKey) + 80
21 swift                    0x0000000106fa3c86 swift::Lowering::TypeConverter::getTypeLowering(swift::Lowering::AbstractionPattern, swift::Type, unsigned int) + 3334
22 swift                    0x0000000106fa6b18 (anonymous namespace)::TypeClassifierBase<(anonymous namespace)::TypeClassifier, LoweredTypeKind>::visitAnyEnumType(swift::CanType, swift::EnumDecl*) + 280
23 swift                    0x0000000106fa57dd (anonymous namespace)::LowerType::visitAnyStructType(swift::CanType, swift::StructDecl*) + 557
24 swift                    0x0000000106fa4630 swift::Lowering::TypeConverter::getTypeLoweringForUncachedLoweredType(swift::Lowering::TypeConverter::TypeKey) + 80
25 swift                    0x0000000106fa3c86 swift::Lowering::TypeConverter::getTypeLowering(swift::Lowering::AbstractionPattern, swift::Type, unsigned int) + 3334
26 swift                    0x0000000106f55cc3 (anonymous namespace)::DestructureInputs::visit(swift::Lowering::AbstractionPattern, swift::CanType) + 259
27 swift                    0x0000000106f54beb getSILFunctionType(swift::SILModule&, swift::Lowering::AbstractionPattern, swift::CanTypeWrapper<swift::AnyFunctionType>, swift::AnyFunctionType::ExtInfo, (anonymous namespace)::Conventions const&, llvm::Optional<swift::ForeignErrorConvention> const&, llvm::Optional<swift::SILDeclRef>) + 1163
28 swift                    0x0000000106f544c2 getNativeSILFunctionType(swift::SILModule&, swift::Lowering::AbstractionPattern, swift::CanTypeWrapper<swift::AnyFunctionType>, swift::AnyFunctionType::ExtInfo, llvm::Optional<swift::SILDeclRef>, swift::SILDeclRef::Kind) + 498
29 swift                    0x0000000106fa434e swift::Lowering::TypeConverter::getTypeLoweringForUncachedLoweredFunctionType(swift::Lowering::TypeConverter::TypeKey) + 158
30 swift                    0x0000000106fa381e swift::Lowering::TypeConverter::getTypeLowering(swift::Lowering::AbstractionPattern, swift::Type, unsigned int) + 2206
31 swift                    0x0000000106f55cc3 (anonymous namespace)::DestructureInputs::visit(swift::Lowering::AbstractionPattern, swift::CanType) + 259
32 swift                    0x0000000106f55d88 (anonymous namespace)::DestructureInputs::visit(swift::Lowering::AbstractionPattern, swift::CanType) + 456
33 swift                    0x0000000106f54beb getSILFunctionType(swift::SILModule&, swift::Lowering::AbstractionPattern, swift::CanTypeWrapper<swift::AnyFunctionType>, swift::AnyFunctionType::ExtInfo, (anonymous namespace)::Conventions const&, llvm::Optional<swift::ForeignErrorConvention> const&, llvm::Optional<swift::SILDeclRef>) + 1163
34 swift                    0x0000000106f544c2 getNativeSILFunctionType(swift::SILModule&, swift::Lowering::AbstractionPattern, swift::CanTypeWrapper<swift::AnyFunctionType>, swift::AnyFunctionType::ExtInfo, llvm::Optional<swift::SILDeclRef>, swift::SILDeclRef::Kind) + 498
35 swift                    0x0000000106fa434e swift::Lowering::TypeConverter::getTypeLoweringForUncachedLoweredFunctionType(swift::Lowering::TypeConverter::TypeKey) + 158
36 swift                    0x0000000106fa381e swift::Lowering::TypeConverter::getTypeLowering(swift::Lowering::AbstractionPattern, swift::Type, unsigned int) + 2206
37 swift                    0x0000000106f55970 (anonymous namespace)::DestructureResults::destructure(swift::Lowering::AbstractionPattern, swift::CanType) + 240
38 swift                    0x0000000106f54afc getSILFunctionType(swift::SILModule&, swift::Lowering::AbstractionPattern, swift::CanTypeWrapper<swift::AnyFunctionType>, swift::AnyFunctionType::ExtInfo, (anonymous namespace)::Conventions const&, llvm::Optional<swift::ForeignErrorConvention> const&, llvm::Optional<swift::SILDeclRef>) + 924
39 swift                    0x0000000106f543d2 getNativeSILFunctionType(swift::SILModule&, swift::Lowering::AbstractionPattern, swift::CanTypeWrapper<swift::AnyFunctionType>, swift::AnyFunctionType::ExtInfo, llvm::Optional<swift::SILDeclRef>, swift::SILDeclRef::Kind) + 258
40 swift                    0x0000000106f5765a getUncachedSILFunctionTypeForConstant(swift::SILModule&, swift::SILDeclRef, swift::CanTypeWrapper<swift::AnyFunctionType>) + 186
41 swift                    0x0000000106f58b35 swift::Lowering::TypeConverter::getConstantInfo(swift::SILDeclRef) + 1221
42 swift                    0x0000000106b9cfb8 swift::ASTVisitor<(anonymous namespace)::SILGenApply, void, void, void, void, void, void>::visit(swift::Expr*) + 4072
43 swift                    0x0000000106ba1bae (anonymous namespace)::SILGenApply::visitApplyExpr(swift::ApplyExpr*) + 5182
44 swift                    0x0000000106ba1bae (anonymous namespace)::SILGenApply::visitApplyExpr(swift::ApplyExpr*) + 5182
45 swift                    0x0000000106b8fda1 prepareApplyExpr(swift::Lowering::SILGenFunction&, swift::Expr*) + 273
46 swift                    0x0000000106be0de7 swift::ASTVisitor<(anonymous namespace)::RValueEmitter, swift::Lowering::RValue, void, void, void, void, void, swift::Lowering::SGFContext>::visit(swift::Expr*, swift::Lowering::SGFContext) + 103
47 swift                    0x0000000106bf4e80 swift::Lowering::SILGenFunction::emitIgnoredExpr(swift::Expr*) + 592
48 swift                    0x0000000106c3e951 swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(swift::Stmt*) + 4129
49 swift                    0x0000000106bff2ca swift::Lowering::SILGenFunction::emitFunction(swift::FuncDecl*) + 314
50 swift                    0x0000000106b7b855 swift::Lowering::SILGenModule::emitFunction(swift::FuncDecl*)::$_1::operator()(swift::SILFunction*) const + 1877
51 swift                    0x0000000106b7a402 swift::Lowering::SILGenModule::emitFunction(swift::FuncDecl*) + 626
52 swift                    0x0000000106b87303 swift::Lowering::SILGenModule::emitSourceFile(swift::SourceFile*, unsigned int) + 2195
53 swift                    0x0000000106b88e2d swift::SILModule::constructSIL(swift::ModuleDecl*, swift::SILOptions&, swift::FileUnit*, llvm::Optional<unsigned int>, bool, bool) + 1629
54 swift                    0x00000001069e016f performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*) + 19503
55 swift                    0x00000001069d9265 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 17029
56 swift                    0x000000010699682d main + 8685
57 libdyld.dylib            0x00007fff94d9e5ad start + 1
58 libdyld.dylib            0x0000000000000073 start + 1797659335
Stack dump:
0.  Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/AdTypes.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/DrugStore+CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Ads+CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/ActivityLevels.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/SectionHelper.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Product+CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/ImageHelper.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/Genders.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/EnteralCalculationTypes.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/Roles.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Visit+CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/ViewController.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Congress+CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Patient+CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/CongressSchedules+CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Resources/Images.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/NotificationHelper.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/GUIHelper.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/CongressSchedules+CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/User+CoreDataProperties.swift -primary-file /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Services/ServiceHelper.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Ads+CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/AppDelegate.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/StressLevels.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/ActivityLevel+CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/DrugStore+CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/SearchBase.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/User+CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/TreatmentTypes.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/Entities.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/MalnutritionStatus.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Result+CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Product+CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Patient+CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/FileManager/FileManager.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/Menus.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/ProductPackageTypes.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/DefaultKeys.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/News+CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/FileManager/FileManager+Congress.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/Users.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Visit+CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/FileManager/FileManager+Product.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/News+CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/ActivityLevel+CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/StressLevel+CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Result+CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/WeightLossPeriods.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/DataTypes.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Congress+CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/FileManager/FileManager+Ads.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/StressLevel+CoreDataProperties.swift -target x86_64-apple-ios9.0 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.0.sdk -I /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Products/Debug-iphonesimulator -F /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Products/Debug-iphonesimulator -enable-testing -g -module-cache-path /Users/Hassan2/Library/Developer/Xcode/DerivedData/ModuleCache -D DEBUG -serialize-debugging-options -Xcc -I/Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/MyNutriCalc-generated-files.hmap -Xcc -I/Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/MyNutriCalc-own-target-headers.hmap -Xcc -I/Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/MyNutriCalc-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/MyNutriCalc-project-headers.hmap -Xcc -I/Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/DerivedSources/x86_64 -Xcc -I/Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -working-directory/Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc -emit-module-doc-path /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/Objects-normal/x86_64/ServiceHelper~partial.swiftdoc -Onone -module-name MyNutriCalc -emit-module-path /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/Objects-normal/x86_64/ServiceHelper~partial.swiftmodule -serialize-diagnostics-path /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/Objects-normal/x86_64/ServiceHelper.dia -emit-dependencies-path /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/Objects-normal/x86_64/ServiceHelper.d -emit-reference-dependencies-path /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/Objects-normal/x86_64/ServiceHelper.swiftdeps -o /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/Objects-normal/x86_64/ServiceHelper.o 
1.  While emitting SIL for 'Request' at /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Services/ServiceHelper.swift:11:8
2.  While loading members for 'Data' at <invalid loc>
3.  While deserializing decl #4466 (TYPE_ALIAS_DECL)
4.  While deserializing decl #1290 (XREF)
5.  Cross-reference to module 'Foundation'
    ... NSData
    ... in an extension in module 'Foundation'
    ... ReadingOptions
6.  While loading members for declaration 0x7f8a99e2c060 at <invalid loc>
7.  While deserializing 'readFromPath' (FuncDecl #634) 

【问题讨论】:

【参考方案1】:

我终于找到问题并解决了。

我首先创建了新项目, 然后将我的源文件一次一个地移动到新项目中,

我终于发现这个问题甚至与 Alamofire 无关。

错误来自我用于管理文件的库

也许这些步骤会对某人有所帮助

【讨论】:

以上是关于由于信号导致命令失败:分段错误:11 Xcode 8.0的主要内容,如果未能解决你的问题,请参考以下文章

由于信号,命令失败:分段错误:11

Swift 编译器错误,由于信号导致命令失败:分段错误:11

在 Swift 3 中存档项目并获得“由于信号分段错误 11 导致命令失败”

无法在 Xcode 6.1 中存档正在工作的 6.0.1 Swift 项目/分段错误:11

由于信号 9 Xcode 11 beta,编译命令失败

Swift 命令因信号而失败:分段错误