I am almost ready to push my first android app, but running into a wierd issue. When I exit the app, using the back button on the device and then relaunch it again from the appicon, the app does not load but actually exits again, as if it did not exit the first time.
Then, when I launch the app again it launches fine.
How can I debug this issue? Would it be in the crashlogs?
[import]uid: 67589 topic_id: 11382 reply_id: 311382[/import]
Seg faults are hard to debug. You should fill your code with print(“calling function x”) etc between different function calls. The prints will show up in this same console log.
You can then figure out in which function it crashes and narrow it down further with more prints inside that function. [import]uid: 8872 topic_id: 11382 reply_id: 41925[/import]
I just submitted a bug report on this. One important thing I forgot to mentionis that the segfault happens on ALTERNATE launch, as if the exit from the previous launch did not clear up some thing. [import]uid: 67589 topic_id: 11382 reply_id: 41943[/import]
Seems like a bug related to resume in the latest build(s). Just add an os.exit in the suspend event as a workaround. [import]uid: 8872 topic_id: 11382 reply_id: 42200[/import]
Yeah I’ve been doing that for a while, but people keep reporting it as a bug.
It would be better if opening the keyboard on the droid didn’t close the app. Also I wish I could handle the back button - on some phones there’s a soft back button down right next to the cannon in my game, so people close the app by accident all the time, and then say it force closes a lot. Also people are surprised when the back button closes the app instead of sending them back to the previous screen.
Thanks kam187, I was able to push my app out with the workaround. I got an email from ansca folks that this is indeed a bug.
Hi archie,
Thanks for your report. It sounds like you are probably running into an open Corona issue on Android, which has to do with not handling the back button properly. We are raising the priority on this issue as it affects all of our growing Android developer community.
For your reference, the related internal tracking numbers to look for in future release notes are: 6343 and 744.
Android apps crashing after relaunch is a problem in our current daily builds (e.g. 552). This seemed to be introduced after we rebuild our Android build process (to speed up the build process).
Build 528 does not crash in our testing. Case 6343 can be used to track this issue and hope to have a fix soon. [import]uid: 7559 topic_id: 11382 reply_id: 42735[/import]