My apk has an activity which may send an intent to open another activity of my co-worker's apk. When I manually switch these two activities between these two apks about 50 rounds, ANR shows.
====================================================== The logs are attached below: 05-12 09:57:23.181 I/ActivityManager( 1379): ANR in process: com.test.apk (last in com.test.apk) 05-12 09:57:23.181 I/ActivityManager( 1379): Annotation: keyDispatchingTimedOut 05-12 09:57:23.181 I/ActivityManager( 1379): CPU usage: 05-12 09:57:23.181 I/ActivityManager( 1379): Load: 5.29 / 5.09 / 3.22 05-12 09:57:23.181 I/ActivityManager( 1379): CPU usage from 7600ms to 97ms ago: 05-12 09:57:23.181 I/ActivityManager( 1379): system_server: 11% = 8% user + 3% kernel / faults: 119 minor 4 major 05-12 09:57:23.181 I/ActivityManager( 1379): testprocess0: 4% = 0% user + 3% kernel / faults: 8 minor 05-12 09:57:23.181 I/ActivityManager( 1379): android.process.acore: 1% = 1% user + 0% kernel / faults: 61 minor 05-12 09:57:23.181 I/ActivityManager( 1379): testprocess1: 0% = 0% user + 0% kernel 05-12 09:57:23.181 I/ActivityManager( 1379): testprocess7: 0% = 0% user + 0% kernel 05-12 09:57:23.181 I/ActivityManager( 1379): com.test.apk: 0% = 0% user + 0% kernel / faults: 79 minor 05-12 09:57:23.181 I/ActivityManager( 1379): testprocess9: 0% = 0% user + 0% kernel 05-12 09:57:23.181 I/ActivityManager( 1379): logcat: 0% = 0% user + 0% kernel 05-12 09:57:23.181 I/ActivityManager( 1379): testprocess8: 0% = 0% user + 0% kernel 05-12 09:57:23.181 I/ActivityManager( 1379): testprocess2: 0% = 0% user + 0% kernel / faults: 9 minor 05-12 09:57:23.181 I/ActivityManager( 1379): testprocess3: 0% = 0% user + 0% kernel 05-12 09:57:23.181 I/ActivityManager( 1379): testprocess4: 0% = 0% user + 0% kernel / faults: 27 minor 05-12 09:57:23.181 I/ActivityManager( 1379): testprocess5: 0% = 0% user + 0% kernel / faults: 2 minor 05-12 09:57:23.181 I/ActivityManager( 1379): testprocess6: 0% = 0% user + 0% kernel 05-12 09:57:23.181 I/ActivityManager( 1379): +sleep: 0% = 0% user + 0% kernel 05-12 09:57:23.181 I/ActivityManager( 1379): +sleep: 0% = 0% user + 0% kernel 05-12 09:57:23.181 I/ActivityManager( 1379): TOTAL: 22% = 11% user + 10% kernel + 0% iowait 05-12 09:57:23.191 I/ActivityManager( 1379): Removing old ANR trace file from /data/anr/traces.txt 05-12 09:57:23.201 I/Process ( 1379): Sending signal. PID: 1687 SIG: 3 05-12 09:57:23.201 I/dalvikvm( 1687): threadid=7: reacting to signal 3 05-12 09:57:23.291 I/dalvikvm( 1687): Wrote stack trace to '/data/anr/ traces.txt' 05-12 09:57:23.411 D/dalvikvm( 3120): GC freed 3128 objects / 177704 bytes in 202ms ====================================================== And the /data/anr/traces.txt shows: ----- pid 1687 at 2010-05-12 09:57:23 ----- Cmd line: com.test.apk DALVIK THREADS: "main" prio=5 tid=3 WAIT | group="main" sCount=1 dsCount=0 s=N obj=0x2aac9f60 self=0xbe10 | sysTid=1687 nice=0 sched=0/0 handle=1877228572 at java.lang.Object.wait(Native Method) - waiting on <0x114d38> (a android.os.MessageQueue) at java.lang.Object.wait(Object.java:288) at android.os.MessageQueue.next(MessageQueue.java:148) at android.os.Looper.loop(Looper.java:110) at android.app.ActivityThread.main(ActivityThread.java:4226) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:793) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at dalvik.system.NativeStart.main(Native Method) ====================================================== The logs show that there's a keyDispatchingTimedOut. But the system seems not busy. I've checked out that the main thread of my activity was not running a lengthy task when ANR appeared. Is there someone knowing what this problem is? Thanks. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

