Android keyDispatchingTimedOut problem - android

In my android application i am implementing map functionality. it has a tab bar when i jump one activity to another activity through tab its working perfectly. but when i come on map activity and try to move from it through "Back key of device" the entire application freezes and after a couple of seconds I get the dreaded force close dialog appearing and i got error.
11-11 10:53:26.083: ERROR/ActivityManager(85): ANR in com.project.activity
(com.project.activity/.MapActivity)
11-11 10:53:26.083: ERROR/ActivityManager(85): Reason: keyDispatchingTimedOut
11-11 10:53:26.083: ERROR/ActivityManager(85): Load: 2.64 / 1.75 / 1.64
11-11 10:53:26.083: ERROR/ActivityManager(85): CPU usage from 8749ms to 209ms ago:
11-11 10:53:26.083: ERROR/ActivityManager(85): dianic.activity: 18% = 16% user + 1% kernel / faults: 1938 minor
11-11 10:53:26.083: ERROR/ActivityManager(85): mediaserver: 14% = 14% user + 0% kernel
11-11 10:53:26.083: ERROR/ActivityManager(85): system_server: 4% = 2% user + 1% kernel / faults: 167 minor
11-11 10:53:26.083: ERROR/ActivityManager(85): dhd_dpc: 1% = 0% user + 1% kernel
11-11 10:53:26.083: ERROR/ActivityManager(85): android.vending: 0% = 0% user + 0% kernel / faults: 57 minor
11-11 10:53:26.083: ERROR/ActivityManager(85): synaptics_wq: 0% = 0% user + 0% kernel
11-11 10:53:26.083: ERROR/ActivityManager(85): e.process.gapps: 0% = 0% user + 0% kernel / faults: 3 minor
11-11 10:53:26.083: ERROR/ActivityManager(85): wpa_supplicant: 0% = 0% user + 0% kernel
11-11 10:53:26.083: ERROR/ActivityManager(85): logcat: 0% = 0% user + 0% kernel
11-11 10:53:26.083: ERROR/ActivityManager(85): TOTAL: 41% = 36% user + 5% kernel + 0% softirq
please guide me why this is occurring.. thanks in advance

This type of problem occur when code get window leak type of problem or when we try to perform many operation on same activity...

Related

ANR in Android (Input dispatching timed out) (server) is not responding

ANR in Android (Input dispatching timed out) (server) is not responding. Waited 5003ms for FocusEvent(hasFocus=true))
i'm not using network connections.
sometimes, occur this ANR. not every time.
i did search about this ANR. but i can not find same reasons..
i want know to what cases does this happen?
i don't have any idea about this ANR.
i can not guess anyone.... why happened?
why occured this ANR?
somebody help me, please...
E/ActivityManager: ANR in com.myapp.profindertest.debug (com.myapp.profindertest.debug/com.myapp.profindertest.HomeActivity)
PID: 29952
Reason: Input dispatching timed out (2339a79 com.myapp.profindertest.debug/com.myapp.profindertest.HomeActivity (server) is not responding. Waited 5003ms for FocusEvent(hasFocus=true))
Parent: com.myapp.profindertest.debug/com.myapp.profindertest.HomeActivity
Load: 5.32 / 5.66 / 5.68
----- Output from /proc/pressure/memory -----
some avg10=0.00 avg60=0.01 avg300=0.00 total=9675698
full avg10=0.00 avg60=0.00 avg300=0.00 total=1563915
----- End output from /proc/pressure/memory -----
CPU usage from 0ms to 7732ms later (2021-09-15 18:57:28.432 to 2021-09-15 18:57:36.165):
41% 29952/com.myapp.profindertest.debug: 33% user + 7.6% kernel / faults: 25810 minor
35% 2013/com.kt.tvcore.core: 21% user + 14% kernel / faults: 21391 minor
23% 693/system_server: 13% user + 10% kernel / faults: 10493 minor
16% 4044/com.kt.gigagenie.voicerecognition: 13% user + 3.2% kernel / faults: 3038 minor
6.9% 305/ktplayerd: 1.4% user + 5.5% kernel / faults: 338 minor
5.6% 217/logd: 1.9% user + 3.7% kernel / faults: 9 minor
5.3% 551/adbd: 1.8% user + 3.4% kernel / faults: 620 minor
4.9% 319/android.hardware.audio.service-droidlogic: 2.9% user + 1.9% kernel / faults: 156 minor
4.9% 850/com.android.systemui: 3.6% user + 1.2% kernel / faults: 4250 minor
4.2% 10912/com.google.android.gms.persistent: 3.3% user + 0.9% kernel / faults: 3391 minor
0.6% 538/media.swcodec: 0.3% user + 0.2% kernel / faults: 7843 minor
3.7% 1661/com.kt.tvcore.systemapp: 3.1% user + 0.6% kernel / faults: 1038 minor
3.6% 356/surfaceflinger: 1.6% user + 1.9% kernel / faults: 376 minor
3.4% 12267/com.google.android.gms: 2.4% user + 1% kernel / faults: 2640 minor
3.2% 322/android.hardware.cas#1.2-service: 0.9% user + 2.3% kernel
2.9% 348/genieaudio-service: 1.1% user + 1.8% kernel
0.4% 537/media.codec: 0.2% user + 0.1% kernel / faults: 5486 minor
0.3% 945/org.dtvkit.inputsource: 0.2% user + 0% kernel / faults: 1342 minor
1.9% 207/ueventd: 1.9% user + 0% kernel
1.9% 2462/libAltiBrowser.so: 1.2% user + 0.6% kernel / faults: 219 minor
1.8% 874/com.droidlogic: 1.2% user + 0.5% kernel / faults: 1129 minor
1.6% 234/vdec-core: 0% user + 1.6% kernel
0.2% 520/media.extractor: 0.1% user + 0% kernel / faults: 2895 minor
1.5% 333/android.hardware.graphics.composer#2.4-service.droidlogic: 0.6% user + 0.9% kernel
1.5% 1728/com.ktpns.pa: 1.2% user + 0.2% kernel / faults: 931 minor
1.5% 3961/logcat: 0.5% user + 1% kernel
0.2% 992/com.android.se: 0.1% user + 0% kernel / faults: 874 minor
1.1% 9/ksoftirqd/0: 0% user + 1.1% kernel
0.1% 1698/com.kt.tvcore.customizer: 0.1% user + 0% kernel / faults: 872 minor
1% 162/crtc_commit: 0% user + 1% kernel
0.9% 28197/kworker/u8:4-events_unbound: 0% user + 0.9% kernel / faults: 11 minor
0.7% 362/dtvkitserver: 0.2% user + 0.5% kernel
0.7% 13214/com.kt.androidtv: 0.5% user + 0.2% kernel / faults: 122 minor
0.7% 24924/kworker/u8:2-adb: 0% user + 0.7% kernel / faults: 24 minor
0.6% 366/tvserver: 0.1% user + 0.5% kernel
0.5% 1446/sugov:0: 0% user + 0.5% kernel
0.5% 29414/kworker/1:1-events_freezable: 0% user + 0.5% kernel
0.3% 828/com.android.bluetooth: 0% user + 0.3% kernel / faults: 128 minor
0.2% 10/rcu_preempt: 0% user + 0.2% kernel
0.2% 16/ksoftirqd/1: 0% user + 0.2% kernel
0.2% 136/aml-ditest-0: 0% user + 0.2% kernel
0% 302/tombstoned: 0% user + 0% kernel
0.2% 304/es_out_task: 0% user + 0.2% kernel
0.2% 310/statsd: 0.1% user + 0.1% kernel / faults: 136 minor
0.2% 311/netd: 0.1% user + 0.1% kernel / faults: 52 minor
0.2% 447/irq/23-fe330000: 0% user + 0.2% kernel
0.2% 1569/com.android.providers.tv: 0.2% user + 0% kernel / faults: 38 minor
0.2% 26658/kworker/u9:1-mali_jd: 0% user + 0.2% kernel
0% 28324/kworker/u9:2-kbase_pm_poweroff_wait: 0% user + 0% kernel
0% 1/init: 0% user + 0% kernel
0.1% 21/ksoftirqd/2: 0% user + 0.1% kernel
0.1% 26/ksoftirqd/3: 0% user + 0.1% kernel
E/ActivityManager: 0.1% 280/jbd2/dm-11-8: 0% user + 0.1% kernel
0.1% 303/ts_out_task: 0% user + 0.1% kernel
0.1% 332/android.hardware.graphics.allocator#4.0-service: 0% user + 0.1% kernel / faults: 1 minor
0.1% 353/audioserver: 0% user + 0.1% kernel / faults: 55 minor
0.1% 2402/transport: 0.1% user + 0% kernel
0.1% 3768/com.kt.tvcore.sode: 0.1% user + 0% kernel
0.1% 4350/irq/19-fe330000: 0% user + 0.1% kernel
0.1% 28607/kworker/0:3-events: 0% user + 0.1% kernel
+0% 30008/kworker/1:2H: 0% user + 0% kernel
+0% 30070/logcat: 0% user + 0% kernel
+0% 30077/logcat: 0% user + 0% kernel
62% TOTAL: 35% user + 20% kernel + 0.1% iowait + 2.4% irq + 3.9% softirq
CPU usage from 36ms to 520ms later (2021-09-15 18:57:28.469 to 2021-09-15 18:57:28.953):
53% 693/system_server: 20% user + 33% kernel / faults: 450 minor
45% 29999/AnrConsumer: 15% user + 30% kernel
2.5% 1395/IpClient.eth0: 2.5% user + 0% kernel
55% 2013/com.kt.tvcore.core: 32% user + 23% kernel / faults: 37 minor
23% 4802/Binder:2013_9: 14% user + 8.7% kernel
20% 5400/Binder:2013_D: 11% user + 8.7% kernel
2.9% 2378/.kt.tvcore.core: 2.9% user + 0% kernel
2.9% 4537/Thread-114: 2.9% user + 0% kernel
2.9% 5403/Binder:2013_10: 2.9% user + 0% kernel
42% 29952/com.myapp.profindertest.debug: 23% user + 19% kernel / faults: 49 minor
42% 29952/v.otshome.debug: 23% user + 19% kernel
19% 10912/com.google.android.gms.persistent: 16% user + 3.2% kernel / faults: 1052 minor
16% 10927/HeapTaskDaemon: 12% user + 3.2% kernel
15% 4044/com.kt.gigagenie.voicerecognition: 12% user + 3.1% kernel / faults: 53 minor
12% 4349/Thread-39: 12% user + 0% kernel
16% 12267/com.google.android.gms: 13% user + 3.3% kernel / faults: 851 minor
19% 12281/HeapTaskDaemon: 16% user + 3.3% kernel
6.9% 319/android.hardware.audio.service-droidlogic: 4.6% user + 2.3% kernel / faults: 4 minor
2.3% 29868/audio_output_pa: 0% user + 2.3% kernel
7.6% 551/adbd: 2.5% user + 5% kernel
5% 551/adbd: 2.5% user + 2.5% kernel
2.5% 605/UsbFfs-worker: 0% user + 2.5% kernel
4.4% 217/logd: 0% user + 4.4% kernel
2.2% 226/logd.writer: 2.2% user + 0% kernel
2.2% 3966/logd.reader.per: 0% user + 2.2% kernel
4.5% 305/ktplayerd: 0% user + 4.5% kernel / faults: 20 minor
2.2% 16407/HwBinder:305_3: 0% user + 2.2% kernel
2% 16/ksoftirqd/1: 0% user + 2% kernel
2% 21/ksoftirqd/2: 0% user + 2% kernel
2.2% 234/vdec-core: 0% user + 2.2% kernel
2.3% 322/android.hardware.cas#1.2-service: 0% user + 2.3% kernel
2.3% 3246/HwBinder:322_1: 0% user + 2.3% kernel
2.4% 348/genieaudio-service: 0% user + 2.4% kernel
2.4% 348/genieaudio-serv: 0% user + 2.4% kernel
2.4% 4352/genieaudio-serv: 0% user + 2.4% kernel
2.4% 362/dtvkitserver: 0% user + 2.4% kernel
2.4% 476/dmx_data_thread: 0% user + 2.4% kernel
2.4% 366/tvserver: 2.4% user + 0% kernel
2.7% 1446/sugov:0: 0% user + 2.7% kernel
3.1% 3961/logcat: 3.1% user + 0% kernel
3.5% 24924/kworker/u8:2-adb: 0% user + 3.5% kernel
62% TOTAL: 30% user + 26% kernel + 2.1% irq + 4.3% softirq

Android Emulator not working ANR in com.google.android.gms

I have been testing all of my apps using a physical device so far because when I first started programming, I could not get the emulator to work. But now, I decided that it would be extremely beneficial for my work to get the emulator to work. I am using a basic hello world app in this post to eliminate any possibility of it being a result of error in my code. If someone could supply a fix to my issues that would be very much appreciated!
Here is the error message which is repeatedly outputted to Logcat:
2018-11-18 20:49:34.238 1409-1436/system_process E/ActivityManager:
ANR in com.google.android.gms
PID: 5881
Reason: executing service com.google.android.gms/.stats.service.DropBoxEntryAddedService
Load: 0.0 / 0.0 / 0.0
CPU usage from 48963ms to 0ms ago (2018-11-18 20:48:43.912 to 2018-11-18 20:49:32.876):
23% 1409/system_server: 12% user + 10% kernel / faults: 174 minor
8.8% 2630/com.google.process.gapps: 5.5% user + 3.3% kernel / faults: 503 minor
7.6% 905/adbd: 0.9% user + 6.7% kernel / faults: 273 minor
3.3% 3/ksoftirqd/0: 0% user + 3.3% kernel
3.2% 8/rcu_preempt: 0% user + 3.2% kernel
2.7% 5202/com.google.android.gms.persistent: 2.3% user + 0.3% kernel / faults: 195 minor
2.4% 2588/android.process.acore: 2.1% user + 0.2% kernel / faults: 33 minor
1.4% 5550/logcat: 0.4% user + 1% kernel
1.4% 2655/kworker/u2:0: 0% user + 1.4% kernel
1.4% 4157/kworker/u2:3: 0% user + 1.4% kernel
1% 866/logd: 0.2% user + 0.8% kernel / faults: 1 minor
1% 3425/com.android.systemui: 0.7% user + 0.2% kernel / faults: 14 minor
0.5% 3171/com.android.phone: 0.3% user + 0.2% kernel / faults: 7 minor
0.4% 5735/kworker/0:1: 0% user + 0.4% kernel
0.3% 904/surfaceflinger: 0.2% user + 0.1% kernel
0.3% 906/zygote64: 0.1% user + 0.1% kernel / faults: 160 minor
0.2% 1973/wpa_supplicant: 0% user + 0.2% kernel
0.2% 903/servicemanager: 0.1% user + 0% kernel
0.1% 843/jbd2/vdc-8: 0% user + 0.1% kernel
0% 911/installd: 0% user + 0% kernel / faults: 7 minor
0% 923/rild: 0% user + 0% kernel
0% 720/kworker/0:1H: 0% user + 0% kernel
0% 1102/hostapd: 0% user + 0% kernel
0% 902/lmkd: 0% user + 0% kernel
0% 4726/com.google.android.youtube: 0% user + 0% kernel
0% 928/fingerprintd: 0% user + 0% kernel
+0% 5881/com.google.android.gms: 0% user + 0% kernel
+0% 5895/dex2oat: 0% user + 0% kernel
100% TOTAL: 63% user + 35% kernel + 0.8% softirq
CPU usage from 4359216ms to 4359216ms ago (1970-01-01 01:00:00.000 to 1970-01-01 01:00:00.000) with 0% awake:
0% TOTAL: 0% user + 0% kernel
Edit
Upon closing the emulator & opening it again. I am getting very similar messages, but for different things.
e.g
1970-01-01 01:25:07.476 2750-2768/? E/ActivityThread: Failed to find provider info for com.google.android.voicesearch
1970-01-01 01:26:25.738 1409-1438/? E/libprocessgroup: failed to kill 1 processes for processgroup 2326
1970-01-01 01:26:34.089 1409-1436/? E/ActivityManager: ANR in com.android.launcher3:wallpaper_chooser
PID: 2920
Reason: executing service com.android.launcher3/.dynamicui.ColorExtractionService
Load: 0.0 / 0.0 / 0.0
CPU usage from 24202ms to 0ms ago (1970-01-01 01:26:03.716 to 1970-01-01 01:26:27.918):
43% 2794/zygote64: 39% user + 4.6% kernel / faults: 1630 minor 19 major
21% 1409/system_server: 14% user + 7.1% kernel / faults: 776 minor
3.9% 2920/com.android.launcher3:wallpaper_chooser: 1.3% user + 2.6% kernel / faults: 3392 minor
2.1% 905/adbd: 0.2% user + 1.9% kernel / faults: 176 minor
1.6% 8/rcu_preempt: 0% user + 1.6% kernel
1.4% 906/zygote64: 0.2% user + 1.1% kernel / faults: 320 minor
1.2% 868/debuggerd64: 0.2% user + 0.9% kernel / faults: 30 minor
0.7% 2630/com.google.process.gapps: 0.4% user + 0.2% kernel / faults: 12 minor
0.7% 2588/android.process.acore: 0.3% user + 0.3% kernel / faults: 58 minor
0.6% 2701/com.google.android.setupwizard: 0.1% user + 0.4% kernel / faults: 301 minor 1 major
0.4% 866/logd: 0.2% user + 0.2% kernel / faults: 10 minor
0.3% 843/jbd2/vdc-8: 0% user + 0.3% kernel
0.3% 867/debuggerd: 0% user + 0.3% kernel / faults: 92 minor
0.3% 238/kworker/0:1: 0% user + 0.3% kernel
0.2% 720/kworker/0:1H: 0% user + 0.2% kernel
0.2% 3/ksoftirqd/0: 0% user + 0.2% kernel
0% 2060/logcat: 0% user + 0% kernel
0.2% 2684/com.android.systemui: 0% user + 0.2% kernel
0.1% 746/kworker/u2:2: 0% user + 0.1% kernel
0% 2525/com.google.android.googlequicksearchbox:interactor: 0% user + 0% kernel / faults: 83 minor 1 major
0% 1980/com.android.inputmethod.latin: 0% user + 0% kernel
0% 910/drmserver: 0% user + 0% kernel / faults: 7 minor
0% 913/media.codec: 0% user + 0% kernel
0% 915/mediadrmserver: 0% user + 0% kernel / faults: 7 minor
0% 919/mediaserver: 0% user + 0% kernel
0% 1102/hostapd: 0% user + 0% kernel
0% 1973/wpa_supplicant: 0% user + 0% kernel
0% 2444/com.android.settings: 0% user + 0% kernel / faults: 9 minor
+0% 2944/cmd: 0% user + 0% kernel
+0% 2955/com.google.android.deskclock: 0% user + 0% kernel
+0% 2970/com.android.phone: 0% user + 0% kernel
100% TOTAL: 64% user + 35% kernel + 0.2% softirq
CPU usage from 1587917ms to 1587917ms ago (1970-01-01 01:00:00.000 to 1970-01-01 01:00:00.000) with 0% awake:
0% TOTAL: 0% user + 0% kernel
2018-11-18 19:53:48.371 1409-1439/? E/KernelCpuSpeedReader: Failed to read cpu-freq: /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state (No such file or directory)
2018-11-18 19:53:48.389 1409-1439/? E/KernelUidCpuTimeReader: Failed to read uid_cputime: /proc/uid_cputime/show_uid_stat (No such file or directory)
Thanks a lot in advance!
-Pi Net

Android things: How can I fix Doorbell example

Recently, I've got raspberry pi 3 and I'm trying to run android things doorbell project. I build it in Android studio 3.0 and i did everything that explained in android things doorbell project. but when i build the app to raspberry pi, it doesn't work. When I try debugging, it terminates after few time passes(i didn't touch everything).
This is the system process debugging log. what do i have to do?
08-16 08:03:13.434 412-426/system_process W/ActivityManager: Launch timeout has expired, giving up wake lock!
08-16 08:03:28.361 412-426/system_process W/ActivityManager: Timeout executing service: ServiceRecord{c4f101b u0 com.example.androidthings.doorbell/com.google.android.gms.measurement.AppMeasurementService}
--------- beginning of main
08-16 08:03:28.397 412-426/system_process I/Process: Sending signal. PID: 6135 SIG: 3
08-16 08:03:28.407 412-426/system_process I/Process: Sending signal. PID: 412 SIG: 3
08-16 08:03:28.407 412-417/system_process I/art: Thread[2,tid=417,WaitingInMainSignalCatcherLoop,Thread*=0xa9b0d000,peer=0x12c010d0,"Signal Catcher"]: reacting to signal 3
08-16 08:03:29.011 412-417/system_process I/art: Wrote stack traces to '/data/anr/traces.txt'
08-16 08:03:29.011 412-426/system_process I/Process: Sending signal. PID: 537 SIG: 3
08-16 08:03:29.903 412-426/system_process W/ProcessCpuTracker: Skipping unknown process pid 6351
08-16 08:03:30.473 412-426/system_process E/ActivityManager: ANR in com.example.androidthings.doorbell
PID: 6135
Reason: executing service com.example.androidthings.doorbell/com.google.android.gms.measurement.AppMeasurementService
Load: 0.63 / 0.31 / 0.32
CPU usage from 557691ms to 0ms ago (2017-08-16 07:54:10.671 to 2017-08-16 08:03:28.362):
3.4% 412/system_server: 2.5% user + 0.9% kernel / faults: 2730 minor
2.4% 152/adbd: 0.2% user + 2.1% kernel / faults: 44173 minor
1.1% 1213/perfd: 0.6% user + 0.4% kernel / faults: 186 minor
0.5% 6014/kworker/u8:1: 0% user + 0.5% kernel
0.5% 101/irq/92-mmc1: 0% user + 0.5% kernel
0.4% 6035/kworker/u8:2: 0% user + 0.4% kernel
0.3% 6024/kworker/u8:0: 0% user + 0.3% kernel
0.3% 652/com.google.android.gms.persistent: 0.3% user + 0% kernel / faults: 1669 minor
0.3% 150/surfaceflinger: 0.2% user + 0% kernel / faults: 1514 minor
0% 107/brcmf_wdog/mmc1: 0% user + 0% kernel
0% 520/wpa_supplicant: 0% user + 0% kernel
0% 7/rcu_preempt: 0% user + 0% kernel
0% 840/com.google.android.gms: 0% user + 0% kernel / faults: 88 minor
0% 3/ksoftirqd/0: 0% user + 0% kernel
0% 20/ksoftirqd/3: 0% user + 0% kernel
0% 8/rcu_sched: 0% user + 0% kernel
0% 127/logd: 0% user + 0% kernel / faults: 14 minor
0% 169/metrics_collector: 0% user + 0% kernel / faults: 19 minor
0% 620/com.android.iotlauncher: 0% user + 0% kernel / faults: 20 minor
0% 104/mmcqd/0: 0% user + 0% kernel
0% 149/servicemanager: 0% user + 0% kernel
0% 170/metricsd: 0% user + 0% kernel
0% 756/com.google.process.gapps: 0% user + 0% kernel / faults: 19 minor
0% 16/ksoftirqd/2: 0% user + 0% kernel
0% 148/lmkd: 0% user + 0% kernel
0% 5353/kworker/0:0: 0% user + 0% kernel
0% 12/ksoftirqd/1: 0% user + 0% kernel
0% 66/kworker/2:1: 0% user + 0% kernel
0% 121/jbd2/mmcblk0p15: 0% user + 0% kernel
0% 153/zygote: 0% user + 0% kernel / faults: 141 minor
0% 10/migration/0: 0% user + 0% kernel
0% 19/migration/3: 0% user + 0% kernel
0% 163/netd: 0% user + 0% kernel / faults: 40 minor
0% 166/sh: 0% user + 0% kernel / faults: 102 minor
0% 172/update_engine: 0% user + 0% kernel
0% 5981/kworker/1:2: 0% user + 0% kernel
+0% 6046/kworker/2:0: 0% user + 0% kernel
+0% 6048/kworker/3:1: 0% user + 0% kernel
+0% 6135/com.example.androidthings.doorbell: 0% user + 0% kernel
+0% 6219/logcat: 0% user + 0% kernel
+0% 6337/dumpsys: 0% user + 0% kernel
3.2% TOTAL: 1.6% user + 1.3% kernel + 0% iowait + 0.2% softirq
CPU usage from 1542ms to 2074ms later (2017-08-16 08:03:29.904 to 2017-08-16 08:03:30.436):
67% 412/system_server: 46% user + 20% kernel / faults: 3 minor
31% 680/Binder:412_5: 26% user + 5.6% kernel
28% 628/Binder:412_4: 18% user + 9.3% kernel
5.6% 426/ActivityManager: 0% user + 5.6% kernel
1.8% 716/Binder:412_6: 0% user + 1.8% kernel
5.1% 1213/perfd: 3.4% user + 1.7% kernel / faults: 6 minor
1.7% 1223/perfd: 1.7% user + 0% kernel
1.7% 1224/perfd: 1.7% user + 0% kernel
1.7% 6149/Studio:PollMem: 0% user + 1.7% kernel
3.7% 152/adbd: 1.8% user + 1.8% kernel / faults: 59 minor
1.8% 152/adbd: 0% user + 1.8% kernel
1.8% 1146/->host: 1.8% user + 0% kernel
1.8% 1147/<-host: 0% user + 1.8% kernel
1.7% 6014/kworker/u8:1: 0% user + 1.7% kernel
+0% 6358/dumpsys: 0% user + 0% kernel
26% TOTAL: 17% user + 9.1% kernel
08-16 08:03:30.476 412-427/system_process W/ActivityManager: Force finishing activity com.example.androidthings.doorbell/.DoorbellActivity
08-16 08:03:30.483 412-427/system_process I/ActivityManager: Killing 6135:com.example.androidthings.doorbell/u0a28 (adj 0): user request after error
08-16 08:03:30.564 412-5697/system_process D/ActivityManager: cleanUpApplicationRecord -- 6135
08-16 08:03:30.569 412-433/system_process I/WindowManager: Destroying surface Surface(name=Starting com.example.androidthings.doorbell) called by com.android.server.wm.WindowStateAnimator.destroySurface:2014 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:881 com.android.server.wm.WindowState.removeLocked:1449 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2478 com.android.server.wm.WindowManagerService.removeWindowLocked:2436 com.android.server.wm.WindowManagerService.removeWindowLocked:2305 com.android.server.wm.WindowManagerService.removeWindow:2300 com.android.server.wm.Session.remove:193
08-16 08:03:30.614 412-424/system_process W/InputMethodManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#79a2cdf attribute=null, token = android.os.BinderProxy#161884c
08-16 08:03:32.129 412-422/system_process I/art: Background partial concurrent mark sweep GC freed 26801(2MB) AllocSpace objects, 14(880KB) LOS objects, 33% free, 6MB/10MB, paused 2.427ms total 120.639ms
08-16 08:03:32.913 412-501/system_process I/ActivityManager: Force stopping com.example.androidthings.doorbell appid=10028 user=0: from pid 6365
08-16 08:03:34.067 412-479/system_process E/TaskPersister: File error accessing recents directory (directory doesn't exist?).

adobe air android Netconnection.close()

I have noticed in my adobe air app that I get intermitent crashes while trying to close my Netconnection. The app stops responding and eventually if you keep trying to do something it crashes. It is happening around 7 out of 10 times which is weird!
Has anyone encountered this or knows whats going on?
Here is a link to the full ANR Trace: http://pastebin.com/ut0eZRrU
Thanks, any help would be appreciated. This bug is preventing me from releasing my app!
I have seen a few discussions where people are saying they are experiencing similar issues however, they also say that it has been sorted in air 3.3. I havent seen any improvement....
Here is a summary of what im getting in logcat:
D/dalvikvm( 2019): GC_CONCURRENT freed 1943K, 21% free 24500K/30855K, paused 2ms+21ms
D/dalvikvm( 2019): GC_EXPLICIT freed 769K, 20% free 24737K/30855K, paused 2ms+20ms
E/ActivityManager( 2019): ANR in air.com.test.mobile.rbttest.debug (air.com.test.mobile.rbttest.debug/.AppEntry)
E/ActivityManager( 2019): Reason: keyDispatchingTimedOut
E/ActivityManager( 2019): Load: 0.59 / 0.72 / 0.59
E/ActivityManager( 2019): CPU usage from 18567ms to 3234ms ago:
E/ActivityManager( 2019): 80% 9424/air.com.test.mobile.rbttest.debug: 71% user + 8.7% kernel / faults: 1406 minor
**could it be something to do with the line above? Is this line saying that my cpu has spiked up to 80%? Its weird if it is, because it works fine if I dont close the net connection!!**
E/ActivityManager( 2019): 2% 2019/system_server: 1.1% user + 0.8% kernel / faults: 39 minor
E/ActivityManager( 2019): 1.8% 2120/com.android.systemui: 1.5% user + 0.2% kernel / faults: 5 minor
E/ActivityManager( 2019): 1.5% 1885/mediaserver: 1.2% user + 0.3% kernel / faults: 4 minor
E/ActivityManager( 2019): 0.7% 1882/surfaceflinger: 0.3% user + 0.3% kernel
E/ActivityManager( 2019): 0.3% 9564/kworker/0:2: 0% user + 0.3% kernel
E/ActivityManager( 2019): 0.2% 2206/dhd_dpc: 0% user + 0.2% kernel
E/ActivityManager( 2019): 0.1% 1890/adbd: 0% user + 0.1% kernel
E/ActivityManager( 2019): 0.1% 8196/com.eolwral.osmonitor: 0% user + 0.1% kernel / faults: 20 minor
E/ActivityManager( 2019): 0.1% 8697/kworker/u:0: 0% user + 0.1% kernel
E/ActivityManager( 2019): 0.1% 965/irq/356-mxt224_: 0% user + 0.1% kernel
E/ActivityManager( 2019): 0.1% 7358/kworker/0:3: 0% user + 0.1% kernel
E/ActivityManager( 2019): 0% 3/ksoftirqd/0: 0% user + 0% kernel
E/ActivityManager( 2019): 0% 1055/mmcqd/0: 0% user + 0% kernel
E/ActivityManager( 2019): 0% 1830/jbd2/mmcblk0p10: 0% user + 0% kernel
E/ActivityManager( 2019): 0% 1881/rild: 0% user + 0% kernel
E/ActivityManager( 2019): 0% 2202/dhd_watchdog: 0% user + 0% kernel
E/ActivityManager( 2019): 0% 2781/kworker/u:23: 0% user + 0% kernel
E/ActivityManager( 2019): 0% 8708/kworker/u:1: 0% user + 0% kernel
E/ActivityManager( 2019): 0% 8756/com.android.settings: 0% user + 0% kernel / faults: 31 minor
E/ActivityManager( 2019): 0% 8860/com.google.android.gallery3d: 0% user + 0% kernel / faults: 8 minor
E/ActivityManager( 2019): 0% 27078/com.antivirus: 0% user + 0% kernel
E/ActivityManager( 2019): 49% TOTAL: 43% user + 6.4% kernel + 0.2% iowait + 0% softirq
E/ActivityManager( 2019): CPU usage from 707ms to 1226ms later:
E/ActivityManager( 2019): 10% 2019/system_server: 1.8% user + 9% kernel / faults: 3 minor
E/ActivityManager( 2019): 9% 2077/InputDispatcher: 0% user + 9% kernel
E/ActivityManager( 2019): 4.9% 2120/com.android.systemui: 3.9% user + 0.9% kernel / faults: 1 minor
E/ActivityManager( 2019): 3.9% 2120/ndroid.systemui: 3.9% user + 0% kernel
E/ActivityManager( 2019): 6.8% 9424/air.com.test.mobile.rbttest.debug: 0% user + 6.8% kernel
E/ActivityManager( 2019): 6.8% 9464/e.rbttest.debug: 1.7% user + 5.1% kernel
E/ActivityManager( 2019): 1.2% 7358/kworker/0:3: 0% user + 1.2% kernel
E/ActivityManager( 2019): 7.7% TOTAL: 1.9% user + 5.8% kernel
W/ActivityManager( 2019): Force finishing activity air.com.test.mobile.rbttest.debug/.AppEntry
I/ActivityManager( 2019): Killing ProcessRecord{416f3410 9424:air.com.test.mobile.rbttest.debug/10075}: user's request
I/ActivityManager( 2019): Process air.com.test.mobile.rbttest.debug (pid 9424) has died.
I/WindowManager( 2019): WIN DEATH: Window{420baca0 SurfaceView paused=false}
I/WindowManager( 2019): WIN DEATH: Window{41f93898 air.com.test.mobile.rbttest.debug/air.com.test.mobile.rbttest.debug.A ppEntry paused=true}
UPDATE:
I have found that if the NetConnection is either closed via the fms server of via the publisher then it causes the android app to crash!
The release of adobe air 3.4 beta seems to have fixed this issue.

Android finding a deadlock

I am getting an ANR sometimes when I run my Android service. I suspect it is happening because of a deadlock.
Is there an easy way to monitor deadlock in Android or Eclipse. Such as a utility to show which thread hold which lock etc.?
And is there a way to figure out a deadlock by looking at traces.txt file?
My ddms log looks like this at the time of crash
02-15 18:09:01.046: INFO/Process(90): Sending signal. PID: 450 SIG: 3
02-15 18:09:01.046: INFO/dalvikvm(450): threadid=3: reacting to signal 3
02-15 18:09:01.056: INFO/dalvikvm(450): Wrote stack traces to '/data/anr/traces.txt'
02-15 18:09:01.076: INFO/Process(90): Sending signal. PID: 10548 SIG: 9
02-15 18:09:01.076: ERROR/ActivityManager(90): ANR in com.abc.cm.core
02-15 18:09:01.076: ERROR/ActivityManager(90): Reason: Executing service com.abc.cm.core/.WorkOrderManager
02-15 18:09:01.076: ERROR/ActivityManager(90): Load: 1.46 / 1.16 / 1.05
02-15 18:09:01.076: ERROR/ActivityManager(90): CPU usage from 19462ms to 1067ms ago:
02-15 18:09:01.076: ERROR/ActivityManager(90): abc.cm.core: 13% = 12% user + 1% kernel / faults: 1360 minor
02-15 18:09:01.076: ERROR/ActivityManager(90): mmcqd: 4% = 0% user + 4% kernel
02-15 18:09:01.076: ERROR/ActivityManager(90): system_server: 3% = 2% user + 1% kernel / faults: 473 minor
02-15 18:09:01.076: ERROR/ActivityManager(90): zygote: 2% = 2% user + 0% kernel / faults: 90 minor
02-15 18:09:01.076: ERROR/ActivityManager(90): adbd: 1% = 0% user + 1% kernel / faults: 1042 minor
02-15 18:09:01.076: ERROR/ActivityManager(90): m.abc.unten: 0% = 0% user + 0% kernel / faults: 203 minor
02-15 18:09:01.076: ERROR/ActivityManager(90): ndroid.launcher: 0% = 0% user + 0% kernel / faults: 802 minor
02-15 18:09:01.076: ERROR/ActivityManager(90): droid.wallpaper: 0% = 0% user + 0% kernel / faults: 109 minor
02-15 18:09:01.076: ERROR/ActivityManager(90): ndroid.settings: 0% = 0% user + 0% kernel / faults: 44 minor
02-15 18:09:01.076: ERROR/ActivityManager(90): dhd_dpc: 0% = 0% user + 0% kernel
02-15 18:09:01.076: ERROR/ActivityManager(90): events/0: 0% = 0% user + 0% kernel
02-15 18:09:01.076: ERROR/ActivityManager(90): logcat: 0% = 0% user + 0% kernel
02-15 18:09:01.076: ERROR/ActivityManager(90): +andisk.api.test: 0% = 0% user + 0% kernel
02-15 18:09:01.076: ERROR/ActivityManager(90): +iTestFwService1: 0% = 0% user + 0% kernel
02-15 18:09:01.076: ERROR/ActivityManager(90): +sh: 0% = 0% user + 0% kernel
02-15 18:09:01.076: ERROR/ActivityManager(90): TOTAL: 40% = 23% user + 16% kernel + 0% iowait + 0% softirq
02-15 18:09:01.096: INFO/ActivityManager(90): Process com.abc.cm.core (pid 10548) has died.
fixing deadlocks on any platform is hard. the only way I know on android is to add some logging (eg using Log.d) before and after each lock/unlock/otherExpensiveFunctions

Categories

Resources