CCLabelTTF with Chinese characters will crash (v1.1.13)

62 views
Skip to first unread message

Hawk Version

unread,
Jul 14, 2014, 4:26:14 AM7/14/14
to apportabl...@googlegroups.com

Hello,


We use cocos2d-x CCLabelTTF with Chinese characters and it will cause this crash,

Some characters became garbled,

Please help us, thanks!



#0  0x400e255c in memset () from .apportable/cache/devices/4df0ed0b18156f27/libs/libc.so

#1  0x631835ac in _initWithString(char const*, cocos2d::CCImage::ETextAlign, char const*, int, tImageInfo*) (

    pText=0x68703120 "?\225??\200\234?\200?\205\211?\207\210泡?\200\235?\207??\217??\231\202?\214?\236?\223\212?\203?\234\203?\226\203?\210\215強?\203\210?\205\211?\212\222?\214?\223大?\207\217殭?\215?\203?被?\237\223?\210\220?\207\210泡?\232\204?\217?\211??\214此?\231\202你?\217??\201快?\200\237?\236?\223\212?\220\214?\200?\200\213?\220??\215??\214?\215??\217?快?\200\237殺殭?\215?\214?\207\210泡?\234\203?\232??\237?\207??\217"..., eAlign=kAlignLeft, pFontName=0x5d922791 "", nSize=33, pInfo=0x5d922548) at libs/cocos2dx/platform/ios/CCImage.mm:295

#2  0x6318305c in 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) (

    this=0x635a33d0, 

    pText=0x68703120 "?\225??\200\234?\200?\205\211?\207\210泡?\200\235?\207??\217??\231\202?\214?\236?\223\212?\203?\234\203?\226\203?\210\215強?\203\210?\205\211?\212\222?\214?\223大?\207\217殭?\215?\203?被?\237\223?\210\220?\207\210泡?\232\204?\217?\211??\214此?\231\202你?\217??\201快?\200\237?\236?\223\212?\220\214?\200?\200\213?\220??\215??\214?\215??\217?快?\200\237殺殭?\215?\214?\207\210泡?\234\203?\232??\237?\207??\217"..., nWidth=356, nHeight=313, eAlignMask=kAlignLeft, pFontName=0x5d922791 "", nSize=33, textTintR=1, textTintG=1, textTintB=1, shadow=false, shadowOffsetX=0, shadowOffsetY=0, shadowOpacity=0, shadowBlur=0, stroke=false, 

    strokeR=0, strokeG=0, strokeB=0, strokeSize=0) at libs/cocos2dx/platform/ios/CCImage.mm:612

#3  0x631c1900 in cocos2d::CCTexture2D::initWithString (this=0x63928680, 

    text=0x68703120 "?\225??\200\234?\200?\205\211?\207\210泡?\200\235?\207??\217??\231\202?\214?\236?\223\212?\203?\234\203?\226\203?\210\215強?\203\210?\205\211?\212\222?\214?\223大?\207\217殭?\215?\203?被?\237\223?\210\220?\207\210泡?\232\204?\217?\211??\214此?\231\202你?\217??\201快?\200\237?\236?\223\212?\220\214?\200?\200\213?\220??\215??\214?\215??\217?快?\200\237殺殭?\215?\214?\207\210泡?\234\203?\232??\237?\207??\217"..., textDefinition=0x5d922790) at libs/cocos2dx/textures/CCTexture2D.cpp:586

#4  0x6314566c in cocos2d::CCLabelTTF::updateTexture() (this=0x689e7a00) at libs/cocos2dx/label_nodes/CCLabelTTF.mm:311

#5  0x63145d0c in cocos2d::CCLabelTTF::setFontSize(float) (this=0x689e7a00, fontSize=33.0399971) at libs/cocos2dx/label_nodes/CCLabelTTF.mm:274

#6  0x63082618 in StoreMenu::showInfoMenu(cocos2d::CCMenuItem*) (this=0x6015e6e0, item=0x6011ece0) at StoreMenu.mm:608

#7  0x63157fd4 in cocos2d::CCMenuItem::activate (this=0x6011ece0) at libs/cocos2dx/menu_nodes/CCMenuItem.cpp:114

#8  0x63154fb4 in cocos2d::CCMenu::ccTouchEnded (this=0x60148540, touch=0x63781bc0, event=0x0) at libs/cocos2dx/menu_nodes/CCMenu.cpp:260

#9  0x63155004 in non-virtual thunk to cocos2d::CCMenu::ccTouchEnded(cocos2d::CCTouch*, cocos2d::CCEvent*) (this=0x60148624, touch=0x63781bc0, event=0x0)

    at libs/cocos2dx/menu_nodes/CCMenu.cpp:263

#10 0x631df754 in cocos2d::CCTouchDispatcher::touches (this=0x63567340, pTouches=0x5d922fa8, pEvent=0x0, uIndex=2)

    at libs/cocos2dx/touch_dispatcher/CCTouchDispatcher.cpp:377

#11 0x631dfe00 in cocos2d::CCTouchDispatcher::touchesEnded (this=0x63567340, touches=0x5d922fa8, pEvent=0x0)

    at libs/cocos2dx/touch_dispatcher/CCTouchDispatcher.cpp:507

#12 0x631dfe44 in non-virtual thunk to cocos2d::CCTouchDispatcher::touchesEnded(cocos2d::CCSet*, cocos2d::CCEvent*) (this=0x63567354, touches=0x5d922fa8, pEvent=0x0)

    at libs/cocos2dx/touch_dispatcher/CCTouchDispatcher.cpp:509

#13 0x631729f8 in cocos2d::CCEGLViewProtocol::handleTouchesEnd (this=0x634495d0 <cocos2d::CCEGLView::sharedOpenGLView()::instance>, num=1, ids=0x5d923128, xs=0x5d923100, ys=0x5d9230d8)

    at libs/cocos2dx/platform/CCEGLViewProtocol.cpp:333

#14 0x63187134 in -[EAGLView touchesEnded:withEvent:] (self=0x60111100, _cmd=0x6332a9a8 <L_OBJC_METH_VAR_NAME_141>, touches=0x63544f10, event=0x637af6f0)

    at libs/cocos2dx/platform/ios/EAGLView.mm:463

#15 0x62bd7eb0 in -[UIView _touchesEnded:withEvent:] () from .apportable/SDK/Build/android-armv7a-neon-debugapk/lib/armv7a-neon/libverde.so

#16 0x62be4898 in -[UIWindow sendEvent:] () from .apportable/SDK/Build/android-armv7a-neon-debugapk/lib/armv7a-neon/libverde.so

#17 0x62bb69ec in -[UIApplication sendEvent:] () from .apportable/SDK/Build/android-armv7a-neon-debugapk/lib/armv7a-neon/libverde.so

#18 0x62c11490 in -[UITouchEvent endTouchUpdates] () from .apportable/SDK/Build/android-armv7a-neon-debugapk/lib/armv7a-neon/libverde.so

#19 0x62c11e68 in UITouchEventBatchEnd () from .apportable/SDK/Build/android-armv7a-neon-debugapk/lib/armv7a-neon/libverde.so

#20 0x62c4ec24 in Java_com_apportable_ui_Window_nativeTouchesEnd () from .apportable/SDK/Build/android-armv7a-neon-debugapk/lib/armv7a-neon/libverde.so

#21 0x40843eb4 in dvmPlatformInvoke () from .apportable/cache/devices/4df0ed0b18156f27/libs/libdvm.so

#22 0x40873106 in dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*) () from .apportable/cache/devices/4df0ed0b18156f27/libs/libdvm.so

#23 0x4084d2e4 in dvmJitToInterpNoChain () from .apportable/cache/devices/4df0ed0b18156f27/libs/libdvm.so

#24 0x4084d2e4 in dvmJitToInterpNoChain () from .apportable/cache/devices/4df0ed0b18156f27/libs/libdvm.so

Backtrace stopped: previous frame identical to this frame (corrupt stack?)


Eric Slater

unread,
Jul 14, 2014, 7:40:46 PM7/14/14
to apportabl...@googlegroups.com
Hi Hawk,

I would suggest posting your question on the Apportable forums under the tag Cocos2D! The response times are generally quick and accurate there, and this group in particular is primarily for historical purposes. 

All the best,
Eric
Reply all
Reply to author
Forward
0 new messages