Hello all cocos2d friend,
I have a problem with CCSpriteBatchNode and my device HTC Evo. I am using several batch layers - one for background, one for foreground and one for UI. Sometimes occurs that UI layer is missing several sprites in the batch (particulary I have frame composed from edge sprites and inside sprite - missing are several edge sprites but not all and always the same ones).

When I render these sprites without batch, it works ok. The interesting thing is that when I jump to HOME and then back to the game, the batch is repaired! I figured out that the problem is fixed by calling method setupVBO(); after resume. So I thought that the problem will be somewhere in VBO. I created complete dumping of that batch and its texture atlas and data seems to be ok.
The problem will not occur on any simulated device. I have not another device to test.

Hi, I’ve been encountering the same issue on a Samsung Galaxy S+ (I9001), started a thread a while back but got no answer here: http://www.cocos2d-x.org/boards/6/topics/21244
My initial thought was that the sprite batch is not growing but after some debugging I think that’s the problem.

In the meantime I have a flag that specifies if I should use spritebatches or not and all spritebatches have been replaced with CCNode. I’m losing some performance but at least we’re moving forward.
Maybe someone might suggest how to further investigate this

Sorry it’s not much of a help but at least I’m not the only one with this issue:)

I have something similar on HTC Wildifre with Cocos2d-x 2.1.1 - some characters in the CCLabelBMFont (child of CCSpriteBatchNode) do not show themselves, but after going home and back everything is ok.

Hi, I’ve been encountering the same issue on a Samsung Galaxy S+ (I9001), started a thread a while back but got no answer here: http://www.cocos2d-x.org/boards/6/topics/21244
My initial thought was that the sprite batch is not growing but after some debugging I think that’s the problem.
>
In the meantime I have a flag that specifies if I should use spritebatches or not and all spritebatches have been replaced with CCNode. I’m losing some performance but at least we’re moving forward.
Maybe someone might suggest how to further investigate this
>
Sorry it’s not much of a help but at least I’m not the only one with this issue:)
>
Good luck

Thank you very much:-) It seems that you are correct. I fixed the problem by individual setting of batch capacity to prevent resizing. I have batch nodes quite static so this is not problem for this case but there must be some bug in resizing of texture atlas…

`victor I’m having the same issue and I managed to resolve it for dynamic texts by first initializing the label with the highest number of char count it could take (for example my score label has a default value of “000000”) and a setString to “0” afterwards. This avoids the issue but still I’m afraid there is a bug in there on some of the devices.

`jiri at first I thought the same way but as some of the batches are quite dynamic in size the issue is still there even if I initialize the spritebatch with 1000 or more elements, though sprites were being displayed so I concluded the safest way for now is to disable spritebatches on those particular models

I haven’t seen this issue on HTC Desire S and ZTE Blade (Adreno 205 and 200), at least, not related to CCSpriteBatchNode.
I’ll keep an eye on it, to see if it ever happends.

What I did see, is something similar, in which some sprites of the batch were missing.
My problem was not initializing some class attributes on object creation, which randomly took some values which triggered the effect.
C++, as opposed to Java or C# does not initialize variables to a default value (such as zero, or false). Don’t forget.