Problem with batchnodes

Forums Programming Programming – Everything else Problem with batchnodes

This topic contains 2 replies, has 3 voices, and was last updated by  cocoBavan 2 years, 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
Author Posts
Author Posts
June 1, 2011 at 2:26 pm #231865


Hi, i’m making a game and having two problems with batchnodes and i think one of them is making the game crash, here’s what the log says:

The first one and probably the reason why my game is crashing:

*** Assertion failure in -[CCSpriteBatchNode removeChild:cleanup:], /Users/eduardoacedo/Desktop/Primera AplicaciĆ³n/Don’tEatTheOctopus copia 2/libs/cocos2d/CCSpriteBatchNode.m:232

And the second one:

CCSpriteBatchNode: resizing TextureAtlas capacity from [73] to [98]. This one is being thrown many times with other numbers like [98] to [132].

Hope someone can help me.

June 1, 2011 at 4:37 pm #332112


First assertion:

If you look into the file CCSpriteBatchNode.m, line #232, you will see the following assertion: “CCSpriteBatchNode doesn’t contain the sprite. Can’t remove it”. That means that your code is calling the removeChild method on CCSpriteBatchNode, but the child you are passing in was never added to that batch node using the addChild method. In other words, you are trying to remove something that is not there. This failed assertion is crashing your game.

Second log:

This is not a problem. It’s just an announcement that tells you that the size of your TextureAtlas (used internally by CCSpriteBatchNode) has been expanded to accommodate the number of children that it can contain. No reason for alarm. It’s more of a “Oh, interesting…” moment. :)

June 1, 2011 at 5:02 pm #332113


I have encountered the same earlier too. I couldn’t reason it.

@Karvus: If you try to emit the details of the culprit child before removal, you would see that child will have the same address of a child just removed and the culprit sprite will have the atlas index -1. I dint spend much time to find an explanation, but will be happy if someone could find a solution ;).

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.