sprite test iterator list corrupted when a touch Event is done.

sprite test iterator list corrupted when a touch Event is done.
0.0 0


Hello all,

I am referring to the SpriteTest in tests folder of cocos2d-1.0.1-x-0.13.0-beta\tests\tests\SpriteTest library.

In which a new grossini image is keep on adding when we touch at a location.

The program is running fine when no action is taken.
an exception is occurred when I touch the screen and control is breaking and going to the point “1” as shown below :

void **CLR_OR_THIS_CALL*Orphan_me
{ // cut ties with parent
{ // adopted, remove self from list
*Iterator_base *****Pnext =
1)> while
_Pnext = &
***Pnext =*Mynextiter;
_Mycont = 0;
I have added the following code to HelloWorld.cpp created from a HelloWorld project:

void HelloWorld::addNewSpriteWithCoords
int idx =** 1400.0f / 100.0f);
int x = * 85;
int y = * 121;

CCSprite* sprite = CCSprite::spriteWithFile );
sprite~~>setPosition );
CCActionInterval** action;
float random = CCRANDOM_0_1;
action = CCScaleBy::actionWithDuration;
else if
action = CCRotateBy::actionWithDuration;
else if
action = CCBlink::actionWithDuration;
else if
action = CCTintBy::actionWithDuration;
action = CCFadeOut::actionWithDuration;
CCActionInterval** action_back = action~~>reverse;
CCActionInterval* seq = );
sprite~~>runAction( CCRepeatForever::actionWithAction(seq) );

void HelloWorld::ccTouchesEnded(CCSet* touches, CCEvent* event)
CCSetIterator it;
CCTouch* touch;

// for( it = touches~~>begin; it != touches~~>end(); it++)
it = touches~~>begin;
touch = ;
// if
// break;
CCPoint location = touch~~>locationInView();

location = CCDirector::sharedDirector()->convertToGL(location);

// }

which is same as in SpriteTest.cpp
and also in HelloWorld::init()

CCSize s = CCDirector::sharedDirector()->getWinSize();
addNewSpriteWithCoords( ccp(s.width/2, s.height/2) );


P.S :
virtual void ccTouchesBegan(cocos2d::CCSet* pTouches,cocos2d::CCEvent* pEvent);
virtual void ccTouchesMoved(cocos2d::CCSet* pTouches,cocos2d::CCEvent* pEvent);
are also present in controller.h which is same as in tests.

Please let me know why this exception occurs. And also whether the touch events format I am following are correct.