Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/113.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xcode 10.2 iOS Swift(反应本机)项目编译错误_Ios_Swift_Compiler Errors_Llvm_Xcode10.2 - Fatal编程技术网

Xcode 10.2 iOS Swift(反应本机)项目编译错误

Xcode 10.2 iOS Swift(反应本机)项目编译错误,ios,swift,compiler-errors,llvm,xcode10.2,Ios,Swift,Compiler Errors,Llvm,Xcode10.2,升级到Xcode 10.2后,我们无法再编译该项目。我们得到了这个编译错误。看起来像是有线LLVM编译器错误。就我所见,这不是一个本地问题,但我甚至无法想象如何调试这个错误,在整个互联网上都没有这方面的信息 也许有人知道这件事?或者至少如何调试它?谢谢 Swift 4.2 React Native 0.59.3(最新版本) Xcode 10.2 错误: LLVM ERROR: out of memory Stack dump: 0. Program arguments: <....&

升级到Xcode 10.2后,我们无法再编译该项目。我们得到了这个编译错误。看起来像是有线LLVM编译器错误。就我所见,这不是一个本地问题,但我甚至无法想象如何调试这个错误,在整个互联网上都没有这方面的信息

也许有人知道这件事?或者至少如何调试它?谢谢

  • Swift 4.2
  • React Native 0.59.3(最新版本)
  • Xcode 10.2
错误:

LLVM ERROR: out of memory
Stack dump:
0.  Program arguments: <....>
1.  While emitting IR SIL function "@$sypSgIegn_Ieg_TR".
 for <<debugloc at "<compiler-generated>":0:0>>0  swift                    0x000000010b99eee3 PrintStackTraceSignalHandler(void*) + 51
1  swift                    0x000000010b99e6bc SignalHandler(int) + 348
2  libsystem_platform.dylib 0x00007fff697f1b3d _sigtramp + 29
3  libsystem_platform.dylib 0x00007ffee848cee0 _sigtramp + 2127147968
4  libsystem_c.dylib        0x00007fff696af1c9 abort + 127
5  swift                    0x000000010b94f644 llvm::report_bad_alloc_error(char const*, bool) + 100
6  swift                    0x000000010786d210 swift::irgen::CallEmission::setArgs(swift::irgen::Explosion&, bool, swift::irgen::WitnessMetadata*) + 2560
7  swift                    0x0000000107a21335 (anonymous namespace)::IRGenSILFunction::visitFullApplySite(swift::FullApplySite) + 2053
8  swift                    0x0000000107a016aa swift::irgen::IRGenModule::emitSILFunction(swift::SILFunction*) + 9898
9  swift                    0x00000001078c0259 swift::irgen::IRGenerator::emitLazyDefinitions() + 1353
10 swift                    0x00000001079e1250 performIRGeneration(swift::IRGenOptions&, swift::ModuleDecl*, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> >, llvm::StringRef, swift::PrimarySpecificPaths const&, llvm::LLVMContext&, swift::SourceFile*, llvm::GlobalVariable**) + 1232
11 swift                    0x00000001078030b9 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 49417
12 swift                    0x00000001077f36de swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 6862
13 swift                    0x00000001077917be main + 1246
14 libdyld.dylib            0x00007fff69606ed9 start + 1
15 libdyld.dylib            0x000000000000010f start + 2527040055
error: Abort trap: 6
LLVM错误:内存不足
堆栈转储:
0程序参数:
1.发射IR SIL功能“@$sypSgIegn_Ieg_TR”时。
对于>0 swift 0x000000010b99eee3 PrintStackTraceSignalHandler(无效*)+51
1个swift 0x000000010b99e6bc信号处理器(内部)+348
2 libsystem_platform.dylib 0x00007fff697f1b3d_sigtramp+29
3 libsystem_platform.dylib 0x00007ffee848cee0_sigtramp+2127147968
4 libsystem_c.dylib 0x00007fff696af1c9中止+127
5 swift 0x000000010b94f644 llvm::报告错误分配错误(字符常量*,布尔)+100
6 swift 0x000000010786d210 swift::irgen::CallEmission::setArgs(swift::irgen::Explosion&,bool,swift::irgen::WitnessMetadata*)+2560
7 swift 0x0000000107a21335(匿名命名空间)::IRGenSILFunction::visitFullApplySite(swift::FullApplySite)+2053
8 swift 0x0000000107a016aa swift::irgen::IRGenModule::emitSILFunction(swift::SILFunction*)+9898
9 swift 0x00000001078c0259 swift::irgen::Irgener::emitLazyDefinitions()+1353
10 swift 0x00000001079e1250性能生成(swift::IRGenOptions&,swift::ModuleDecl*,std::_1::unique_ptr,llvm::StringRef,swift::PrimarySpecificPaths const&,llvm::LLVMContext&,swift::SourceFile*,llvm::GlobalVariable**)+1232
11 swift 0x00000001078030b9 performCompile(swift::CompilerInstance&,swift::CompilerInitiation&,llvm::ArrayRef,int&,swift::FrontendObserver*,swift::UnifiedStatsReporter*)+49417
12 swift 0x00000001077f36de swift::performFrontend(llvm::ArrayRef,char const*,void*,swift::FrontendObserver*)+6862
13 swift 0x00000001077917be干管+1246
14 libdyld.dylib 0x00007fff69606ed9开始+1
15 libdyld.dylib 0x000000000000010f开始+2527040055
错误:中止陷阱:6

这是不支持语法的错误报告'_(ツ)_/¯ 特别是在我们的案例中,问题出现在Swift 5的新规则中(但我们使用的是Swift 4!):

在Swift 5模式下,@autoclosure参数不能再转发到另一个函数调用中的@autoclosure参数

所以我们改变了:

completionHandler: resolver  -> completionHandler: { resolver(nil) }

当切换到Swift 5时,我们发现了这个问题,XCode报告了这个问题。然后我们切换回Swift 4并进行了此修复,一切正常。

错误消息说LLVM内存不足;请在上提交一个错误。