Projects > cpp > Issues > Bug #3135

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

Create Issue on Github

Crashes after first loop on real device of ios7

Bug #3135 [Closed]
rickytan 2013-11-09 17:50 . Updated about 2 years ago

very simple code:

    CCSprite* pSprite = CCSprite::create("HelloWorld.png");

    pSprite->setPosition(ccp(visibleSize.width/2 + origin.x, visibleSize.height/2 + origin.y));
    pSprite->runAction(CCRepeatForever::create(CCSequence::create(CCMoveBy::create(0.5, ccp(-40, 0)), CCMoveBy::create(.5, ccp(80, 0)))));

it should repeat forever, but when the sprite move to the very right, just before it rewind, it crashes!
BUT it runs well on simulator !

screenshot1.png (138.2 kB) rickytan, 2013-11-09 17:50

rickytan 2013-11-16 14:58

I think I’ve found out the problem, just add a NULL to the end of var list

pSprite->runAction(CCRepeatForever::create(CCSequence::create(CCMoveBy::create(0.5, ccp(-40, 0)), CCMoveBy::create(.5, ccp(80, 0)), NULL)));
walzer@cocos2d-x.org 2014-10-08 02:55

Redmine issue system is closed, we are using github issue system instead.

This issue was moved to https://github.com/cocos2d/cocos2d-x/issues/8251

Atom PDF

Status:Closed
Start date:2013-11-09
Priority:Low
Due date:
Assignee:-
% Done:

0%

Category:ios
Target version:-

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