Failed to use CCLabelBMFont in update

Failed to use CCLabelBMFont in update
0.0 0


I have the following code in my GameScene(inside the init method):

CCSize winSize = CCDirector::sharedDirector()>getWinSize;
CCLabelBMFont * scoreLabel ;
scoreLabel = CCLabelBMFont::labelWithString;
>setPosition( ccp( 100,100)) ;
this~~>addChild ;

It works ok, but when I try to use the code


inside the update method, the app chash?

Anyone has idea to fix this or why this is happening?


I have tested this issue based on latest cocos2d-x 2.0 on the github, but no crashes.
So let me know which cocos2d-x version you are using?
It’s better to upload an demo based on HelloWorld to reproduce this issue.
Thanks. :slight_smile:


I forgot to tell, I use version 0.12.0, I tried to develop using the cocos2d-x 2.0.1, but I find some crashs that I can’t resolve.

I take a look in the tests folder and run the LabelTest(that use a CCLabelAtlas) and works fine. I’ll use it instead of CCLabelBMFont.