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. [import]uid: 8145 topic_id: 14159 reply_id: 314159[/import]

hey Wizem, did you find a solution to this?

i got exactly the same problem. but it occurs for my game already after about an hour.

besides that it’s absolutely the same.

it’s such a strange problem because as long as you dont shut the game or device down its running like a charme after the install. but after an hour approximately, if you close it and rerun it, it gets stuck in the default screen till it crashes with the report of “failed to launch in time”

i have no memory leaks, and the game itself is not very complex. i have no idea either and hoped to find an answer in the forums, but all i found was this thread from 2011, that was left without answer for about 2 years. 

ANYONE? i can’t believe thats a problem that me and wizem are the only ones having in the past 2 years.

ok, here are my results from try and error of today:

  • first i updated to the most current corona build.

  • after doing that i got plenty of errors from lua glider’s cider debugger lua file (glider 19 beta)

  • so i decided to load my files into the last stable release of lua glider, no errors in the output anymore.

  • last but not least i added  launchPad = false to my config.lua

app is running stable for 4 hours now. with turning it on and off multiple times. 
before the changes it didnt even last 30 minutes without the above described crashing behaviour.

i actually still dont know what was wrong, and am still not believing 100% that it is gone. so, i hope it’s fixed, and will still run stable after weeks and months.

i thought i share this, even when it’s not explaining what causes the error, but it might help the next user checking this thread in 2015.

hey Wizem, did you find a solution to this?

i got exactly the same problem. but it occurs for my game already after about an hour.

besides that it’s absolutely the same.

it’s such a strange problem because as long as you dont shut the game or device down its running like a charme after the install. but after an hour approximately, if you close it and rerun it, it gets stuck in the default screen till it crashes with the report of “failed to launch in time”

i have no memory leaks, and the game itself is not very complex. i have no idea either and hoped to find an answer in the forums, but all i found was this thread from 2011, that was left without answer for about 2 years. 

ANYONE? i can’t believe thats a problem that me and wizem are the only ones having in the past 2 years.

ok, here are my results from try and error of today:

  • first i updated to the most current corona build.

  • after doing that i got plenty of errors from lua glider’s cider debugger lua file (glider 19 beta)

  • so i decided to load my files into the last stable release of lua glider, no errors in the output anymore.

  • last but not least i added  launchPad = false to my config.lua

app is running stable for 4 hours now. with turning it on and off multiple times. 
before the changes it didnt even last 30 minutes without the above described crashing behaviour.

i actually still dont know what was wrong, and am still not believing 100% that it is gone. so, i hope it’s fixed, and will still run stable after weeks and months.

i thought i share this, even when it’s not explaining what causes the error, but it might help the next user checking this thread in 2015.