the application has stopped unexpectedly. Please try again

Hi

My game is working in the simulator but when I try to run the game on android devices after few seconds of black screen it gives me this error:

"the application has stopped unexpectedly. Please try again. "

Can anyone help me with this error?

That would be good if I could monitor the device at runtime. Is there any application that allows us for on-device debugging?

Cheers,
[import]uid: 80320 topic_id: 18964 reply_id: 318964[/import]

adb logcat is what you’re looking for I believe.

It might be worth posting your findings in the Android forum rather than here as it’s more likely to get seen by other Android devs there who may be able to help with the log.

You could also check your initial screen to see what could be happening to cause the crash.

I assume no errors in terminal?

Peach :slight_smile: [import]uid: 52491 topic_id: 18964 reply_id: 73048[/import]

Hi Peach,

We have developed a game which is currently published on android market

https://market.android.com/details?id=com.pentaloop.angrytarzan
We are getting complaints about app launching on some of the devices. I checked one of the reported device HTC WildFire S and yes there is a launch exception “application has stopped unexpectedly. Please try again.”

adb The logcat reveals below log, I am unable to sense whats wrong here, any pointers would be greatly appreciated.

**************************************
I/ActivityManager( 119): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.pentaloop.angrytarzan/com.ansca.corona.CoronaActivity bnds=[240,238][320,324] } from pid 233
I/POST_RESELECT: [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$START@40104938,-1,0,-1,0)
I/POST_RESELECT: [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$END@40144a60,-1,0,-1,0)
D/Background traffic light( 233): traffic light: GREEN, mBackgroundTrafficLight = false
I/ActivityManager( 119): Start proc com.pentaloop.angrytarzan for activity com.pentaloop.angrytarzan/com.ansca.corona.CoronaActivity: pid=3691 uid=10072 gids={3003}
D/SensorService( 119): enable: BMA150 3-axis Accelerometer
D/SensorService( 119): SensorDevice::activate: handle = 0x0, enabled = 0x1
D/Sensors ( 119): [AkmSensor::enable] mEnabled = 0x1
D/SensorService( 119): pid=119, uid=1000
I/SurfaceFlinger( 119): SurfaceFlinger::setOrientation
I/WindowManager( 119): Setting rotation to 1, animFlags=1
D/PowerManagerService( 119): button light setOrientation:1
I/ActivityManager( 119): Config changed: { scale=1.0 imsi=410/3 loc=en_GB touch
=3 keys=1/1/2 nav=1/1 orien=2 layout=18 uiMode=17 seq=30 skin=com.htc.skin.Slate}
D/AK8975 ( 80): Compass Start
W/dalvikvm( 233): disableGcForExternalAlloc: false
D/NotificationService( 119): adbEnabled = false
D/lights ( 119): [LedInfo] write attr ok name=/sys/class/leds/amber/brightness string=0,len=1
V/NotificationService( 119): Battery Full, Charging
D/lights ( 119): [LedInfo] write attr ok name=/sys/class/leds/amber/blink string=0,len=1
D/lights ( 119): [LedInfo] write attr ok name=/sys/class/leds/amber/off_timerstring=0 0,len=3
D/lights ( 119): [LedInfo] write attr ok name=/sys/class/leds/green/brightness string=1,len=1
D/lights ( 119): [LedInfo] write attr ok name=/sys/class/leds/green/blink string=0,len=1
D/lights ( 119): [LedInfo] write attr ok name=/sys/class/leds/green/off_timerstring=0 0,len=3
D/NotificationService( 119): adbEnabled = true
D/NotificationService( 119): cancelNotification, ACTION_NOTIFICATION_REMOVE,pkg=android,id=17040228
D/StatusBarService( 207): addNotification notification = StatusBarNotification(package=android id=17040228 tag=null notification=Notification(vibrate=null,sound=null,defaults=0x0,flags=0x2)), key = android.os.BinderProxy@405da680, fullScreenIntent = null, contentIntent = PendingIntent{405c3528: android.os.BinderProxy@405d84f8}
D/com.fd.httpd( 996): sdcard phone type != 1
I/com.fd.httpd( 996): 315968911142–enter query.
D/com.fd.httpd( 996): emmc phone type != 1
I/ActivityThread( 3691): Pub com.pentaloop.angrytarzan.ppy_cache: com.papaya.social.PPYSocialContentProvider
I/ActivityThread( 3691): Pub com.pentaloop.angrytarzan.files: com.ansca.corona.FileContentProvider
W/dalvikvm( 3691): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/ansca/corona/CoronaActivity;
W/dalvikvm( 3691): Class init failed in newInstance call (Lcom/ansca/corona/CoronaActivity;)
D/AndroidRuntime( 3691): Shutting down VM
W/dalvikvm( 3691): threadid=1: thread exiting with uncaught exception (group=0x400205a0)
E/AndroidRuntime( 3691): FATAL EXCEPTION: main
E/AndroidRuntime( 3691): java.lang.ExceptionInInitializerError
E/AndroidRuntime( 3691): at java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime( 3691): at java.lang.Class.newInstance(Class.java:1409)
E/AndroidRuntime( 3691): at android.app.Instrumentation.newActivity(Instrumentation.java:1040)
E/AndroidRuntime( 3691): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1735)
E/AndroidRuntime( 3691): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1851)
E/AndroidRuntime( 3691): at android.app.ActivityThread.access$1500(ActivityThread.java:132)
E/AndroidRuntime( 3691): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1038)
E/AndroidRuntime( 3691): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 3691): at android.os.Looper.loop(Looper.java:150)
E/AndroidRuntime( 3691): at android.app.ActivityThread.main(ActivityThread.java:4277)
E/AndroidRuntime( 3691): at java.lang.reflect.Method.invokeNative(NativeMethod)
E/AndroidRuntime( 3691): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 3691): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/AndroidRuntime( 3691): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime( 3691): at dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime( 3691): Caused by: java.lang.UnsatisfiedLinkError: Couldn’t load openal: findLibrary returned null
E/AndroidRuntime( 3691): at java.lang.Runtime.loadLibrary(Runtime.java:429)
E/AndroidRuntime( 3691): at java.lang.System.loadLibrary(System.java:554)

E/AndroidRuntime( 3691): at com.ansca.corona.CoronaActivity.(CoronaActivity.java:70)
E/AndroidRuntime( 3691): … 15 more
D/dalvikvm( 3691): GC_CONCURRENT freed 170K, 44% free 3162K/5639K, external 0K/0K, paused 8ms+5ms
******************************************************* [import]uid: 69481 topic_id: 18964 reply_id: 90728[/import]

I am afraid I can’t make sense of these logs myself, my Android experience is limited. I will pass it on to someone on the team who may have some insight.

Peach :slight_smile: [import]uid: 52491 topic_id: 18964 reply_id: 90868[/import]

Did you modify your APK with a tool such as apktool?
Such as removing any files contained with the APK or its AndroidManifest.xml file?

The log states that it has an “UnsatisfiedLinkError”, which means it failed to find a library that the Corona app depends on. Such as the Papaya library, which I see your app is trying to load within the log. That would definitely cause this failure. [import]uid: 32256 topic_id: 18964 reply_id: 91347[/import]

HTC Wildfire S is an ARM11 Android phone which is ARM v6 and unsupported.

http://www.gsmarena.com/htc_wildfire_s-3777.php
“CPU 600 MHz ARM 11”
http://www.arm.com/products/processors/classic/arm11/

“ARM11 Processor Family Features:
Powerful ARMv6 instruction set architecture” [import]uid: 10389 topic_id: 18964 reply_id: 91356[/import]

Good catch WauloK. Which makes me wonder how the app got installed on the ARM6 device. If it was installed by hand, then this would happen… although “adb install” would have prevented it. We have a setting in the AndroidManifest.xml file that would prevent ARM6 devices from being able to view and buy ARM7 only apps on the Android Marketplace. So if that was ever removed from the manifest file, then this issue would definitely happen. [import]uid: 32256 topic_id: 18964 reply_id: 91379[/import]

@Joshua

I am using hockeyapp.net to manage test builds on android. It looks like they also dont restrict installs ignoring the required architecture flag in apk manifest file (which is their fault imho).

sheraz may have a similar issue too.

cheers.
deniz. [import]uid: 11686 topic_id: 18964 reply_id: 140076[/import]

@Joshua

I am using hockeyapp.net to manage test builds on android. It looks like they also dont restrict installs ignoring the required architecture flag in apk manifest file (which is their fault imho).

sheraz may have a similar issue too.

cheers.
deniz. [import]uid: 11686 topic_id: 18964 reply_id: 140076[/import]