this->addChild please help!

this->addChild please help!
0.0 0


I have write my own class that inherit CCSprite , then in my constructor function:

CCSprite *dockk = CCSprite::create(“Dock.png”);//this line is working perfectly,i can get infomations from the debugger which means this is not an empty pointer.
this->addChild(dockk);//but this line will break。

program will break at CCSprite.cpp CCAssert(pChildSprite->getTexture()>getName == m_pobTextureAtlas>getTexture()->getName(), “”); line(655 line)

I dont know what i miss.
plz help me on this



SpriteBatch node can only add sprite that from the same texture.

Please use English in this forum, thank you.


my apologize.

but I can do the same thing in cocos2d-iphone?
i only want to add some child sprites.


and, i have found
MySprite2 *sprite2 = MySprite2::create(“Images/grossini.png”);
SpriteTest.cpp, which is from offical sample shows that this should work.