Frozen app (this is not an Ice Cream Sandwich joke)

What would make an app freeze before it executes even one statement? I have inserted several print() lines, including at line 1, but when I run the app with the debug bridge the first print() doesn’t appear. The tablet’s screen just goes black and stays there.

More perplexing, it’s an intermittent error. When it happens, Back doesn’t exit the app but Home does. Then I can get to the app grid and tap the icon. The screen goes blank for a second, then the grid comes back. When I tap the icon again the app runs normally.

This happens on GB and ICS. I don’t have a device with JB. It never freezes in the simulator. My Corona is build 2013.1202.

Do you have plenty of free storage (not the SD card but the main device)?

Rob, thanks for your reply. I think you’re onto something. When I force stop a couple of other apps the problem goes away. But I thought, from my limited understanding of how Android works, that it would have done that on its own, that is, unload inactive apps as needed to make room to run a new one. Anyway, it isn’t a bug in my app, and that’s what I was worried about.

Well I was thinking more about storage than memory.  APK files are really just .zip files that have been renamed.  When you run the app, we have to unzip some files to storage that are needed to run and perhaps if you’re really tight on storage space, we might not be able to unpack everything we need.

But the other side is memory usage and if Android isn’t unloading older unused apps, or your app is using too much memory for the device then you could be hitting errors there too.  I would think there would be something in the device log in either case (it may not be a Corona generated message, so just run:   adb logcat     without any other parameters to make sure your not filtering only Corona messages) and see if there is in intel there.

Rob

Do you have plenty of free storage (not the SD card but the main device)?

Rob, thanks for your reply. I think you’re onto something. When I force stop a couple of other apps the problem goes away. But I thought, from my limited understanding of how Android works, that it would have done that on its own, that is, unload inactive apps as needed to make room to run a new one. Anyway, it isn’t a bug in my app, and that’s what I was worried about.

Well I was thinking more about storage than memory.  APK files are really just .zip files that have been renamed.  When you run the app, we have to unzip some files to storage that are needed to run and perhaps if you’re really tight on storage space, we might not be able to unpack everything we need.

But the other side is memory usage and if Android isn’t unloading older unused apps, or your app is using too much memory for the device then you could be hitting errors there too.  I would think there would be something in the device log in either case (it may not be a Corona generated message, so just run:   adb logcat     without any other parameters to make sure your not filtering only Corona messages) and see if there is in intel there.

Rob