Search Unity

Question Error ANR

Discussion in 'Unity Ads & User Acquisition' started by AlukarDrol, Jan 24, 2023.

  1. AlukarDrol

    AlukarDrol

    Joined:
    Jan 29, 2017
    Posts:
    13
    Unity version 2021.3.12
    There are plugins: UnityAds(v4.3.0), UnityInapp(v4.5.1), UnityAnalytics(v3.6.12) and GooglePlayGames(v0.11.01).
    All time in Google Console i see ANR, due to this error, the critical percentage of failures has exceeded:
    Native method - android.os.MessageQueue.nativePollOnce
    On failure, some show a lot of threads and there are such errors, it can help.
    Code (CSharp):
    1.   at java.lang.Object.wait (Native method)
    2.   at java.lang.Object.wait (Object.java:422)
    3.   at android.os.ConditionVariable.block (ConditionVariable.java:128)
    4.   at com.unity3d.services.core.webview.a.a (WebViewApp.java:173)
    5.   at com.unity3d.services.core.configuration.InitializeThread$InitializeStateCreate.execute (InitializeThread.java:8)
    6.   at com.unity3d.services.core.configuration.InitializeThread.run (InitializeThread.java:4)
    Code (CSharp):
    1.   #00  pc 0x000000000001dcac  /system/lib64/libc.so (syscall+28)
    2.   #01  pc 0x00000000000e7820  /system/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+152)
    3.   #02  pc 0x00000000003464fc  /system/lib64/libart.so (art::JNI::CallObjectMethod(_JNIEnv*, _jobject*, _jmethodID*, ...)+552)
    4.   #03  pc 0x00000000000edbd8  /system/lib64/libandroid_runtime.so (android::NativeDisplayEventReceiver::dispatchVsync(long, int, unsigned int)+48)
    5.   #04  pc 0x00000000000408ec  /system/lib64/libandroidfw.so (android::DisplayEventDispatcher::handleEvent(int, int, void*)+164)
    6.   #05  pc 0x0000000000016054  /system/lib64/libutils.so (android::Looper::pollInner(int)+856)
    7.   #06  pc 0x0000000000015c74  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+108)
    8.   #07  pc 0x0000000000114d74  /system/lib64/libandroid_runtime.so
    9.   #08  pc 0x00000000001f4bfc  /system/framework/arm64/boot-framework.oat (Java_android_os_MessageQueue_nativePollOnce__JI+140)
    10.   at android.os.MessageQueue.nativePollOnce (Native method)
    11.   at android.os.MessageQueue.next (MessageQueue.java:325)
    12.   at android.os.Looper.loop (Looper.java:172)
    13.   at android.os.HandlerThread.run (HandlerThread.java:65)
     
  2. AlukarDrol

    AlukarDrol

    Joined:
    Jan 29, 2017
    Posts:
    13
    And other ANR.
    Native method - com.unity3d.player.ReflectionHelper.nativeProxyInvoke.
    Code (CSharp):
    1.   #00  pc 0x000000000001d4ec  /system/lib64/libc.so (syscall+28)
    2.   #01  pc 0x00000000000e703c  /system/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+152)
    3.   #02  pc 0x00000000003433c0  /system/lib64/libart.so (art::JNI::PushLocalFrame(_JNIEnv*, int)+476)
    4.   #03  pc 0x0000000000935824  /data/app/com.Alex.FlowerGirl-utn9VuxPH9y4MU_-0N-9Mw==/lib/arm64/libunity.so
    5.   at com.unity3d.player.UnityPlayer.nativeRender (Native method)
    6.   at com.unity3d.player.UnityPlayer.access$300 (unavailable)
    7.   at com.unity3d.player.UnityPlayer$e$1.handleMessage (unavailable)
    8.   at android.os.Handler.dispatchMessage (Handler.java:102)
    9.   at android.os.Looper.loop (Looper.java:166)
    10.   at com.unity3d.player.UnityPlayer$e.run (unavailable)
    Code (CSharp):
    1.   #00  pc 0x000000000001d4ec  /system/lib64/libc.so (syscall+28)
    2.   #01  pc 0x00000000000e703c  /system/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+152)
    3.   #02  pc 0x000000000034803c  /system/lib64/libart.so (art::JNI::CallObjectMethod(_JNIEnv*, _jobject*, _jmethodID*, ...)+552)
    4.   #03  pc 0x00000000000ebac8  /system/lib64/libandroid_runtime.so (android::NativeDisplayEventReceiver::dispatchVsync(long, int, unsigned int)+48)
    5.   #04  pc 0x0000000000040f98  /system/lib64/libandroidfw.so (android::DisplayEventDispatcher::handleEvent(int, int, void*)+164)
    6.   #05  pc 0x0000000000016080  /system/lib64/libutils.so (android::Looper::pollInner(int)+836)
    7.   #06  pc 0x0000000000015cac  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+108)
    8.   #07  pc 0x00000000001126d4  /system/lib64/libandroid_runtime.so
    9.   #08  pc 0x00000000001ed1cc  /system/framework/arm64/boot-framework.oat (Java_android_os_MessageQueue_nativePollOnce__JI+140)
    10.   at android.os.MessageQueue.nativePollOnce (Native method)
    11.   at android.os.MessageQueue.next (MessageQueue.java:366)
    12.   at android.os.Looper.loop (Looper.java:144)
    13.   at android.os.HandlerThread.run (HandlerThread.java:65)
     
  3. Unity-Boon

    Unity-Boon

    Unity Technologies

    Joined:
    Jan 18, 2017
    Posts:
    135
  4. AlukarDrol

    AlukarDrol

    Joined:
    Jan 29, 2017
    Posts:
    13
    Unfortunately, this is displayed in the Google console for users. Doesn't play on my devices. I can send a stack for each thread from the Google console.
    can you move this topic to your liking?
     
    Last edited: Jan 25, 2023
  5. Umairzafar

    Umairzafar

    Joined:
    May 4, 2017
    Posts:
    2
    I am also facing this anr Any help?

    My Stack trace is

    [libandroidfw.so] android::ResTable_config::copyFromDeviceNoSwap(android::ResTable_config const&)

    #00 pc 0x00000000000255d2 /system/lib/libandroidfw.so (android::ResTable_config::copyFromDeviceNoSwap(android::ResTable_config const&)+1) #01 pc 0x0000000000029a0b /system/lib/libandroidfw.so (android::ResTable::setParameters(android::ResTable_config const*)+282) #02 pc 0x00000000000198ff /system/lib/libandroidfw.so (android::AssetManager::updateResourceParamsLocked() const+66) #03 pc 0x00000000000199a5 /system/lib/libandroidfw.so (android::AssetManager::setConfiguration(android::ResTable_config const&, char const*)+60) #04 pc 0x00000000000b948b /system/lib/libandroid_runtime.so #05 pc 0x000000000016377f /system/framework/arm/boot-framework.oat (Java_android_content_res_AssetManager_setConfiguration__IILjava_lang_String_2IIIIIIIIIIIIIII+230) at android.content.res.AssetManager.setConfiguration (Native method) at android.content.res.ResourcesImpl.updateConfiguration (ResourcesImpl.java:437) at android.app.ResourcesManager.applyConfigurationToResourcesLocked (ResourcesManager.java:906) at android.app.ActivityThread.handleConfigurationChanged (ActivityThread.java:5003) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1708) at android.os.Handler.dispatchMessage (Handler.java:106) at android.os.Looper.loop (Looper.java:164) at android.app.ActivityThread.main (ActivityThread.java:6518) at java.lang.reflect.Method.invoke (Native method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:807)