Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

What is "Input dispatching timed out" and how to solve it ?

Discussion in 'Android' started by neufoctobre, Feb 22, 2020.

  1. neufoctobre

    neufoctobre

    Joined:
    Jun 20, 2015
    Posts:
    85
    Hi,

    My app got a lot of ANR with "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" at emplacement : com.unity3d.player.UnityPlayerActivity

    I don't know what does that mean and how to solve it, or at leat how to investigate and understand this error.

    For example here is one of the error my player got :

    Thanks if anyone can help me !

    Code (CSharp):
    1.  
    2. "main" tid=1 Native
    3. "main" prio=5 tid=1 Native
    4.   | group="main" sCount=1 dsCount=0 flags=1 obj=0x725b3f08 self=0xb2727000
    5.   | sysTid=4058 nice=-10 cgrp=default sched=0/0 handle=0xb68e94a4
    6.   | state=S schedstat=( 5460807989 669082550 3945 ) utm=487 stm=58 core=2 HZ=100
    7.   | stack=0xbe083000-0xbe085000 stackSize=8MB
    8.   | held mutexes=
    9.   #00  pc 0000000000048b94  /system/lib/libc.so (__epoll_pwait+20)
    10.   #01  pc 000000000001b439  /system/lib/libc.so (epoll_pwait+60)
    11.   #02  pc 000000000001b469  /system/lib/libc.so (epoll_wait+12)
    12.   #03  pc 000000000001002d  /system/lib/libutils.so (android::Looper::pollInner(int)+120)
    13.   #04  pc 000000000000ff1d  /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+32)
    14.   #05  pc 00000000000b2795  /system/lib/libandroid_runtime.so (android::NativeMessageQueue::pollOnce(_JNIEnv*, _jobject*, int)+24)
    15.   #06  pc 00000000000baf25  /system/framework/arm/boot-framework.oat (Java_android_os_MessageQueue_nativePollOnce__JI+92)
    16.   at android.os.MessageQueue.nativePollOnce (Native method)
    17.   at android.os.MessageQueue.next (MessageQueue.java:325)
    18.   at android.os.Looper.loop (Looper.java:142)
    19.   at android.app.ActivityThread.main (ActivityThread.java:6647)
    20.   at java.lang.reflect.Method.invoke (Native method)
    21.   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:438)
    22.   at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:811)
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    2,321
    It means, the main thread which stacktrace you're showing here is stuck, and it didn't process the event that was being send to an application, thus Android OS decided to kill your app, and did a thread dump.It should have been more threads here though.

    The question is why your main thread stuck, there can be a lot of reasons, without actually debugging it's hard to say.
     
  3. Mese

    Mese

    Joined:
    Dec 13, 2015
    Posts:
    16
    We are having the same problem in one of our games. We are using Unity 2018.4.7f1

    Any usual suspects for this? Like Admob or certain Monobehaviour methods?

    Thanks!
     
  4. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    2,321
    One of the cases would be:

    But there are many other occasions... A repro would be nice in this case.
     
    leni8ec likes this.
  5. Grinch_GEO

    Grinch_GEO

    Joined:
    Apr 19, 2014
    Posts:
    92
    same her switched to 2019.3.12 form 2019.2.x and got tons of errors. like this :
    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: 23. Wait queue head age: 8335.7ms.)
     
unityunity