Projects > cpp > Issues > Bug #356

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

[android] CCLabelTTF::initWithString crashed

Bug #356 [Closed] 2011-02-24 22:05 . Updated almost 2 years ago

I tried to paste these code at the end of TestController::TestController() constructor, (cocos2d-x/tests/tests/controller.cpp)
or at the start of ActionsDemo::onEnter (ActionTest.cpp)

#if 1
    CCLabelTTF* label2 = new CCLabelTTF();
    if ( label2 && label2->initWithString("aaaaa", "Arial", 32) )
        label2 = NULL;

    CCLabelTTF* label2 = CCLabelTTF::labelWithString("aaaa", "Arial", 32);
    if (label2)
        label2->setPosition( ccp(10, 10) );

It crashed at android, if I new CCLabelTTF object, and call object->initWithString. The odd thing is that, CCLabelTTF::labelWithString works well.
The crashed code works well on win32 & iphone port. 2011-03-13 23:43
  • Target version changed from cocos2d-0.99.5-x-0.8.0 to cocos2d-0.99.5-x-0.8.3 2011-03-14 18:37
  • Status changed from New to Resolved
  • Assignee changed from zhangxm to
  • % Done changed from 0 to 100 2011-03-14 19:09
  • Status changed from Resolved to Closed
  • Target version changed from cocos2d-0.99.5-x-0.8.3 to cocos2d-0.99.5-x-0.8.0 2012-05-25 08:19
  • Project changed from cocos2d-x to cpp
  • Category deleted (2)
  • Target version deleted (cocos2d-0.99.5-x-0.8.0)
agenindonesia 2014-11-25 20:40 Agen Texas Poker Dan Domino Online Indonesia Terpercaya
OK, I’ve updated the announcement and added a link to zipball on google code. Thank you for reminding me.
Agen Indonesia | Agen Bola | Poker Indonesia

ionliga 2014-11-28 14:47

The optimization introduces a bug where the priority and Touch Mode will not get changed if the list is locked.
The most straight forward fix is to merge the pHandlersToAdd and pHandlersToRemove into a queue and process through all of them in the order they are received Agen Texas Poker dan Domino Online Indonesia Terpercaya | Agen Bola | Taruhan Bola | Agen Bola | Agen Judi Bola Online, Agen Judi Casino Online Indonesia Terpercaya | Jasa SEO | Agen Sbobet

Atom PDF

Start date:2011-02-24
Due date:
% Done:


Target version:-

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.