Application exits on relaunch , but then launches fine again.

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?

I could really use some help with this, I am running it through the adb debugger and the app crashes with the segfault below in the log.

I/ActivityManager( 107): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.sachmanya.protosillydino/com.ansca.corona.CoronaActivity }
I/System.out( 2213): Corona version = Corona/Android/1.0
I/ActivityManager( 107): Displayed activity com.sachmanya.protosillydino/com.ansca.corona.CoronaActivity: 108 ms (total 108 ms)
I/DEBUG ( 2102): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 2102): Build fingerprint: 'sprint/htc_supersonic/supersonic/supersonic:2.2/FRF91/294884:user/release-keys'
FRF91/294884:user/release-keys'
I/DEBUG ( 2102): pid: 2213, tid: 2250 >>> com.sachmanya.protosillydino <<<
I/DEBUG ( 2102): signal 11 (SIGSEGV), fault addr 00000000

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.

I did that, but it looked like the app was crashing before it reached my code.

I then tested with the simple HelloWorld app from the sample apps that are shipped with corona sdk and had the same issue.

This seems like a corona issue, I tested with build 544 and 547.

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.

Yeah I'm having this problem too.

-Angelo

Seems like a bug related to resume in the latest build(s). Just add an os.exit in the suspend event as a workaround.

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.

-Angelo

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.

Thanks for your help,
--
Ansca Bugs
bugs@ansca.net

If they add back button support i'll have to decide weather to drop arm6 and use the latest corona or stick to the old and and have no back button......

oh joy oh joy :/

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.

I noticed that the notes for build 555 say this is fixed, thanks! That really helps a lot.

-Angelo

views:1516 update:2011/10/8 8:54:25
corona forums © 2003-2011