baptzmoffire
baptzmoffire

Reputation: 589

No Idea What This Error Code Means: "Apple LLVM Compiler 3.1 Error", "clang failed with exit code 254" Cocos2D, Xcode 4.3.3

Looked around and I can't find any satisfactory answer to my particular problem. Found some posts on SO about this error code, but they're mostly talking about the compiler having a problem with dot notations and tags not being assigned, so those problems don't seem to apply here.

In my HelloWorldLayer.m file, I have a method that adds CCSprites to the layer and moves them to certain positions on the screen. The method works fine--sprites are initialized and animated properly--when I move each sprite and set my BOOLs individually, like so:

[card1 moveToCard1Position];
[opponentCard1 moveToOpponentCard1Position];
[card2 moveToCard2Position];
[opponentCard2 moveToOpponentCard2Position];
[CCDelayTime actionWithDuration: kHoleCardTravelTime];

// BOOLs to determine if the card is in its proper place
card1ReachedPosition = YES;
card2ReachedPosition = YES;
opponentCard1ReachedPosition = YES;
opponentCard2ReachedPosition = YES;

But I need the bools not to be set until the animation has actually completed in real time. So, when I use a CCSequence to delay the setting of the bools to YES until AFTER the animations have completed, like this:

[self runAction:[CCSequence actions:[CCDelayTime actionWithDuration:0.0], 
             [card1 moveToCard1Position], 
             [opponentCard1 moveToOpponentCard1Position], 
             [card2 moveToHoleCard2Position], 
             [opponentCard2 moveToOpponentCard2Position], 
             [CCDelayTime actionWithDuration:kCardTravelTime], 
             card1ReachedPosition = YES, 
             card2ReachedPosition = YES, 
             opponentCard1ReachedPosition = YES, 
             opponentCard2ReachedPosition = YES, 
             nil]];    

I get the "clang failed with exit code 254" error. The complete error, I'll show at the bottom for thoroughness. I've used [self runAction:...] elsewhere in my HelloWorldLayer.m file just fine, but for some reason that I can't figure out, only this method throws the 254 error. What I be doin' wrong? TIA

CompileC /Users/Home/Library/Developer/Xcode/DerivedData/CardGame-efaqdicwgomjmmefmvhiyaissfgj/Build/Intermediates/CardGame.build/Debug-iphonesimulator/CardGame.build/Objects-normal/i386/HelloWorldLayer.o CardGame/HelloWorldLayer.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/Home/Development/zzzMyGames/CardGame
    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 -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 -Wno-uninitialized -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 -DCOCOS2D_DEBUG=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/Home/Library/Developer/Xcode/DerivedData/CardGame-efaqdicwgomjmmefmvhiyaissfgj/Build/Intermediates/CardGame.build/Debug-iphonesimulator/CardGame.build/CardGame-generated-files.hmap -I/Users/Home/Library/Developer/Xcode/DerivedData/CardGame-efaqdicwgomjmmefmvhiyaissfgj/Build/Intermediates/CardGame.build/Debug-iphonesimulator/CardGame.build/CardGame-own-target-headers.hmap -I/Users/Home/Library/Developer/Xcode/DerivedData/CardGame-efaqdicwgomjmmefmvhiyaissfgj/Build/Intermediates/CardGame.build/Debug-iphonesimulator/CardGame.build/CardGame-all-target-headers.hmap -iquote /Users/Home/Library/Developer/Xcode/DerivedData/CardGame-efaqdicwgomjmmefmvhiyaissfgj/Build/Intermediates/CardGame.build/Debug-iphonesimulator/CardGame.build/CardGame-project-headers.hmap -I/Users/Home/Library/Developer/Xcode/DerivedData/CardGame-efaqdicwgomjmmefmvhiyaissfgj/Build/Products/Debug-iphonesimulator/include -ICardGame/libs/kazmath/include -I/Users/Home/Library/Developer/Xcode/DerivedData/CardGame-efaqdicwgomjmmefmvhiyaissfgj/Build/Intermediates/CardGame.build/Debug-iphonesimulator/CardGame.build/DerivedSources/i386 -I/Users/Home/Library/Developer/Xcode/DerivedData/CardGame-efaqdicwgomjmmefmvhiyaissfgj/Build/Intermediates/CardGame.build/Debug-iphonesimulator/CardGame.build/DerivedSources -F/Users/Home/Library/Developer/Xcode/DerivedData/CardGame-efaqdicwgomjmmefmvhiyaissfgj/Build/Products/Debug-iphonesimulator -include /Users/Home/Library/Developer/Xcode/DerivedData/CardGame-efaqdicwgomjmmefmvhiyaissfgj/Build/Intermediates/PrecompiledHeaders/Prefix-ggqxnfadbzynyrexiqnutryhfhfk/Prefix.pch -MMD -MT dependencies -MF /Users/Home/Library/Developer/Xcode/DerivedData/CardGame-efaqdicwgomjmmefmvhiyaissfgj/Build/Intermediates/CardGame.build/Debug-iphonesimulator/CardGame.build/Objects-normal/i386/HelloWorldLayer.d --serialize-diagnostics /Users/Home/Library/Developer/Xcode/DerivedData/CardGame-efaqdicwgomjmmefmvhiyaissfgj/Build/Intermediates/CardGame.build/Debug-iphonesimulator/CardGame.build/Objects-normal/i386/HelloWorldLayer.dia -c /Users/Home/Development/zzzMyGames/CardGame/CardGame/HelloWorldLayer.m -o /Users/Home/Library/Developer/Xcode/DerivedData/CardGame-efaqdicwgomjmmefmvhiyaissfgj/Build/Intermediates/CardGame.build/Debug-iphonesimulator/CardGame.build/Objects-normal/i386/HelloWorldLayer.o

0  clang             0x000000010149e422 _ZL15PrintStackTracePv + 34
1  clang             0x000000010149e8a9 _ZL13SignalHandleri + 553
2  libsystem_c.dylib 0x00007fff95754cfa _sigtramp + 26
3  libsystem_c.dylib 0x00007fff60172000 _sigtramp + 18446744072814187296
4  clang             0x0000000100d85de9 (anonymous namespace)::CGObjCCommonMac::EmitMessageSend(clang::CodeGen::CodeGenFunction&, clang::CodeGen::ReturnValueSlot, clang::QualType, llvm::Value*, llvm::Value*, clang::QualType, bool, clang::CodeGen::CallArgList const&, clang::ObjCMethodDecl const*, (anonymous namespace)::ObjCCommonTypesHelper const&) + 1385
5  clang             0x0000000100d88525 (anonymous namespace)::CGObjCNonFragileABIMac::GenerateMessageSend(clang::CodeGen::CodeGenFunction&, clang::CodeGen::ReturnValueSlot, clang::QualType, clang::Selector, llvm::Value*, clang::CodeGen::CallArgList const&, clang::ObjCInterfaceDecl const*, clang::ObjCMethodDecl const*) + 309
6  clang             0x0000000100d64074 clang::CodeGen::CodeGenFunction::EmitObjCMessageExpr(clang::ObjCMessageExpr const*, clang::CodeGen::ReturnValueSlot) + 1908
7  clang             0x00000001007110a5 clang::StmtVisitorBase<clang::make_ptr, (anonymous namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) + 17349
8  clang             0x00000001008ec760 (anonymous namespace)::ScalarExprEmitter::VisitCastExpr(clang::CastExpr*) + 464
9  clang             0x000000010070fabb clang::StmtVisitorBase<clang::make_ptr, (anonymous namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) + 11739
10 clang             0x000000010070ccc8 clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) + 72
11 clang             0x00000001008ee819 clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*, clang::CodeGen::AggValueSlot, bool) + 57
12 clang             0x00000001008ee715 clang::CodeGen::CodeGenFunction::EmitCallArg(clang::CodeGen::CallArgList&, clang::Expr const*, clang::QualType) + 1445
13 clang             0x0000000100d6b011 void clang::CodeGen::CodeGenFunction::EmitCallArgs<clang::ObjCMethodDecl>(clang::CodeGen::CallArgList&, clang::ObjCMethodDecl const*, clang::ConstExprIterator, clang::ConstExprIterator) + 97
14 clang             0x0000000100d63e78 clang::CodeGen::CodeGenFunction::EmitObjCMessageExpr(clang::ObjCMessageExpr const*, clang::CodeGen::ReturnValueSlot) + 1400
15 clang             0x00000001007110a5 clang::StmtVisitorBase<clang::make_ptr, (anonymous namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) + 17349
16 clang             0x000000010070ccc8 clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) + 72
17 clang             0x00000001008ee819 clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*, clang::CodeGen::AggValueSlot, bool) + 57
18 clang             0x00000001008f1e09 clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(clang::Expr const*) + 41
19 clang             0x000000010070c312 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 242
20 clang             0x000000010070c8eb clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) + 251
21 clang             0x000000010070c69a clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 154
22 clang             0x000000010070c240 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 32
23 clang             0x0000000100d651ba clang::CodeGen::CodeGenFunction::GenerateObjCMethod(clang::ObjCMethodDecl const*) + 58
24 clang             0x000000010061b07c clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 876
25 clang             0x000000010061acef (anonymous namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) + 95
26 clang             0x000000010061ac51 clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 161
27 clang             0x00000001005e3092 clang::ParseAST(clang::Sema&, bool) + 306
28 clang             0x00000001005e1bd7 clang::CodeGenAction::ExecuteAction() + 855
29 clang             0x00000001005b413f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 879
30 clang             0x00000001005b2dcb clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2683
31 clang             0x00000001005a55ce cc1_main(char const**, char const**, char const*, void*) + 5086
32 clang             0x000000010057fdd8 main + 648
33 clang             0x000000010057fb44 start + 52
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 HelloWorldLayer.m -pic-level 1 -mdisable-fp-elim -relaxed-aliasing -masm-verbose -target-cpu yonah -target-linker-version 128.2 -g -coverage-file /Users/Home/Library/Developer/Xcode/DerivedData/CardGame-efaqdicwgomjmmefmvhiyaissfgj/Build/Intermediates/CardGame.build/Debug-iphonesimulator/CardGame.build/Objects-normal/i386/HelloWorldLayer.o -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/3.1 -dependency-file /Users/Home/Library/Developer/Xcode/DerivedData/CardGame-efaqdicwgomjmmefmvhiyaissfgj/Build/Intermediates/CardGame.build/Debug-iphonesimulator/CardGame.build/Objects-normal/i386/HelloWorldLayer.d -MT dependencies -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -iquote /Users/Home/Library/Developer/Xcode/DerivedData/CardGame-efaqdicwgomjmmefmvhiyaissfgj/Build/Intermediates/CardGame.build/Debug-iphonesimulator/CardGame.build/CardGame-generated-files.hmap -iquote /Users/Home/Library/Developer/Xcode/DerivedData/CardGame-efaqdicwgomjmmefmvhiyaissfgj/Build/Intermediates/CardGame.build/Debug-iphonesimulator/CardGame.build/CardGame-project-headers.hmap -include-pch /Users/Home/Library/Developer/Xcode/DerivedData/CardGame-efaqdicwgomjmmefmvhiyaissfgj/Build/Intermediates/PrecompiledHeaders/Prefix-ggqxnfadbzynyrexiqnutryhfhfk/Prefix.pch.pth -D DEBUG -D COCOS2D_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/Home/Library/Developer/Xcode/DerivedData/CardGame-efaqdicwgomjmmefmvhiyaissfgj/Build/Intermediates/CardGame.build/Debug-iphonesimulator/CardGame.build/CardGame-own-target-headers.hmap -I /Users/Home/Library/Developer/Xcode/DerivedData/CardGame-efaqdicwgomjmmefmvhiyaissfgj/Build/Intermediates/CardGame.build/Debug-iphonesimulator/CardGame.build/CardGame-all-target-headers.hmap -I /Users/Home/Library/Developer/Xcode/DerivedData/CardGame-efaqdicwgomjmmefmvhiyaissfgj/Build/Products/Debug-iphonesimulator/include -I CardGame/libs/kazmath/include -I /Users/Home/Library/Developer/Xcode/DerivedData/CardGame-efaqdicwgomjmmefmvhiyaissfgj/Build/Intermediates/CardGame.build/Debug-iphonesimulator/CardGame.build/DerivedSources/i386 -I /Users/Home/Library/Developer/Xcode/DerivedData/CardGame-efaqdicwgomjmmefmvhiyaissfgj/Build/Intermediates/CardGame.build/Debug-iphonesimulator/CardGame.build/DerivedSources -F/Users/Home/Library/Developer/Xcode/DerivedData/CardGame-efaqdicwgomjmmefmvhiyaissfgj/Build/Products/Debug-iphonesimulator -fmodule-cache-path /var/folders/gl/wnr8s5t94vqfqf9s9bthyb200000gp/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 -Wno-uninitialized -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-exceptions -fexceptions -fpascal-strings -fdiagnostics-show-option -serialize-diagnostic-file /Users/Home/Library/Developer/Xcode/DerivedData/CardGame-efaqdicwgomjmmefmvhiyaissfgj/Build/Intermediates/CardGame.build/Debug-iphonesimulator/CardGame.build/Objects-normal/i386/HelloWorldLayer.dia -o /Users/Home/Library/Developer/Xcode/DerivedData/CardGame-efaqdicwgomjmmefmvhiyaissfgj/Build/Intermediates/CardGame.build/Debug-iphonesimulator/CardGame.build/Objects-normal/i386/HelloWorldLayer.o -x objective-c /Users/Home/Development/zzzMyGames/CardGame/CardGame/HelloWorldLayer.m 
1.  <eof> parser at end of file
2.  /Users/Home/Development/zzzMyGames/CardGame/CardGame/HelloWorldLayer.m:52:1: LLVM IR generation of declaration 'HelloWorldLayer::scene'
3.  /Users/Home/Development/zzzMyGames/CardGame/CardGame/HelloWorldLayer.m:339:22: LLVM IR generation of compound statement ('{}')
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/gl/wnr8s5t94vqfqf9s9bthyb200000gp/T/HelloWorldLayer-GbrnJj.mi
clang: note: diagnostic msg: /var/folders/gl/wnr8s5t94vqfqf9s9bthyb200000gp/T/HelloWorldLayer-GbrnJj.sh
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 254

Upvotes: 0

Views: 988

Answers (1)

CodeSmile
CodeSmile

Reputation: 64477

CCSequence takes a list of class objects deriving from CCAction. Clearly card1ReachedPosition is not a CCAction class instance, it's a BOOL. From the code it's hard to tell but [card1 moveToCard1Position] probably does not return an instance of a CCAction class either.

What you want to do (besides not heavily nesting method calls) is to use CCCallFunc or CCCallBlock actions to set the bools for you respectively to relay calls to the moveToXXX methods.

Upvotes: 1

Related Questions