assert from CCSprite

assert from CCSprite
0.0 0


Just wanted to let you know that I downloaded the new version and copied my existing source code over. I get the following assertion from CCSprite. I cannot remember if it was from setTexture or or Draw()

But I reverted back to the older version as I did not have time to debug.

assert(! m_bUsesBatchNode)

The Hello World application works, however.


Hi, I had the same error - I fixed it by adding of init() to the CCSprite contructor - it was removed in new version

(I used sprites from sharedSpriteFrameCache…)

: m_pobTexture(NULL)
init(); // <- this was missing


Yes, it is removed in new version.
Because the static method all invoke init().
And it is not safe to invoke init() in construction.


I used CCSprite like this:

    CCSprite *normalSprite = new CCSprite();

it was working in 0.9.1 version and it is not working in version 0.9.2 because of this assert.


Yes, you should invoke init() after

CCSprite *normalSprite = new CCSprite();