I follow the tutorial about Breakout Game which includes Box2D http://www.raywenderlich.com/505/how-to-create-a-simple-breakout-game-with-box2d-and-cocos2d-tutorial-part-22, and of course I use cocos2d-x.
Anyway, when I try to switch the scene whenever the ball contacts with the bottom edge (see the near end of “When we hit the botom” section in that link). With the same code I ran into problem of releasing object within the scene calling replaceScene() function.
I captured a screenshot in debugging stack to provide you with more information. That kind of error happens all the time whenever the ball touch the bottom and try to switch the scene with replaceScene().
Note: The code is pretty much the same, and follow the same structure as the original tutorial, but if you want me to show any specific code please let me know.
Any suggestions are very welcome !
Screen Shot 2012-02-26 at 7.09.30 PM.png (84.3 KB)