Home > Mobile >  Can the & # x27; T deliver broadcast error, then kill off application is system
Can the & # x27; T deliver broadcast error, then kill off application is system

Time:09-16



One of my test app, will be:
- have been to music playback,
- play video/image display: intermittent
- have been to run high CPU load:
Run a total of 4 hours,

Ran 100 times, a total of about 5 times the system will be kill off,
See the log because: system to broadcast (android. Intent. Action. BATTERY_CHANGED) sent to the application but failed, leading to the application by the system to kill ,

Other background:
- this application by shareUserId and "android. The uid. The system Shared user ID;
- application installer namely the apk in cell phone system/app directory,
- application of pid is 8047,

Don't know what reason can cause the system to send radio to my application, appeared to throw DeadObjectException failed?

Relevant segments of the log is as follows:
 
09-27 22:21:58. 240, 1283, 1418 W BroadcastQueue: Can 't deliver broadcast to com. My. App (pid 8047). Crashing it.
09-27 22:21:58. 242 1278 1402 I ActivityManager: before 8047: com. My. The demo/1000 (adj) 0: scheduleCrash for 'can' t deliver broadcast 'failed
09-27 22:21:58. 259 1283 1418 W BroadcastQueue: Failure sending broadcast Intent {act=android. Intent. Action. BATTERY_CHANGED FLG=0 x60000010 (from the extras)}
09-27 22:21:58. 259 1283 1418 W BroadcastQueue: android. OS. DeadObjectException: Transaction failed on small parcel. Remote process probably died
09-27 22:21:58. 259 1283 1418 W BroadcastQueue: at android. OS. BinderProxy. TransactNative (Native Method)
09-27 22:21:58. 259 1283 1418 W BroadcastQueue: at android. OS. BinderProxy. Transact (764) Binder. Java:
09-27 22:21:58. 259 1283 1418 W BroadcastQueue: an android. The app. IApplicationThread $$Proxy stubs. ScheduleRegisteredReceiver (IApplicationThread. Java: 1560)
09-27 22:21:58. 259 1283 1418 W BroadcastQueue: at the android. Server. Am. BroadcastQueue. PerformReceiveLocked (BroadcastQueue. Java: 491)
09-27 22:21:58. 259 1283 1418 W BroadcastQueue: at the android. Server. Am. BroadcastQueue. DeliverToRegisteredReceiverLocked (BroadcastQueue. Java: 703)
09-27 22:21:58. 259 1283 1418 W BroadcastQueue: at the android. Server. Am. BroadcastQueue. ProcessNextBroadcast (BroadcastQueue. Java: 858)
09-27 22:21:58. 259 1283 1418 W BroadcastQueue: ats com. Android. Server. Am. BroadcastQueue $BroadcastHandler. HandleMessage (BroadcastQueue. Java: 171)
09-27 22:21:58. 259 1283 1418 W BroadcastQueue: at android. OS. Handler. DispatchMessage (Handler. Java: 106)
09-27 22:21:58. 259 1283 1418 W BroadcastQueue: at android. OS. Stars. Loop (164). Which Java:
09-27 22:21:58. 259 1283 1418 W BroadcastQueue: at android. OS. HandlerThread. Run (65) HandlerThread. Java:
09-27 22:21:58. 259 1283 1418 W BroadcastQueue: ats com. Android. Server ServiceThread. Run (46) ServiceThread. Java:
09-27 22:21:58. 328 1283 7817 I WindowManager: WIN DEATH: Window {5 fdb8d6 u0 com. My. The demo/com. My. The demo. MyTestMain}
09-27 22:21:58. 329 1283 2949 I PowerManagerService: Going to sleep due to screen timeout (uid 1000)...
09-27 22:21:58. 334 1283 2960 I WindowManager: WIN DEATH: Window {202 cf6 u0 com. My. The demo/com. My. The demo. DemoTestTestingActivity}
09-27 22:21:58. 336 1283 1732 W ActivityManager: Scheduling restart of crashed service com. My. The demo/. DemoTestService in 1000 ms
09-27 22:21:58. 337 1283 1732 W ActivityManager: Force o ActivityRecord {73 be0d2 u0 com. My. The demo/. DemoTestTestingActivity t18} : app died, no saved state
09-27 22:21:58. 401 1283 1732 W ActivityManager: missile operation: 52 ms so far, now the at startProcess: returned from the zygote!
09-27 22:21:58. 401 1283 1732 W ActivityManager: missile operation: 52 ms so far, now the at startProcess: done updating 'stats
09-27 22:21:58. 401 1283 1732 W ActivityManager: missile operation: 52 ms so far, now the at startProcess: building the log message
09-27 22:21:58. 401 1283 1732 I ActivityManager: Start proc, 19855: com. My. The demo/1000 for the activity com. My. The demo/. DemoTestMain
09-27 22:21:58. 402 1283 1732 W ActivityManager: missile operation: 53 ms so far, now the at startProcess: starting to update pids map
09-27 22:21:58. 402 1283 1732 W ActivityManager: missile operation: 53 ms so far, now the at startProcess: done updating pids map

CodePudding user response:

482 void performReceiveLocked (ProcessRecord app, IIntentReceiver receiver,
483 Intent Intent, int the resultCode, String data, Bundle extras,
484 Boolean ordered, Boolean sticky, int sendingUser) throws RemoteException {
485//Send the intent to the receiver asynchronously using one - way binder calls.
486 the if (app!=null) {
487 the if (app. Thread!=null) {
488//If we have an app thread, do the call through that so it is
489//correctly ordered with other one - way calls.
490 try {
491 app. Thread. ScheduleRegisteredReceiver (receiver, intent, the resultCode,
492 data, extras, ordered, sticky, sendingUser, app. RepProcState);
493//TODO: Uncomment this when/28322359 (b) is fixed and we aren 't getting
494//DeadObjectException the when the process isn 't later dead.
495//} the catch (DeadObjectException ex) {
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related