Having a really hard time figuring out this bug, hoping someone can provide advice. I'm not 100% sure if it's cocos2d related, but I'm pretty sure texture loading is involved. I'll describe:
I have a bug occurring for some small number of users of my app that I've just managed to replicate -- but I still don't know what is happening. It's a universal app and only the ipad users get the problem, likely due to the super huge textures we're using.
When my app starts I'm loading several large textures on a load screen (3 2048 by 2048 pngs to be precise). This worked fine for hours and hours of testing -- opening up other apps, coming back, all works great again and again.
Yet sometimes (only once so far for me) the app crashes in the loading process. It does NOT generate a crash log. If the console is active it either throws a memory warning OR just a "The Debugger has exited due to signal 10 (SIGBUS)."
Once this happens once, it continues to happen forever with the app. The app can't be started again, even reinstalling it does no good. Other apps work, but anytime I come back to my app and try and restart it, it's broken. The ONLY way to fix it is restarting the iPad.
Now I realized recently I was doing something wrong, based on this thread -- http://www.cocos2d-iphone.org/forum/topic/4526 -- that I should be spacing these texture loads out. The fact is though, if the app has crashed in the way I describe, even spacing them out it still reliably crashes when it goes to load the second texture file.
My question is -- what on earth is going on? How can an app that works fine hundreds of times crash so hard it can't be fixed without a device restart? Is it possible for an app to remain resident in memory in some way, and if so, is there a way to clean it out?
Thanks in advance, sorry this is so long.