Perma-crash on launch on iOS after some time playing

After several gaming sessions (sometimes a few, most of the time - really, really a lot), my game stops launching on iOS devices (confirmed for 3GS/4G).

I've been dealing with this bug for several weeks now. I've inserted a ton of print statements to debug the launch process of my app, and I've finally gotten a device with the most debug info to start crashing at launch. This is a show-stopper bug for players: if the bug occurs, they can do nothing short of reinstalling the game to fix i t.

This bug does not occur on Android, and I believe I have committed no modifications for the launch process since a version of the game that did not start crashing on launch at some point. I did change Corona build versions several times since a version that didn't have the bug to the first version where we encountered the bug.

The specifics I could get from the debug version of the games are not cheerful either. I've inserted print statements all over the launch process - loading the database, the main menu, initializing flurry, super rewards, sounds, etc. They all work fine, and I get the final print statement in my launch routine also prints, at the end of main.lua.

It would appear all my code works fine, and there are no hangs that I could be responsible for; I currently see no way that a print statement that works after all my code has finished working would print to XCode's console, while there is some of my code that uses Corona improperly that causes a hang.

I am thus forced to make the conclusion that this is a critical bug in Corona.

XCode tells me that "The application failed to launched in time", and the system kill -9's it. Other than that, there seems to be no relevant output (on one device, I got a warning: "unknown sandboxd[538] : ShovelHeroes(537) deny file-write-create /Applications/.dat0219.000").

There are some very nasty traits to this bug:

  • I'm able to get 3G devices into the state of no-launch much easier than 4G devices, which might imply this is performance related.
  • It happens after a seemingly random amount of play, and no specific game event seems to trigger it, making it hard to reproduce in my game
  • My game stretches Corona very wide, using a very large subset of its' features - networking, databases, IAP, etc, and I don't know if the bug is connected to any of them.
  • This would imply that making a test app to verify the bug is extremely difficult, since It needs to be a performance-intensive app that uses the subsystem of Corona that triggers the bug. Having no access to the engine's code, I don't feel that I can help create such an application.

After the game gets updated due to an update in the app store, the bug does not go away (this is what I was waiting to test most of all before writing this up). To us, this means iOS is not supported by Corona in it's latest builds.

I will try fiddling around with this, switching to earlier builds and have the entire office play the game built with them for a week to try and reproduce the bug, and hope that the bug really is not present on the devices it won't be reproduced on.

I really hope I'll get some help with this bug, because otherwise (due to the phantom nature of the bug) developing future iOS games with Corona is too risky. I'm ready to collaborate, and we're thinking up ways to make the bug more reproducible, but so far no luck on our side.

There is of course no way I can be 100% certain this is an issue with the engine, and not just me misusing it, but I believe the fact that the last print statement in my initialization routine works is very good evidence.

I'm sorry to report such a horrid bug, but right now it looks like it might really be present in the engine, and this is not just me writing some bogus data to the database (though that very well may be; but why would the launch procedure get to the end then?). Basically, we can't even promote this on iOS, because all the users we'll pay to get are destined to leave us.

views:1419 update:2011/10/11 22:13:38
corona forums © 2003-2011