2012-11-27 86 views
1

我開始得到這個奇怪的編譯器錯誤,我似乎無法解決。我通過互聯網上的其他一些帖子提出了修復建議,但是他們都沒有爲我工作。我嘗試更改構建設置,並按照建議將所有「self.x」更改爲「[self x]」;但沒有幫助。蘋果LLVM編譯器3.1錯誤

在我的代碼中有多級繼承(即遊戲 - >棋盤遊戲 - > 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 

回答

1

我使用的視圖 - 控制從遊戲類頭進口枚舉實例,刪除它固定我的問題。它現在編譯沒有錯誤。奮鬥2個小時,在發佈到stackoverflow後5分鐘自行修復。

+1

令人討厭的編譯器錯誤。請通過http://bugreporter.apple.com/提交錯誤 – bbum