CCLabelTTF android error (cocos2d-x 2.2.3 bug?)

If searched and can’t find why this is happening, or what is happening really. My ndk-stack tool is outputting:

the error is happening in my init function when I try to create a label in android (NOTE: it doesn’t happen in iOS)

error happens @
CCLabelTTF *play = CCLabelTTF::create("NEW GAME", "arial", 18);

What’s the deal with this? is it a cocos2dx bug?

EDIT: here is the trace of the error, if the image is too small:

Stack frame #09 pc 00158761 /data/data/com.shadysidelabs.frostbite/lib/libcocos2dcpp.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+18): Routine CallStaticVoidMethod in /Users/zachkauffman/desktop/development/adt/ndk/platforms/android-8/arch-arm/usr/include/jni.h:793 Stack frame #10 pc 001dc707 /data/data/com.shadysidelabs.frostbite/lib/libcocos2dcpp.so (cocos2d::BitmapDC::getBitmapFromJavaShadowStroke(char const*, int, int, cocos2d::CCImage::ETextAlign, char const*, float, float, float, float, bool, float, float, float, float, bool, float, float, float, float)+302): Routine getBitmapFromJavaShadowStroke in (null):0 Stack frame #11 pc 001dc85b /data/data/com.shadysidelabs.frostbite/lib/libcocos2dcpp.so (cocos2d::CCImage::initWithStringShadowStroke(char const*, int, int, cocos2d::CCImage::ETextAlign, char const*, int, float, float, float, bool, float, float, float, float, bool, float, float, float, float)+104): Routine initWithStringShadowStroke in /Users/zachkauffman/Desktop/cocos/projects/frostbite/proj.android/../../../cocos2dx/platform/android/CCImage.cpp:225 Stack frame #12 pc 001ee607 /data/data/com.shadysidelabs.frostbite/lib/libcocos2dcpp.so (cocos2d::CCTexture2D::initWithString(char const*, cocos2d::_ccFontDefinition*)+430): Routine initWithString in (null):0 Stack frame #13 pc 001c6e6f /data/data/com.shadysidelabs.frostbite/lib/libcocos2dcpp.so (cocos2d::CCLabelTTF::updateTexture()+42): Routine updateTexture in /Users/zachkauffman/Desktop/cocos/projects/frostbite/proj.android/../../../cocos2dx/label_nodes/CCLabelTTF.cpp:318 Stack frame #14 pc 001c72b9 /data/data/com.shadysidelabs.frostbite/lib/libcocos2dcpp.so (cocos2d::CCLabelTTF::setString(char const*)+88): Routine setString in /Users/zachkauffman/Desktop/cocos/projects/frostbite/proj.android/../../../cocos2dx/label_nodes/CCLabelTTF.cpp:182 Stack frame #15 pc 001c6b03 /data/data/com.shadysidelabs.frostbite/lib/libcocos2dcpp.so (cocos2d::CCLabelTTF::initWithString(char const*, char const*, float, cocos2d::CCSize const&, cocos2d::CCTextAlignment, cocos2d::CCVerticalTextAlignment)+126): Routine initWithString in /Users/zachkauffman/Desktop/cocos/projects/frostbite/proj.android/../../../cocos2dx/label_nodes/CCLabelTTF.cpp:143 Stack frame #16 pc 001c6b93 /data/data/com.shadysidelabs.frostbite/lib/libcocos2dcpp.so (cocos2d::CCLabelTTF::create(char const*, char const*, float, cocos2d::CCSize const&, cocos2d::CCTextAlignment, cocos2d::CCVerticalTextAlignment)+48): Routine create in /Users/zachkauffman/Desktop/cocos/projects/frostbite/proj.android/../../../cocos2dx/label_nodes/CCLabelTTF.cpp:90 Stack frame #17 pc 001c6bd3 /data/data/com.shadysidelabs.frostbite/lib/libcocos2dcpp.so (cocos2d::CCLabelTTF::create(char const*, char const*, float)+14): Routine create in /Users/zachkauffman/Desktop/cocos/projects/frostbite/proj.android/../../../cocos2dx/label_nodes/CCLabelTTF.cpp:76 Stack frame #18 pc 001561a9 /data/data/com.shadysidelabs.frostbite/lib/libcocos2dcpp.so (MainMenuScene::init()+176): Routine init in jni/../../Classes/MainMenuScene.cpp:74 Stack frame #19 pc 0015667d /data/data/com.shadysidelabs.frostbite/lib/libcocos2dcpp.so (MainMenuScene::scene()+32): Routine scene in jni/../../Classes/MainMenuScene.cpp:40

@shadysidelabs can you give me a demo I can test it for you

yuye.liu@chukong-inc.com

@yuye wrote:

@shadysidelabs can you give me a demo I can test it for you

yuye.liu@chukong-inc.com

@yuye
All I do is create a CCLabelTTF. When I call CCLabelTTF::create, it errors out on that line

Thanks!
-Shady

hi could you check building for blackberry also… it is giving erros and wont build…thx

@shadysidelabs Have u been build the c++ by build_native.py?

What happened to the top 8 stack frames?

Hi, I have the same erros with CCLabelTTF on Eclipse. With VisualStudio and xcode works fine, but Android launch errors and I don’t know why…