Apple LLVM 编译器 3.1 错误

问题描述 投票:0回答:1

我开始遇到这个奇怪的编译器错误,我似乎无法解决。我在互联网上浏览了一些其他建议修复的帖子,但没有一个对我有用。我尝试更改构建设置并将所有“self.x”更改为“[self x]”按照建议;但没有帮助。

我的代码中有多级继承(即游戏 -> 棋盘游戏 -> tictactoegame),我猜,该结构是问题的根源。编译器似乎在合成名为“game”的 tictactoegame 实例后在 viewcontroller 的代码行处崩溃。

我可能犯了什么错误?如果您需要更多信息来检测,请告诉我,任何帮助将不胜感激。这是错误日志:

CompileC "/Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/Objects-normal/i386/TicTacToeViewController.o" "AlDente GameCenter/../TicTacToeViewController.m" normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
        cd "/Users/guvenis/Desktop/AlDente GameCenter"
        setenv LANG en_US.US-ASCII
        setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch i386 -fmessage-length=0 -std=gnu99 -fobjc-arc -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-sign-compare -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -fexceptions -fasm-blocks -Wprotocol -Wdeprecated-declarations -mmacosx-version-min=10.6 -g -Wno-conversion -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch "-DIBOutlet=__attribute__((iboutlet))" "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" "-DIBAction=void)__attribute__((ibaction)" -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -iquote "/Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/AlDente GameCenter-generated-files.hmap" "-I/Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/AlDente GameCenter-own-target-headers.hmap" "-I/Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/AlDente GameCenter-all-target-headers.hmap" -iquote "/Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/AlDente GameCenter-project-headers.hmap" -I/Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Products/Debug-iphonesimulator/include "-I/Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/DerivedSources/i386" "-I/Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/DerivedSources" -F/Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Products/Debug-iphonesimulator -include "/Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/PrecompiledHeaders/AlDente GameCenter-Prefix-fegzlqlfizxpgwaenbkzicwpltxv/AlDente GameCenter-Prefix.pch" -MMD -MT dependencies -MF "/Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/Objects-normal/i386/TicTacToeViewController.d" --serialize-diagnostics "/Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/Objects-normal/i386/TicTacToeViewController.dia" -c "/Users/guvenis/Desktop/AlDente GameCenter/AlDente GameCenter/../TicTacToeViewController.m" -o "/Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/Objects-normal/i386/TicTacToeViewController.o"

0  clang             0x000000010c381422 _ZL15PrintStackTracePv + 34
1  clang             0x000000010c3818a9 _ZL13SignalHandleri + 553
2  libsystem_c.dylib 0x00007fff86fb2cfa _sigtramp + 26
3  clang             0x000000010c72ec10 vtable for llvm::DIFile + 16
4  clang             0x000000010b4d736c clang::ASTContext::getTypeInfo(clang::Type const*) const + 1148
5  clang             0x000000010b4df7cc clang::ASTContext::getTypeInfoInChars(clang::QualType) const + 28
6  clang             0x000000010b4df291 (anonymous namespace)::RecordLayoutBuilder::LayoutField(clang::FieldDecl const*) + 1889
7  clang             0x000000010b5d8b1b clang::ASTContext::getObjCLayout(clang::ObjCInterfaceDecl const*, clang::ObjCImplementationDecl const*) const + 1003
8  clang             0x000000010bc30396 clang::CodeGen::CGDebugInfo::CreateType(clang::ObjCInterfaceType const*, llvm::DIFile) + 1526
9  clang             0x000000010bc31a5c clang::CodeGen::CGDebugInfo::CreateTypeNode(clang::QualType, llvm::DIFile) + 332
10 clang             0x000000010bc2a259 clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile) + 489
11 clang             0x000000010bc2bdde clang::CodeGen::CGDebugInfo::CreatePointeeType(clang::QualType, llvm::DIFile) + 894
12 clang             0x000000010bc2b9bd clang::CodeGen::CGDebugInfo::CreatePointerLikeType(unsigned int, clang::Type const*, clang::QualType, llvm::DIFile) + 285
13 clang             0x000000010bc319f5 clang::CodeGen::CGDebugInfo::CreateTypeNode(clang::QualType, llvm::DIFile) + 229
14 clang             0x000000010bc2a259 clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile) + 489
15 clang             0x000000010bc2b7d7 clang::CodeGen::CGDebugInfo::CreateQualifiedType(clang::QualType, llvm::DIFile) + 183
16 clang             0x000000010bc3195e clang::CodeGen::CGDebugInfo::CreateTypeNode(clang::QualType, llvm::DIFile) + 78
17 clang             0x000000010bc2a259 clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile) + 489
18 clang             0x000000010bc32431 clang::CodeGen::CGDebugInfo::getOrCreateFunctionType(clang::Decl const*, clang::QualType, llvm::DIFile) + 369
19 clang             0x000000010bc32e2a clang::CodeGen::CGDebugInfo::EmitFunctionStart(clang::GlobalDecl, clang::QualType, llvm::Function*, llvm::IRBuilder<false, llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<false> >&) + 1866
20 clang             0x000000010b5ebc11 clang::CodeGen::CodeGenFunction::StartFunction(clang::GlobalDecl, clang::QualType, llvm::Function*, clang::CodeGen::CGFunctionInfo const&, clang::CodeGen::FunctionArgList const&, clang::SourceLocation) + 1073
21 clang             0x000000010bc48034 clang::CodeGen::CodeGenFunction::StartObjCMethod(clang::ObjCMethodDecl const*, clang::ObjCContainerDecl const*, clang::SourceLocation) + 548
22 clang             0x000000010bc481a6 clang::CodeGen::CodeGenFunction::GenerateObjCMethod(clang::ObjCMethodDecl const*) + 38
23 clang             0x000000010b4fe07c clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 876
24 clang             0x000000010b4fdcef (anonymous namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) + 95
25 clang             0x000000010b4fdc51 clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 161
26 clang             0x000000010b4c6092 clang::ParseAST(clang::Sema&, bool) + 306
27 clang             0x000000010b4c4bd7 clang::CodeGenAction::ExecuteAction() + 855
28 clang             0x000000010b49713f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 879
29 clang             0x000000010b495dcb clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2683
30 clang             0x000000010b4885ce cc1_main(char const**, char const**, char const*, void*) + 5086
31 clang             0x000000010b462dd8 main + 648
32 clang             0x000000010b462b44 start + 52
33 clang             0x0000000000000070 start + 18446744069225436512
Stack dump:
0.  Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -cc1 -triple i386-apple-macosx10.6.0 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name TicTacToeViewController.m -pic-level 1 -mdisable-fp-elim -relaxed-aliasing -masm-verbose -target-cpu yonah -target-linker-version 128.2 -g -coverage-file /Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/Objects-normal/i386/TicTacToeViewController.o -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/3.1 -dependency-file /Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/Objects-normal/i386/TicTacToeViewController.d -MT dependencies -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -iquote /Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/AlDente GameCenter-generated-files.hmap -iquote /Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/AlDente GameCenter-project-headers.hmap -include-pch /Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/PrecompiledHeaders/AlDente GameCenter-Prefix-fegzlqlfizxpgwaenbkzicwpltxv/AlDente GameCenter-Prefix.pch.pth -D DEBUG=1 -D IBOutlet=__attribute__((iboutlet)) -D IBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName))) -D IBAction=void)__attribute__((ibaction) -D __IPHONE_OS_VERSION_MIN_REQUIRED=50100 -I /Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/AlDente GameCenter-own-target-headers.hmap -I /Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/AlDente GameCenter-all-target-headers.hmap -I /Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Products/Debug-iphonesimulator/include -I /Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/DerivedSources/i386 -I /Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/DerivedSources -F/Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Products/Debug-iphonesimulator -fmodule-cache-path /var/folders/4f/z2kfb3mj34qfy4jczzt7txr40000gn/T/clang-module-cache -O0 -Wno-trigraphs -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-sign-compare -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -Wprotocol -Wdeprecated-declarations -Wno-conversion -Wno-sign-conversion -std=gnu99 -ferror-limit 19 -fmessage-length 0 -stack-protector 1 -fblocks -fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-arc -fobjc-exceptions -fexceptions -fpascal-strings -fdiagnostics-show-option -serialize-diagnostic-file /Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/Objects-normal/i386/TicTacToeViewController.dia -o /Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/Objects-normal/i386/TicTacToeViewController.o -x objective-c /Users/guvenis/Desktop/AlDente GameCenter/AlDente GameCenter/../TicTacToeViewController.m 
1.  <eof> parser at end of file
2.  /Users/guvenis/Desktop/AlDente GameCenter/AlDente GameCenter/../TicTacToeViewController.m:25:1: LLVM IR generation of declaration 'TicTacToeViewController::checkLastMovesScore'
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal 2 (use -v to see invocation)
clang: note: diagnostic msg: Please submit a bug report to http://developer.apple.com/bugreporter/ and include command line arguments and all diagnostic information.
clang: note: diagnostic msg: Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /var/folders/4f/z2kfb3mj34qfy4jczzt7txr40000gn/T/TicTacToeViewController-bttija.mi
clang: note: diagnostic msg: /var/folders/4f/z2kfb3mj34qfy4jczzt7txr40000gn/T/TicTacToeViewController-bttija.sh
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 254
objective-c iphone xcode clang
1个回答
1
投票

我使用了从视图控制器中的游戏类标头导入的枚举实例,删除它解决了我的问题。现在编译没有错误。奋斗了2个小时,发布到stackoverflow后5分钟就自己修复了。

© www.soinside.com 2019 - 2024. All rights reserved.