If you try to play again an animation once it is finished (on the completedAnimationSequenceNamed delegate based on CCBAnimationManagerDelegate), cocos throws an exception. To avoid that, the CCBAnimationManager::sequenceCompleted method should be modified to this:
1-play an animation by calling animationManager~~>runAnimations; .
2-when the animation ends, the completedAnimationSequenceNamed delegate is fired.
3-try to execute the animation again from the delegate animationManager~~>runAnimations(“ArmPigForeground”); will cause an error
Could you please describe how to reproduce it?
Can i reproduce it by using CocosBuilderTest?
I got this issue too.
According to the source, after you call CCBAnimationManager::runAnimations in CCBAnimationManagerDelegate::completedAnimationSequenceNamed callback, the mRunningSequence will be set to NULL.
So when the next CCBAnimationManagerDelegate::completedAnimationSequenceNamed is fired, you got crash by mRunningSequence->getName();
The thread author’s solution is almost there.
I think put the delegate call back before the nextSeqId check is better.
I’ll come up with a pull request in github latter.