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.
Related
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.
My application is basically a File Manager with junk cleaner. It is working fine everywhere but when i restart my phone Unfortunately app has stopped message appears several times. Also sometimes it appears when any other application is started. Can anyone tell why it is happening, or how to detect the cause behind it.
To detect the cause behind, you can monitor the logcat.
Since the crash occurs after the phone restart and so if you are not able to see the exception in log cat, you can log the same into a file to see the cause of exception.
Use the below link for how to log unhandled exception into file.
https://derivedcode.wordpress.com/2015/06/29/how-to-log-un-handled-exceptions-in-android/
I made a simple plugin for Atooma: performer plugin to change a wallpaper photo upon trigger: Screen On. After it triggered this action couple of times after some time it stopped working: in Atooma notification it always says that it has been triggered but my performer doesn't get called: I made sure by putting couple of log calls inside performer.
I checked the logs and these may provide some clue:
threadid=17 (Thread-6653): calling run()
android.os.DeadObjectException
at android.os.BinderProxy.transact(Native Method)
at com.atooma.plugin.r.a(Unknown Source)
at com.atooma.plugin.z.a(Unknown Source)
at com.atooma.engine.t.run(Unknown Source)
at java.lang.Thread.run(Thread.java:838)
threadid=17: exiting
This log message appears every time when trigger is activated ('screen on' in my current case)
Another symptom is that when I look at my task in Atooma, I don't see DO part where my performer action was - no icons, after DO nothing shows (description bellow is ok). When I try to edit it - Atooma crashes: dialog message appears: "Unfortunately, Atooma has stopped. Report/Ok". If I click OK Atooma obviously get restarted showing me again my task, icons for my performer are still missing but when I click edit it works this time. Performer again works upon trigger but after a while it stops working again with same exceptions as above listing from log every time it gets triggered.
Any suggestion is appreciated
Yes, I saw the same problem. It happens when the Atooma service died or something internal to Atooma happens (the plug communicates with Atooma via aidl remote service). The only option is to uninstall and install the plug again. Report this behavior to the Atooma team.
Is there any way I can get rid of this message despite the app being stopped due to any exception?
My app(background service) is designed in such a way that it always restarts itself within 1 mins in case it gets killed. So even if it gets stopped, it would be restarted again, with no negative impact. Hence that message would unnecessarily annoy/worry the users.
As the app works fine on my device, but on other's device, its giving that message once or twice a day. I have no way to read the logs and check whats going on. I have placed the try/catch block everywhere. And the code is too complex to dig into again and check whats wrong. In short, I don't want to get rid of the "cause" off the message. But the "message" itself. Is it at all possible?
So How do I get rid of android OS showing that message even if it has "stopped"?
So even if it gets stopped, it would be restarted again, with no negative impact
There is no way to know whether or not there is a "negative impact" until the source of the problem is found.
I have no way to read the logs and check whats going on. I
Use crash logging frameworks like ACRA to collect stack traces from production apps.
And the code is too complex to dig into again and check whats wrong.
Use the crash logs from crash logging frameworks like ACRA to identify the source of the problem.
Is it at all possible?
Read the documentation for your chosen crash logging framework and see what the options are for user notification regarding such crashes. Some, like ACRA, will offer a "silent" mode where the crash is logged but without informing the users of that crash.
Theoretically, you could set up your own Thread.setDefaultUncaughtExceptionHandler
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