java.lang.RuntimeException from Adobe AIR app - android

I have an app on Amazon that sometimes (less than 1% of installations) crashes, which is reflected in Crash Reports. Obviously, I don't have access to the actual devices where the app crashed. Below is one of the crash reports. Can anything be done to identify the cause of the crashes?
java.lang.RuntimeException
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:2672)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:2690)
at android.app.ActivityThread.access$2100(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:964)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:850)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:608)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalArgumentException
at android.app.Activity.missingDialog(Activity.java:2636)
at android.app.Activity.dismissDialog(Activity.java:2621)
at com.amazon.android.framework.prompt.Prompt.dismissDialog(Unknown Source)
at com.amazon.android.framework.prompt.Prompt.dismiss(Unknown Source)
at com.amazon.android.framework.prompt.PromptManagerImpl.finish(Unknown Source)
at com.amazon.android.framework.prompt.PromptManagerImpl.a(Unknown Source)
at com.amazon.android.framework.prompt.i.a(Unknown Source)
at com.amazon.android.n.e.a(Unknown Source)
at com.amazon.android.n.b.a(Unknown Source)
at com.amazon.android.framework.context.d.a(Unknown Source)
at com.amazon.android.framework.context.d.onDestroy(Unknown Source)
at com.amazon.android.Kiwi.onDestroy(Unknown Source)
at air.com.sierravistasoftware.SightWordsSB1.AppEntry.onDestroy(AppEntry.java)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:2659)
... 11 more

You are having problems dismissing a dialog. Maybe the problem comes when the dialog is started, the device orientation is changed and the activity is recreated without the dialog. In this case, if you try to dismiss the dialog, the app will crash.
Try replicating it to see if this is the problem.
You may prefer using DialogFragment to avoid this problem or simply catch the exception and move on, as you got what you were looking for (your dialog dismissed).
UPDATE:
Your error log states that it's trying to dismiss a missing dialog when the activity is being destroyed. It could be an issue in the com.amazon.android.framework source code, and maybe the users get prompted for something before the crash.
You could try to replicate situations when your Activity is destroyed.
Following our chat via the comments, I can't think in anything else without seeing the code, so I encourage you to use a bug tracking system to help you find under what conditions is your app crashing.
Try ACRA:
ACRA is a library enabling Android Application to automatically post their
crash reports to a GoogleDoc form. It is targetted to android
applications developers to help them get data from their applications
when they crash or behave erroneously.

Related

DeadSystemException start service Android 7

For the past few weeks, I have on my crash reporter:
Fatal Exception: java.lang.RuntimeException: Unable to start service com.####.MyService#ef705d8 with Intent { act=HIDE cmp=com.####/.MyService (has extras) }: java.lang.RuntimeException: android.os.DeadSystemException
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3344)
at android.app.ActivityThread.-wrap21(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1583)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6121)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
This crash is present on:
all Samsung devices 7.0
all Nexus devices on 7.1.2
Note:
It is not due to a recent update of our application, just an OS updates on theses phones.
It is a very very frequent crashes (by far our biggest).
Our users don't report crashes than before (is this crash actually visible for the user?)
We are not able to reproduce it on our side
As you can see into the stack trace, the code impacted is system only. Not much I can do from my side to try and catch and handle the issue.
I checked the thread Android DeadSystemException but that doesn't help me much.
I know that DeadSystemException is:
The core Android system has died and is going through a runtime restart. All running apps will be promptly killed.
Is there anything we can do but to say "that's system, we cannot do anything"?
When the device is being restarted, you cannot run an app. Any app, not just yours but any given app cannot run when the device is restarting. AFAIK it occurs when you try to do something when the system crashes. Meaning if the system crashes and as it restarts your app starts a service or does something you get that error.
Meaning the exception is not connected to your app, but the Android OS and there is nothing you can do about it.
The crash being related to starting a service is because that is what your app did when the system crashed.
So: The error is something the system threw because your app did something when the system did a run-time reboot. There is nothing you can do about this, as you cannot control the Android OS from an app.
I've had the same issue. I implemented a service that uses the android SensorService. In some point of the time, two things happened but I still don't know which one caused the other. 1) The runtime restarted 2) The android SensorService died. I have implemented a default unhandled exceptions handler because I was debugging some other stuff on my app. I noticed that such handler, at least sometimes was catching that exception.
I followed this tutorial to implement it https://doandroid.wordpress.com/2011/11/19/writing-crash-reports-into-device-sd-card/
So, supposing that you implement this handler and it is actually being called when the system dies, you can add some sort of validations inside the handler such that if the exception is the DeadSystemException, you can set up an alarm to restart your application in let's say, 5 minutes or something.
This is of course not an ideal solution, but at least might be a workaround to your problem until you figure out what is really going on with the system.
Some information about how to restart you app programmatically:
Force application to restart on first activity
Your app crashed because of android OS system dies.
Here is the reference.
https://developer.android.com/reference/android/os/DeadSystemException
The core Android system has died and is going through a runtime restart. All running apps will be promptly killed.

Exception while accessing calendar on android device

Getting an exception while launching Calendar on android device.
Logcat:
`
FATAL EXCEPTION: main
Process: com.google.android.calendar, PID: 7209
java.lang.IllegalArgumentException: the name must not be empty: null
at android.accounts.Account.<init>(Account.java:48)
at com.android.calendar.calendarlist.CalendarListUtils.processCursor(CalendarListUtils.java:155)
at com.android.calendar.calendarlist.SelectCalendarsAdapter.swapCursor(SelectCalendarsAdapter.java:160)
at com.android.calendar.calendarlist.DrawerFragment.onLoadFinished(DrawerFragment.java:244)
at com.android.calendar.calendarlist.DrawerFragment.onLoadFinished(DrawerFragment.java:55)
at android.app.LoaderManagerImpl$LoaderInfo.callOnLoadFinished(LoaderManager.java:483)
at android.app.LoaderManagerImpl$LoaderInfo.onLoadComplete(LoaderManager.java:451)
at android.content.Loader.deliverResult(Loader.java:144)
at android.content.CursorLoader.deliverResult(CursorLoader.java:109)
at android.content.CursorLoader.deliverResult(CursorLoader.java:97)
at android.content.AsyncTaskLoader.dispatchOnLoadComplete(AsyncTaskLoader.java:265)
at android.content.AsyncTaskLoader$LoadTask.onPostExecute(AsyncTaskLoader.java:92)
at android.os.AsyncTask.finish(AsyncTask.java:651)
at android.os.AsyncTask.-wrap1(AsyncTask.java)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:668)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Force finishing activity com.google.android.calendar/com.android.calendar.AllInOneCalendarActivity
`
Did anyone get this issue? Any help would be appreciated.
#Krishna,
Problem could be solved by setting --> App and clearing cache and data from the calendar app and do a force stop of the calendar app.
Also, there is one more app which is running for calendar called "Calendar storage", which could be found in Setting --> App and on the top menu click on Show System.
On this screen all system Apps will be visible. Click on Calendar storage and follow all the steps for clearing cache and data and force stop the app.
Now start the Calendar App, It will start without any issue.
This is an off-topic question. StackOverflow is intended for programming questions.
Anyway, just for the sake of answering, I think your Calendar app hasn't been granted permissions sufficient permissions.
Head over to Settings --> Apps --> Calendar.
Click on Permissions and enable all in it.
Now reboot the phone and try. It should work by now.
If it still doesn't work, try clearing it's data & cache and try again.

IllegalArgumentException in LoadedApk.forgetReceiverDispatcher()

I have an Android application in android market, I am getting the following error report,
I have used webView, zoom controls, these are all working fine, when ever I test it on OS 2.2,2.3,4.04,4.1,4.2. I don't know when this crash occur, either on zoom control or in loading .apk file from the market.
I am getting these error reports from several users, Please let me know what is this problem and how i can resolve this issue,
Thanks in advance.
java.lang.IllegalArgumentException: Receiver not registered: android.widget.ZoomButtonsController$1#43335900
at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:628)
at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1178)
at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:361)
at android.widget.ZoomButtonsController.setVisible(ZoomButtonsController.java:405)
at android.widget.ZoomButtonsController$2.handleMessage(ZoomButtonsController.java:179)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4517)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:980)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:747)
at dalvik.system.NativeStart.main(Native Method)
I had the same problem, and successfully used this workaround:
ViewFlipper : Receiver not registered
You should basically create your own ViewFlipper subclass, and override it's onDetachedFromWindow function to stop flipping instead of crushing.
Than use that subclass in your layout.

Android error log after app crash

I received >>>THIS<<< error log from a client. I replaced the app name with: APP_NAME. Can you help me determine if it was my app's fault? It seems to me that something went wrong outside my app and caused the error in a service:
06-30 15:54:51.059 W/ActivityManager( 427): Scheduling restart of
crashed service
com..android/.services.periodic.GpsLoggerService
But I'm not sure if it was the real cause of the error message. Was it?
The log was taken and sent by an external tool. Log collector. So it's not just a log from my app, but from whole system.
Looking at the pastebin, I can definitely say for certain is seems your app has b0rk3d up. Look at lines 457-465 which shows the
java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
06-30 15:54:51.049 D/Process (11724): java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
06-30 15:54:51.049 D/Process (11724): dalvik.system.NativeStart.main(Native Method)
Something happened in the thread there, perhaps, mishandling the thread management, also at line 804 your broadcast receiver, perhaps received some intent, which is causing your app to crash as a whole.
I know its not much help but hope it helps you in the right direction.

Widget Exception on Power On

My app has a home screen widget. When I power on the phone (from off, not sleep) I get a fatal exception.
04-06 14:33:59.739: ERROR/AndroidRuntime(271): java.lang.RuntimeException: Unable to instantiate receiver com.mytest.myapp.AppWidget: java.lang.ClassNotFoundException: com.mytest.myapp.AppWidget in loader dalvik.system.PathClassLoader[/data/app/com.mytest.myapp-2.apk]
04-06 14:33:59.832: ERROR/AndroidRuntime(269): Caused by: java.lang.ClassNotFoundException: com.mytest.myapp.AppWidget in loader dalvik.system.PathClassLoader[/data/app/com.mytest.myapp-2.apk]
If I click the app to start it again, it works fine. Any idea on what is happening?
It would be useful to see the Manifest.mf, just in case there's a typo lurking in there.
Failing that, the only explanation that leaps to mind is that the phone is trying to launch the app before /data is mounted. Can you reproduce in the emulator?
Phil Lello

Categories

Resources