Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abort trap: 6 问题记录 #6

Closed
LinXunFeng opened this issue Dec 25, 2020 · 0 comments
Closed

Abort trap: 6 问题记录 #6

LinXunFeng opened this issue Dec 25, 2020 · 0 comments

Comments

@LinXunFeng
Copy link
Owner

问题

在原先是OC,之后进行OCSwift 混编的项目中,通过Cocoapods集成 LXFProtocolTool/EmptyDataSetable 不报错,但在Swift文件中导入LXFProtocolTool后编译就会报错

Xcode报错内容

/Users/lxf/Library/Developer/Xcode/DerivedData/xxx-aizytmxonhdydshaycccmwbtmfix/Build/Intermediates.noindex/xxx.build/Debug-iphonesimulator/xxx.build/Objects-normal/x86_64/xxx.swiftmodule
---
3.	While evaluating request ExecuteSILPipelineRequest(Run pipelines { Mandatory Combines, Serialization, Rest of Onone } on SIL for xxx.xxx)
4.	While loading conformances for extension of NSObject (in module 'LXFProtocolTool')
0  swift                    0x0000000107217c15 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1  swift                    0x0000000107218332 SignalHandler(int) + 610
2  libsystem_platform.dylib 0x00007fff6aa8b5fd _sigtramp + 29
3  libsystem_platform.dylib 0x00007f95b8ec1200 _sigtramp + 18446743619756055584
4  libsystem_c.dylib        0x00007fff6a961808 abort + 120
5  swift                    0x000000010346779f swift::ModuleFile::fatal(llvm::Error) + 2639
6  swift                    0x0000000103483e06 swift::ModuleFile::loadAllConformances(swift::Decl const*, unsigned long long, llvm::SmallVectorImpl<swift::ProtocolConformance*>&) + 790
7  swift                    0x0000000103bf4c69 swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage) + 6201
8  swift                    0x0000000103bf366f swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage) + 575
9  swift                    0x0000000103bf3784 swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage) + 852
10 swift                    0x0000000103bf3d1f swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage) + 2287
11 swift                    0x0000000103bf3718 swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage) + 744
12 swift                    0x0000000103bf3784 swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage) + 852
13 swift                    0x0000000103bf3d1f swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage) + 2287
14 swift                    0x0000000103bf3718 swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage) + 744
15 swift                    0x0000000103bf3784 swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage) + 852
16 swift                    0x0000000103bf3d1f swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage) + 2287
17 swift                    0x0000000103bf3718 swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage) + 744
18 swift                    0x0000000103bf3784 swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage) + 852
19 swift                    0x0000000103bf3d1f swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage) + 2287
20 swift                    0x0000000103bf3718 swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage) + 744
21 swift                    0x0000000103bf3784 swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage) + 852
22 swift                    0x0000000103bf3d1f swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage) + 2287
23 swift                    0x0000000103bf3718 swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage) + 744
24 swift                    0x0000000103bf3784 swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage) + 852
25 swift                    0x0000000103d22249 swift::NominalTypeDecl::getAllProtocols() const + 73
26 swift                    0x0000000103004e7c (anonymous namespace)::NominalTypeWalker::walkToDeclPre(swift::Decl*) + 60
27 swift                    0x0000000103bc8d4d (anonymous namespace)::Traversal::doIt(swift::Decl*) + 189
28 swift                    0x0000000103004440 swift::ProtocolConformanceAnalysis::init() + 240
29 swift                    0x0000000103199eff swift::SILPassManager::SILPassManager(swift::SILModule*, bool, swift::irgen::IRGenModule*) + 2623
30 swift                    0x00000001031b2761 swift::SimpleRequest<swift::ExecuteSILPipelineRequest, std::__1::tuple<> (swift::SILPipelineExecutionDescriptor), (swift::RequestFlags)1>::evaluateRequest(swift::ExecuteSILPipelineRequest const&, swift::Evaluator&) + 49
31 swift                    0x00000001031a0c45 llvm::Expected<swift::ExecuteSILPipelineRequest::OutputType> swift::Evaluator::getResultUncached<swift::ExecuteSILPipelineRequest>(swift::ExecuteSILPipelineRequest const&) + 1077
32 swift                    0x00000001031a4056 swift::runSILPassesForOnone(swift::SILModule&) + 166
33 swift                    0x0000000102b5f714 swift::CompilerInstance::performSILProcessing(swift::SILModule*) + 772
34 swift                    0x0000000102a2f148 performCompileStepsPostSILGen(swift::CompilerInstance&, swift::CompilerInvocation const&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> >, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::PrimarySpecificPaths const&, int&, swift::FrontendObserver*) + 1288
35 swift                    0x0000000102a1f7ba swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 21802
36 swift                    0x00000001029a02c1 main + 1265
37 libdyld.dylib            0x00007fff6a892cc9 start + 1
error: Abort trap: 6 (in target 'xxx' from project 'xxx')

尝试

  • 尝试过新建一个 OC 项目,以相同方法 import LXFProtocolTool ,但是一点问题都没有~
  • 也尝试过在Swift组件的.podspec文件中添加如下代码,但是也不起作用
s.pod_target_xcconfig = {'SWIFT_COMPILATION_MODE'=>'wholemodule'}

解决

在桥接文件中,将依赖的 DZNEmptyDataSet 导入之后再次编译就可以了

#import <DZNEmptyDataSet/UIScrollView+EmptyDataSet.h>
@LinXunFeng LinXunFeng pinned this issue Dec 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant