[Android] Application attempts to start and then quits when ran on device

Hi All,

Started using Corona today and I’m already in love! What a fantastic product. Hail to the developers.

So, I’ve been messing about with the tutorials and trying a few things of my own. And then the next step is to upload it to my phone of course and give it a test run. This is where trouble arose in paradise…

My phone is an LG Optimus 2x (that dual core thing with the nvidia tegra).

The steps I took were as follows:

  1. build the application
  2. copy the .apk file to the memory card
  3. install the .apk from the phone

That all goes well without trouble. Next I try to run the app and you can see it do *something*, as in: a brief black screenflash. Then it jumps back to the applications screen from where I tried to launch it.

First thing I checked was if that processor could be a problem since it’s new and all but it seems to be a regular ARM based CPU (Cortex-A9) which uses the V7 instructions… should be fine, right?

I welcome all advice and suggestions :slight_smile:

If I left out any important information, please let me know and I’ll try to update it as soon as I can.

Yours sincerely,
Reinier [import]uid: 53290 topic_id: 8992 reply_id: 308992[/import]

[Update]

Got logcat up and running which spits out the following when attempting to run the application:

I/AllAppsWorkspace( 1285): notificationExecute():packageName=com.rrossen.hellowo
rld, className=com.rrossen.helloworld.MyCoronaActivity
I/AllAppsWorkspace( 1285): FIND packageName=com.rrossen.helloworld
I/ActivityManager( 1094): Starting activity: Intent { act=android.intent.action.
MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.rrossen.hello
world/.MyCoronaActivity }
D/Launcher( 1285): onSaveInstanceState
D/Launcher( 1285): ==== Launcher onPause======
I/AllAppsWorkspace( 1285): onPause()
D/DragLayer( 1285): endDrag()
D/Launcher( 1285): Ori_Sensor_on_off _SENSOR_OFF
D/dalvikvm( 1285): GC_EXTERNAL_ALLOC freed 1846 objects / 86584 bytes in 32ms
I/ActivityManager( 1094): Start proc com.rrossen.helloworld for activity com.rro
ssen.helloworld/.MyCoronaActivity: pid=27471 uid=10106 gids={3003}
D/dalvikvm(27471): Trying to load lib /data/data/com.rrossen.helloworld/lib/libo
penal.so 0x46c5a668
D/dalvikvm(27471): Added shared lib /data/data/com.rrossen.helloworld/lib/libope
nal.so 0x46c5a668
D/dalvikvm(27471): Trying to load lib /data/data/com.rrossen.helloworld/lib/libm
pg123.so 0x46c5a668
D/dalvikvm(27471): Added shared lib /data/data/com.rrossen.helloworld/lib/libmpg
123.so 0x46c5a668
D/dalvikvm(27471): No JNI_OnLoad found in /data/data/com.rrossen.helloworld/lib/
libmpg123.so 0x46c5a668, skipping init
D/dalvikvm(27471): No JNI_OnLoad found in /system/lib/libvorbisidec.so 0x46c5a66
8, skipping init
D/dalvikvm(27471): Trying to load lib /data/data/com.rrossen.helloworld/lib/liba
lmixer.so 0x46c5a668
D/dalvikvm(27471): Added shared lib /data/data/com.rrossen.helloworld/lib/libalm
ixer.so 0x46c5a668
D/dalvikvm(27471): No JNI_OnLoad found in /data/data/com.rrossen.helloworld/lib/
libalmixer.so 0x46c5a668, skipping init
D/dalvikvm(27471): Trying to load lib /data/data/com.rrossen.helloworld/lib/libc
orona.so 0x46c5a668
I/DEBUG ( 1018): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *
**
I/DEBUG ( 1018): Build fingerprint: ‘lge/lge_star/p990/p990:2.2.2/FRG83G/lgp99
0-V10a.2ED2A082E2:user/release-keys’
I/DEBUG ( 1018): pid: 27471, tid: 27471 >>> com.rrossen.helloworld <<<
I/DEBUG ( 1018): signal 4 (SIGILL), fault addr 81ab1798
I/DEBUG ( 1018): r0 81ab178f r1 00000003 r2 00000000 r3 0007e1c0
I/DEBUG ( 1018): r4 81b2a510 r5 00000003 r6 00000004 r7 0023f2f6
I/DEBUG ( 1018): r8 80917040 r9 0000ddb0 10 4208fc40 fp 00000000
I/DEBUG ( 1018): ip afd03610 sp becbb0c0 lr b000115d pc 81ab1798 cpsr 800
00010
Followed by a bunch of more gibberish. Anyone able to make some sense of this?

As for now,
Goodnight! [import]uid: 53290 topic_id: 8992 reply_id: 32805[/import]

Firstly, welcome! Corona is a fantastic SDK.

I don’t work with Android at the moment, only iOS - but just for the sake of trying to isolate the problem, have you tried building a Corona sample app (one intended for Android, obviously) and putting it on your device?

If it were to crash then it’s clearly a compatibility issue whereas if it runs fine there’s probably just some little problem with your code that has been overlooked. (It happens to the best of us.)

Peach :slight_smile: [import]uid: 52491 topic_id: 8992 reply_id: 33396[/import]

Hi Peach,

Thanks for replying.

I’ve submitted a bug report by mail already that explains the problem a bit more extensively, sent from the same email address as registered with this account. I’ll copy paste the report here just in case :slight_smile:

Quote:
My phone is an LG optimus 2x. At the start of the day it was as it came out of the factory, android-wise.

My application kept crashing continuously upon opening. My logcat lists the following line: I/DEBUG ( 9453): signal 4 (SIGILL), fault addr 81ab1798

I’ll spare you the full story but the following steps have been taken, with the help of a good friend of mine who has been using Corona professionally for a while.

fails means, in this context, it tries to start, immediately closes (no force close notice) with the above log-entry.

  • test my simple “hello world” APK which does nothing more than create a textfield - fails
  • test my simple “hello world” APK on my friend’s phone, which runs a custom ROM - fails
  • his simple “hello world” APK on my phone - fails
  • his professional application compiled with the previous corona build - success
  • that same professional application compiled with the current corona build - fails
  • my phone now has a custom rom, Vanilla, with basically nothing on it. Tried the same options as above, with the exact same results

We have both agreed that this is most likely something that went belly-up in the current Corona build.

/Quote

Thats pretty much the entire story. It might be fixed in the latest daily build but since I’m not a subscriber I can’t test it, nor read the changelog as far as I understand. And being Dutch… it’s probably in my nature that I don’t pay for something that doesn’t work… yet :wink:

Personally, I’m leaning towards something going haywire because of the Tegra chip. While it uses a Cortex A9, which is an ARMv7 architecture, it’s also a dual-core variety. Perhaps some threading code is used that isn’t expecting more than one core or something?

Kind regards,
Reinier Rossen [import]uid: 53290 topic_id: 8992 reply_id: 33397[/import]

I’m not so much a tech person as I am someone who provides Lua related support, so I’m glad you got a ticket/email in regarding your issues.

I wish I could check this out myself but I’ve only got the Optimus or whatever it’s called. (I don’t use it because it’s ARMv6.)

Hopefully this can get sorted out quickly for you.

Peach :slight_smile: [import]uid: 52491 topic_id: 8992 reply_id: 33541[/import]

Nevertheless, thanks for replying :slight_smile: Now I’m just hoping to get a response to the report since it was first considered an invalid report as the person answering assumed I had the same Optimus as you…

Here’s to hoping :)! [import]uid: 53290 topic_id: 8992 reply_id: 33585[/import]

Although the cause is still unknown (most likely the Tegra), I can confirm the issue is resolved in the latest daily build (note: I didn’t check any older ones, besides the public one).

  • Reinier [import]uid: 53290 topic_id: 8992 reply_id: 33732[/import]

I’m happy to hear that :slight_smile: [import]uid: 52491 topic_id: 8992 reply_id: 33792[/import]