【发布时间】:2014-08-23 13:57:46
【问题描述】:
我有一个 xcode 项目并在设备上运行,调试构建一切都很好。
但是,当我尝试归档项目时,我从 Swift 编译器收到了段错误:
0 swift 0x0000000105c36608 llvm::sys::PrintStackTrace(__sFILE*) + 40
1 swift 0x0000000105c36af4 SignalHandler(int) + 452
2 libsystem_platform.dylib 0x00007fff852705aa _sigtramp + 26
3 libsystem_platform.dylib 0x0000000000000002 _sigtramp + 2061040242
4 swift 0x0000000105f51896 swift::TypeBase::getTypeOfMember(swift::Module*, swift::ValueDecl const*, swift::LazyResolver*, swift::Type) + 534
5 swift 0x00000001050eee38 swift::SILType::getFieldType(swift::VarDecl*, swift::SILModule&) const + 56
6 swift 0x00000001051a1252 (anonymous namespace)::SILSROA::run() + 3602
7 swift 0x000000010516b116 swift::SILPassManager::runFunctionPasses(llvm::ArrayRef<swift::SILFunctionTransform*>) + 310
8 swift 0x000000010516b6f9 swift::SILPassManager::runOneIteration() + 761
9 swift 0x000000010516b92b swift::SILPassManager::run() + 251
10 swift 0x000000010516afbc swift::runSILOptimizationPasses(swift::SILModule&, swift::SILOptions const&) + 1644
11 swift 0x0000000104ffb141 frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 3537
12 swift 0x0000000104ffa35d main + 1533
13 libdyld.dylib 0x00007fff885d75fd start + 1
14 libdyld.dylib 0x0000000000000052 start + 2007140950
我看到人们谈论可能导致此类错误的某些语法,但有谁知道如何尝试找出导致段错误的代码位?
【问题讨论】:
-
嗨。你有没有弄清楚是什么导致了这个问题?
-
不,实际上我搁置了我的快速开发,抱歉
-
@JozefDransfield 能否请您检查一下我的解决方案是否适合您?
标签: xcode segmentation-fault swift