1

在为 Android 编译的 Adob​​e AIR 应用程序中,我收到 ANR 错误,原因为 keyDispatchingTimedOut。工作流程如下:

  1. 正在播放声音,正在播放嵌入的 SWF。
  2. 用户按下按钮 - 声音/SWF 停止播放
  3. 应用程序等待 3 秒
  4. 应用程序对服务器进行一些异步调用
  5. 应用程序处理结果,并将新视图推送到视图堆栈。
  6. 出现新视图
  7. 5-10% 的时间,几秒钟后,ANR 发生。

错误报告中的任何内容都没有真正突出。任何帮助将不胜感激。这真让我抓狂!

我附上了 ANR 错误报告:

DALVIK THREADS:
(mutexes: tll=0 tsl=0 tscl=0 ghl=0)

"main" prio=5 tid=1 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x41b0d508 self=0x41afd9b0
| sysTid=17654 nice=0 sched=0/0 cgrp=apps handle=1074835248
| schedstat=( 571788091723 150929552253 787606 ) utm=48332 stm=8846 core=1
#00 pc 0000dca0 /system/lib/libc.so (__futex_syscall3+8)
#01 pc 00012e44 /system/lib/libc.so (__pthread_cond_timedwait_relative+48)
#02 pc 00012ea0 /system/lib/libc.so (__pthread_cond_timedwait+60)
#03 pc 00012f38 /system/lib/libc.so (pthread_join+108)
#04 pc 001ec1ef /data/data/air.com.gameonint.matchpoint/lib/libCore.so
at com.adobe.air.customHandler.callTimeoutFunction(Native Method)
at com.adobe.air.customHandler.handleMessage(customHandler.java:22)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4921)
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:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)

"Thread-3379" prio=5 tid=28 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x426bacf0 self=0x5619f470
| sysTid=21744 nice=-16 sched=0/0 cgrp=apps handle=1473838456
| schedstat=( 1340618900 149930103 2445 ) utm=119 stm=14 core=1
#00 pc 0000dca0 /system/lib/libc.so (__futex_syscall3+8)
#01 pc 00012204 /system/lib/libc.so
#02 pc 0014e913 /data/data/air.com.gameonint.matchpoint/lib/libCore.so
#03 pc 00135075 /data/data/air.com.gameonint.matchpoint/lib/libCore.so
#04 pc 001bf4a5 /data/data/air.com.gameonint.matchpoint/lib/libCore.so
at dalvik.system.NativeStart.run(Native Method)

"AudioTrack" prio=10 tid=26 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x426bac00 self=0x5630d198
| sysTid=21743 nice=-16 sched=0/0 cgrp=apps handle=1473486696
| schedstat=( 835445145 754790225 27458 ) utm=32 stm=51 core=0
#00 pc 0000d320 /system/lib/libc.so (nanosleep+12)
#01 pc 0001a9cb /system/lib/libc.so (usleep+30)
#02 pc 0004364f /system/lib/libmedia.so (android::AudioTrack::processAudioBuffer(android::sp<android::AudioTrack::AudioTrackThread> const&)+402)
#03 pc 0004370b /system/lib/libmedia.so (android::AudioTrack::AudioTrackThread::threadLoop()+70)
#04 pc 0001103b /system/lib/libutils.so (android::Thread::_threadLoop(void*)+94)
#05 pc 0004bb5b /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+66)
#06 pc 00010bb5 /system/lib/libutils.so
#07 pc 00012e00 /system/lib/libc.so (__thread_entry+48)
#08 pc 00012558 /system/lib/libc.so (pthread_create+172)
at dalvik.system.NativeStart.run(Native Method)

"Binder_4" prio=5 tid=27 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x424d0290 self=0x57549818
| sysTid=18326 nice=0 sched=0/0 cgrp=apps handle=1458138408
| schedstat=( 15464300 14467273284 378 ) utm=0 stm=1 core=1
#00 pc 0000cb90 /system/lib/libc.so (__ioctl+8)
#01 pc 00027fcd /system/lib/libc.so (ioctl+16)
#02 pc 00016bfd /system/lib/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+124)
#03 pc 000173af /system/lib/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+154)
#04 pc 0001b171 /system/lib/libbinder.so
#05 pc 0001104f /system/lib/libutils.so (android::Thread::_threadLoop(void*)+114)
#06 pc 0004bb5b /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+66)
#07 pc 00010bb5 /system/lib/libutils.so
#08 pc 00012e00 /system/lib/libc.so (__thread_entry+48)
#09 pc 00012558 /system/lib/libc.so (pthread_create+172)
at dalvik.system.NativeStart.run(Native Method)

"Binder_3" prio=5 tid=25 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x42679b00 self=0x53867d40
| sysTid=18156 nice=0 sched=0/0 cgrp=apps handle=1469136080
| schedstat=( 15274994 16984359588 428 ) utm=0 stm=1 core=0
#00 pc 0000cb90 /system/lib/libc.so (__ioctl+8)
#01 pc 00027fcd /system/lib/libc.so (ioctl+16)
#02 pc 00016bfd /system/lib/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+124)
#03 pc 000173af /system/lib/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+154)
#04 pc 0001b171 /system/lib/libbinder.so
#05 pc 0001104f /system/lib/libutils.so (android::Thread::_threadLoop(void*)+114)
#06 pc 0004bb5b /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+66)
#07 pc 00010bb5 /system/lib/libutils.so
#08 pc 00012e00 /system/lib/libc.so (__thread_entry+48)
#09 pc 00012558 /system/lib/libc.so (pthread_create+172)
at dalvik.system.NativeStart.run(Native Method)

"Thread-3133" prio=5 tid=19 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x4269cfd0 self=0x57f06bd0
| sysTid=17765 nice=0 sched=0/0 cgrp=apps handle=1457713968
| schedstat=( 229101702 17702911370 2605 ) utm=12 stm=10 core=0
#00 pc 0000da70 /system/lib/libc.so (epoll_wait+12)
#01 pc 00137079 /system/lib/libchromium_net.so
#02 pc 00136e6d /system/lib/libchromium_net.so
#03 pc 0005b0d1 /system/lib/libchromium_net.so
#04 pc 000597cf /system/lib/libchromium_net.so (MessageLoop::RunInternal()+114)
#05 pc 0005982d /system/lib/libchromium_net.so (MessageLoop::Run()+16)
#06 pc 00079ef1 /system/lib/libchromium_net.so (base::Thread::ThreadMain()+188)
#07 pc 0007997b /system/lib/libchromium_net.so
#08 pc 00012e00 /system/lib/libc.so (__thread_entry+48)
#09 pc 00012558 /system/lib/libc.so (pthread_create+172)
at dalvik.system.NativeStart.run(Native Method)

"AsyncTask #3" prio=5 tid=32 WAIT
| group="main" sCount=1 dsCount=0 obj=0x426b3e70 self=0x56e7ffa8
| sysTid=17763 nice=10 sched=0/0 cgrp=apps/bg_non_interactive handle=1458082608
| schedstat=( 10809752 19933622338 363 ) utm=0 stm=0 core=1
at java.lang.Object.wait(Native Method)
- waiting on <0x426b3f90> (a java.lang.VMThread) held by tid=32 (AsyncTask #3)
at java.lang.Thread.parkFor(Thread.java:1231)
at sun.misc.Unsafe.park(Unsafe.java:323)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:413)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1009)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1069)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
at java.lang.Thread.run(Thread.java:856)

"CookieSyncManager" prio=5 tid=31 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x4255f6b0 self=0x56e98d30
| sysTid=17758 nice=10 sched=0/0 cgrp=apps/bg_non_interactive handle=1457721768
| schedstat=( 15950658 20119845013 333 ) utm=0 stm=1 core=1
#00 pc 0000da70 /system/lib/libc.so (epoll_wait+12)
#01 pc 00014899 /system/lib/libutils.so (android::Looper::pollInner(int)+96)
#02 pc 00014b01 /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+104)
#03 pc 000634fb /system/lib/libandroid_runtime.so (android::NativeMessageQueue::pollOnce(_JNIEnv*, int)+22)
#04 pc 0001df30 /system/lib/libdvm.so (dvmPlatformInvoke+112)
#05 pc 0004d183 /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+394)
#06 pc 00027360 /system/lib/libdvm.so
#07 pc 0002bc68 /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+180)
#08 pc 0005f8f1 /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+272)
#09 pc 0005f91b /system/lib/libdvm.so (dvmCallMethod(Thread*, Method const*, Object*, JValue*, ...)+20)
#10 pc 000544d3 /system/lib/libdvm.so
#11 pc 00012e00 /system/lib/libc.so (__thread_entry+48)
#12 pc 00012558 /system/lib/libc.so (pthread_create+172)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:125)
at android.os.Looper.loop(Looper.java:124)
at android.webkit.WebSyncManager.run(WebSyncManager.java:92)
at android.webkit.CookieSyncManager.run(CookieSyncManager.java:58)
at java.lang.Thread.run(Thread.java:856)

"WebViewCoreThread" prio=5 tid=30 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x42684de8 self=0x56e3c548
| sysTid=17756 nice=0 sched=0/0 cgrp=apps handle=1458078976
| schedstat=( 1364349593 17478104614 14927 ) utm=109 stm=26 core=0
#00 pc 0000da70 /system/lib/libc.so (epoll_wait+12)
#01 pc 00014899 /system/lib/libutils.so (android::Looper::pollInner(int)+96)
#02 pc 00014b01 /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+104)
#03 pc 000634fb /system/lib/libandroid_runtime.so (android::NativeMessageQueue::pollOnce(_JNIEnv*, int)+22)
#04 pc 0001df30 /system/lib/libdvm.so (dvmPlatformInvoke+112)
#05 pc 0004d183 /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+394)
#06 pc 00000214 /dev/ashmem/dalvik-jit-code-cache (deleted)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:125)
at android.os.Looper.loop(Looper.java:124)
at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:1067)
at java.lang.Thread.run(Thread.java:856)

"AsyncTask #2" prio=5 tid=24 WAIT
| group="main" sCount=1 dsCount=0 obj=0x426783d8 self=0x57331568
| sysTid=17722 nice=10 sched=0/0 cgrp=apps/bg_non_interactive handle=1444187536
| schedstat=( 111962004 20480411385 9839 ) utm=4 stm=7 core=1
at java.lang.Object.wait(Native Method)
- waiting on <0x426784f8> (a java.lang.VMThread) held by tid=24 (AsyncTask #2)
at java.lang.Thread.parkFor(Thread.java:1231)
at sun.misc.Unsafe.park(Unsafe.java:323)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.ja...
4

0 回答 0