Breaking News
Home / iOS / iOS Isuses / CCSprite#draw SHOULD NOT be called

CCSprite#draw SHOULD NOT be called

Issue

Users/mvohra/workspace/projects/iphone/BasketBall/BasketBall/libs/cocos2d/CCSprite.m:576
2012-09-13 23:01:43.450 Shoot that Ball[20513:10a03]

*** Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘If CCSprite is being rendered by CCSpriteBatchNode, CCSprite#draw SHOULD NOT be called’
*** First throw call stack:

Resolution

This exception happens when you add CCSpriteBatchNode is used to batch up the Sprites but at the same time CCSprite is also used independently. If the CCSprite needs to be created, it can be instantied using Text cache as part of the CCSpriteBatchNode. So review your code and check for places where CCSprite is being created from the CCSpriteBatchNode itself.

[pb_builder]

Check Also

local variable ‘build_data’ referenced before assignment : TestFlight Error : Failed to upload build.

Scenario Trying to upload build to TestFlight fails in the end. Error local variable ‘build_data’ …

Leave a Reply