Repository navigation
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: productionIssues experienced in live production appsIssues experienced in live production appsc: fatal crashCrashes that terminate the processCrashes that terminate the processengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-androidAndroid applications specificallyAndroid applications specificallyteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Description
I keep getting this ANR on my Android app.
Input dispatching timed out (Waiting to send non-key event because the touched window has not finished processing certain input events that were delivered to it over 500.0ms ago. Wait queue length: 60. Wait queue head age: 20510.8ms.)
"main" prio=5 tid=1 Native
#00 pc 000000000001900c /system/lib/libc.so (syscall+28)
#00 pc 00000000000b6e91 /system/lib/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+80)
#00 pc 0000000000281279 /system/lib/libart.so (art::JNI::CallObjectMethod(_JNIEnv*, _jobject*, _jmethodID*, ...)+348)
#00 pc 000000000009438b /system/lib/libandroid_runtime.so (android::NativeInputEventReceiver::consumeEvents(_JNIEnv*, bool, long long, bool*)+318)
#00 pc 000000000009411b /system/lib/libandroid_runtime.so (android::NativeInputEventReceiver::handleEvent(int, int, void*)+90)
#00 pc 00000000000101f1 /system/lib/libutils.so (android::Looper::pollInner(int)+572)
#00 pc 000000000000ff1d /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+32)
#00 pc 00000000000ace21 /system/lib/libandroid_runtime.so (android::NativeMessageQueue::pollOnce(_JNIEnv*, _jobject*, int)+24)
#00 pc 00000000000b9ffd /system/framework/arm/boot-framework.oat (Java_android_os_MessageQueue_nativePollOnce__JI+92)
at android.os.MessageQueue.nativePollOnce (MessageQueue.java)
at android.os.MessageQueue.next (MessageQueue.java:325)
at android.os.Looper.loop (Looper.java:142)
at android.app.ActivityThread.main (ActivityThread.java:6543)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:440)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:810)
"Jit thread pool worker thread 0" daemon prio=5 tid=2 Native
#00 pc 000000000001900c /system/lib/libc.so (syscall+28)
#00 pc 00000000000b6e91 /system/lib/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+80)
#00 pc 000000000038e74d /system/lib/libart.so (art::ThreadPool::GetTask(art::Thread*)+172)
#00 pc 000000000038e0cf /system/lib/libart.so (art::ThreadPoolWorker::Run()+62)
#00 pc 000000000038dced /system/lib/libart.so (art::ThreadPoolWorker::Callback(void*)+92)
#00 pc 00000000000479df /system/lib/libc.so (__pthread_start(void*)+22)
#00 pc 000000000001b2dd /system/lib/libc.so (__start_thread+32)
"FinalizerWatchdogDaemon" daemon prio=5 tid=4 Waiting
at java.lang.Object.wait (Native method)
at java.lang.Daemons$FinalizerWatchdogDaemon.sleepUntilNeeded (Daemons.java:297)
at java.lang.Daemons$FinalizerWatchdogDaemon.runInternal (Daemons.java:277)
at java.lang.Daemons$Daemon.run (Daemons.java:103)
at java.lang.Thread.run (Thread.java:764)
"ReferenceQueueDaemon" daemon prio=5 tid=6 Waiting
at java.lang.Object.wait (Native method)
at java.lang.Daemons$ReferenceQueueDaemon.runInternal (Daemons.java:178)
at java.lang.Daemons$Daemon.run (Daemons.java:103)
at java.lang.Thread.run (Thread.java:764)
"FinalizerDaemon" daemon prio=5 tid=7 Waiting
at java.lang.Object.wait (Native method)
at java.lang.Object.wait (Object.java:422)
at java.lang.ref.ReferenceQueue.remove (ReferenceQueue.java:188)
at java.lang.ref.ReferenceQueue.remove (ReferenceQueue.java:209)
at java.lang.Daemons$FinalizerDaemon.runInternal (Daemons.java:232)
at java.lang.Daemons$Daemon.run (Daemons.java:103)
at java.lang.Thread.run (Thread.java:764)
"Binder:32213_1" prio=5 tid=8 Native
#00 pc 0000000000049090 /system/lib/libc.so (__ioctl+8)
#00 pc 000000000001e111 /system/lib/libc.so (ioctl+32)
#00 pc 000000000004242d /system/lib/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+168)
#00 pc 0000000000042525 /system/lib/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+8)
#00 pc 0000000000042a67 /system/lib/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+38)
#00 pc 0000000000057a95 /system/lib/libbinder.so (???)
#00 pc 000000000000d1c9 /system/lib/libutils.so (android::Thread::_threadLoop(void*)+144)
#00 pc 0000000000068f89 /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+80)
#00 pc 00000000000479df /system/lib/libc.so (__pthread_start(void*)+22)
#00 pc 000000000001b2dd /system/lib/libc.so (__start_thread+32)
"Binder:32213_2" prio=5 tid=9 Native
#00 pc 0000000000049090 /system/lib/libc.so (__ioctl+8)
#00 pc 000000000001e111 /system/lib/libc.so (ioctl+32)
#00 pc 000000000004242d /system/lib/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+168)
#00 pc 0000000000042525 /system/lib/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+8)
#00 pc 0000000000042a67 /system/lib/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+38)
#00 pc 0000000000057a95 /system/lib/libbinder.so (???)
#00 pc 000000000000d1c9 /system/lib/libutils.so (android::Thread::_threadLoop(void*)+144)
#00 pc 0000000000068f89 /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+80)
#00 pc 00000000000479df /system/lib/libc.so (__pthread_start(void*)+22)
#00 pc 000000000001b2dd /system/lib/libc.so (__start_thread+32)
"Binder:32213_3" prio=5 tid=10 Native
#00 pc 0000000000049090 /system/lib/libc.so (__ioctl+8)
#00 pc 000000000001e111 /system/lib/libc.so (ioctl+32)
#00 pc 000000000004242d /system/lib/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+168)
#00 pc 0000000000042525 /system/lib/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+8)
#00 pc 0000000000042a67 /system/lib/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+38)
#00 pc 0000000000057a95 /system/lib/libbinder.so (???)
#00 pc 000000000000d1c9 /system/lib/libutils.so (android::Thread::_threadLoop(void*)+144)
#00 pc 0000000000068f89 /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+80)
#00 pc 00000000000479df /system/lib/libc.so (__pthread_start(void*)+22)
#00 pc 000000000001b2dd /system/lib/libc.so (__start_thread+32)
"Profile Saver" daemon prio=5 tid=11 Native
#00 pc 000000000001900c /system/lib/libc.so (syscall+28)
#00 pc 00000000000b6e91 /system/lib/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+80)
#00 pc 000000000027546f /system/lib/libart.so (art::ProfileSaver::Run()+342)
#00 pc 000000000027773b /system/lib/libart.so (art::ProfileSaver::RunProfileSaverThread(void*)+50)
#00 pc 00000000000479df /system/lib/libc.so (__pthread_start(void*)+22)
#00 pc 000000000001b2dd /system/lib/libc.so (__start_thread+32)
"RenderThread" prio=5 tid=14 Native
#00 pc 0000000000048f54 /system/lib/libc.so (__epoll_pwait+20)
#00 pc 000000000001b6ed /system/lib/libc.so (epoll_pwait+60)
#00 pc 000000000001b71d /system/lib/libc.so (epoll_wait+12)
#00 pc 000000000001002d /system/lib/libutils.so (android::Looper::pollInner(int)+120)
#00 pc 000000000000ff1d /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+32)
#00 pc 00000000000511f9 /system/lib/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+424)
#00 pc 000000000000d1c9 /system/lib/libutils.so (android::Thread::_threadLoop(void*)+144)
#00 pc 0000000000068f89 /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+80)
#00 pc 00000000000479df /system/lib/libc.so (__pthread_start(void*)+22)
#00 pc 000000000001b2dd /system/lib/libc.so (__start_thread+32)
"hwuiTask1" prio=5 tid=15 Native
#00 pc 000000000001900c /system/lib/libc.so (syscall+28)
#00 pc 000000000004737b /system/lib/libc.so (__pthread_cond_timedwait(pthread_cond_internal_t*, pthread_mutex_t*, bool, timespec const*)+102)
#00 pc 0000000000052d27 /system/lib/libhwui.so (???)
#00 pc 0000000000052c9d /system/lib/libhwui.so (???)
#00 pc 000000000000d24b /system/lib/libutils.so (android::Thread::_threadLoop(void*)+274)
#00 pc 0000000000068f89 /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+80)
#00 pc 00000000000479df /system/lib/libc.so (__pthread_start(void*)+22)
#00 pc 000000000001b2dd /system/lib/libc.so (__start_thread+32)
"Sqflite" prio=5 tid=18 Native
#00 pc 0000000000048f54 /system/lib/libc.so (__epoll_pwait+20)
#00 pc 000000000001b6ed /system/lib/libc.so (epoll_pwait+60)
#00 pc 000000000001b71d /system/lib/libc.so (epoll_wait+12)
#00 pc 000000000001002d /system/lib/libutils.so (android::Looper::pollInner(int)+120)
#00 pc 000000000000ff1d /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+32)
#00 pc 00000000000ace21 /system/lib/libandroid_runtime.so (android::NativeMessageQueue::pollOnce(_JNIEnv*, _jobject*, int)+24)
#00 pc 00000000000b9ffd /system/framework/arm/boot-framework.oat (Java_android_os_MessageQueue_nativePollOnce__JI+92)
at android.os.MessageQueue.nativePollOnce (Native method)
at android.os.MessageQueue.next (MessageQueue.java:325)
at android.os.Looper.loop (Looper.java:142)
at android.os.HandlerThread.run (HandlerThread.java:65)
"1.ui" prio=5 (not attached)
"1.raster" prio=5 (not attached)
"1.io" prio=5 (not attached)
"eel.arabicbible" prio=5 (not attached)
"eel.arabicbible" prio=5 (not attached)
"eel.arabicbible" prio=5 (not attached)
"eel.arabicbible" prio=5 (not attached)
"eel.arabicbible" prio=5 (not attached)
"GL updater" prio=5 (not attached)
"GL updater" prio=5 (not attached)
"RenderThread" prio=5 (not attached)
"DartWorker" prio=5 (not attached)
"Signal Catcher" daemon prio=5 tid=3 Runnable
#00 pc 00000000002e765b /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, int, BacktraceMap*, char const*, art::ArtMethod*, void*)+130)
#00 pc 0000000000378329 /system/lib/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool, BacktraceMap*, bool) const+204)
#00 pc 0000000000374a5f /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool, BacktraceMap*, bool) const+34)
#00 pc 000000000038c943 /system/lib/libart.so (art::DumpCheckpoint::Run(art::Thread*)+698)
#00 pc 0000000000385f1d /system/lib/libart.so (art::ThreadList::RunCheckpoint(art::Closure*, art::Closure*)+324)
#00 pc 0000000000385a13 /system/lib/libart.so (art::ThreadList::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool)+530)
#00 pc 0000000000385733 /system/lib/libart.so (art::ThreadList::DumpForSigQuit(std::__1::basic_ostream<char, std::__1::char_traits<char>>&)+626)
#00 pc 00000000003635d3 /system/lib/libart.so (art::Runtime::DumpForSigQuit(std::__1::basic_ostream<char, std::__1::char_traits<char>>&)+122)
#00 pc 000000000036a6bf /system/lib/libart.so (art::SignalCatcher::HandleSigQuit()+1282)
#00 pc 0000000000369691 /system/lib/libart.so (art::SignalCatcher::Run(void*)+268)
#00 pc 00000000000479df /system/lib/libc.so (__pthread_start(void*)+22)
#00 pc 000000000001b2dd /system/lib/libc.so (__start_thread+32)
"HeapTaskDaemon" daemon prio=5 tid=5 Blocked
#00 pc 000000000001900c /system/lib/libc.so (syscall+28)
#00 pc 00000000000b6e91 /system/lib/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+80)
#00 pc 00000000001caa57 /system/lib/libart.so (art::gc::TaskProcessor::GetTask(art::Thread*)+278)
#00 pc 00000000001cb021 /system/lib/libart.so (art::gc::TaskProcessor::RunAllTasks(art::Thread*)+44)
#00 pc 000000000005504b /system/framework/arm/boot-core-libart.oat (Java_dalvik_system_VMRuntime_runHeapTasks__+74)
at dalvik.system.VMRuntime.runHeapTasks (Native method)
at java.lang.Daemons$HeapTaskDaemon.runInternal (Daemons.java:461)
at java.lang.Daemons$Daemon.run (Daemons.java:103)
at java.lang.Thread.run (Thread.java:764)
Reacted by triallax, ominiverdi, ubitechdevelopers, YukiOya, Hiroshi Kikuchi, Rustem Kakimov, Kumpatla Satish, El, Pablo Jiménez Pascual, Josip Krnjic and 5 more
Reacted by hieudz and Tijani Rijal Fadhilah
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: productionIssues experienced in live production appsIssues experienced in live production appsc: fatal crashCrashes that terminate the processCrashes that terminate the processengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-androidAndroid applications specificallyAndroid applications specificallyteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Activity
iapicca commentedon Nov 8, 2020
@nicknma
can you provide your
flutter doctor -v,your
pubspec.yamland your
flutter run -v(orflutter run --release -v)if you are experiencing this issue in production the list of affected devices would be useful
nicknma commentedon Nov 8, 2020
Flutter doctor
iapicca commentedon Nov 9, 2020
@nicknma
[ +127 ms] No supported devices connected.your app won't run without a device attached
it's hard to tell if the issue depends from flutter since there are 3rd party plugins and packages
I'd bet on wakelock since it uses native components
(as you can see from the java errors in your logs) and you are using an obsolete version.
regardless the validity of this issue I'd definitely update all the dependencies
especially the aforementioned
darshankawar commentedon Nov 9, 2020
@nicknma
As @iapicca mentioned, please try by removing the relevant 3rd party plugin code and see if you still encounter same error. If so, provide a minimal complete reproducible code sample that we can copy paste and run in IDE that will possibly show the error.
Thanks.
nicknma commentedon Nov 9, 2020
That's the problem, I am not able to reproduce this problem locally, I only see the crashes on the Console in prod. I will try what you suggested. Thank you.
nicknma commentedon Nov 11, 2020
I removed the wakelock package and implemented my own MethodChannel to native code to keep the device awake. I am still getting this ANR which I can not reproduce locally.
This is the Kotlin method that ultimately gets called from Flutter
darshankawar commentedon Nov 12, 2020
@nicknma
Can you provide project repo link that we can clone and run to see if we can replicate it ?
Thanks.
nicknma commentedon Nov 13, 2020
Unfortunately I can't. First it is on a private git server and second a lot of the text content is copy righted so I can't intentionally make it public by sharing it. I might be able to strip out all the copy righted info and share with you but I can't just share it publicly. Also, I found this, not sure it it helps, but it is related to the same issue. Looks like the problem is caused by NDK event queuing which I am assuming is used in the Flutter engine. http://ps3computing.blogspot.com/2012/12/anr-application-not-responding.html
20 remaining items
Doppelklick commentedon Oct 17, 2021
same problem here
@ubitechdevelopers did you solve it?
muknta commentedon Jan 12, 2022
Same problem here. Many users with Android 11 was receiving ANRs. Total number - 0.5% of all users each day.
jeff-odopass commentedon Mar 3, 2022
Same problem here, using camera plugin version
0.9.4+11, this ANR also represents 0.3% of all users and only occurs for Android 11 users. This may be moved to camera plugin github page.DadiCode commentedon Mar 10, 2022
Did you find any solution? I am seeing this kind of errors in Google Play Vitals on my applications made with Flutter.
muknta commentedon Mar 10, 2022
@DadiCode I think it relates to the overload of main thread. Solution can be using of isolates for downloads
DVendy commentedon Mar 22, 2022
Any updates on this? I'm getting this ANR's from device ZTE Z839V - Android 11
jeff-odopass commentedon Mar 22, 2022
I don't, except downgrading Flutter to 2.8.0 which is not a solution in my case.
itsJoKr commentedon May 17, 2022
We have the same issue. We could even reproduce it with specific Samsung phones. It would result in whitescreen and the app would never run which is big issue.
We've tracked it down to this specific issue: https://issuetracker.google.com/issues/230950647?pli=1
You can give it a star there.
deepak786 commentedon May 17, 2022
I also have the similar ANRs #101886 (comment)
But It is not clear, are they the same as this one or not.
because the title of the ANRs for me is
Input dispatching timed out (ActivityRecord{f096c18} does not have a focused window)Goolpe commentedon Aug 7, 2023
The same issue after upgrading Flutter from 3.7.11 to 3.10 (maybe cause of packages but not sure)