Hi all,
I have started to experience some weird memory issues with the game (for iOS, cocos2d-2.0-x-2.0.4) that I’m developing. Here is what it happens:
-
If I run the game from Xcode into my iPod, then everything goes alright.
-
If I archive my game for ad-hoc distribution, and install it on my iPod through Testflight, then it crashes at the same point and I get the following crash report.
It crashes on my loading screen, while I’m creating the animations and adding to them the sprite frames that I’m going to use on the next scene. I’m not using texture packages, what I’m doing is to load individually each png image that makes up the animation and add them to a CCAnimation object invoking addSpriteFrameWithFileName().
void ShitLayer::loadCachedAnimations()
{
cocos2d::CCAnimation* currentAnimation = cocos2d::CCAnimation::create();
currentAnimation->addSpriteFrameWithFileName( FilePath::SHIT_LAYER_STATE_0 );
currentAnimation->addSpriteFrameWithFileName( FilePath::SHIT_LAYER_STATE_1 );
currentAnimation->addSpriteFrameWithFileName( FilePath::SHIT_LAYER_STATE_2 );
currentAnimation->addSpriteFrameWithFileName( FilePath::SHIT_LAYER_STATE_3 );
currentAnimation->addSpriteFrameWithFileName( FilePath::SHIT_LAYER_STATE_4 );
cocos2d::CCAnimationCache::sharedAnimationCache()->addAnimation(
currentAnimation, SHIT_LAYER_ANIM_NAME );
}
So, for me it looks like an out of memory issue, but it is strange that it works just fine if I install my app from Xcode, instead of using the .ipa created for ad-hoc distribution. The only difference that I see is that the first one is signed with my iPhone Developer Profile, and the second one with my iPhone Distribution Profile. Is there any difference concerning the available memory for these scenarios? Am I missing anything else?
Thanks for your help!