Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Errors understanding

Discussion in 'Android' started by Seraphim-Whiteless, Jul 3, 2018.

  1. Seraphim-Whiteless

    Seraphim-Whiteless

    Joined:
    Jun 23, 2014
    Posts:
    197
    Hi everyone!

    Google Vitals ANR registers a some number of errors.

    Our games are made on Unity3D and compiled into executable files with partial loss of the directions of procedures and functions. Although, we do not use any obfuscation methods.

    The ANR reports also contain references to some native functions in which the failure occurred. For example

    "main" prio=5 tid=1 Native
    | group="main" sCount=1 dsCount=0 obj=0x7331a2a0 self=0xb82c6ef8
    | sysTid=21562 nice=-4 cgrp=default sched=0/0 handle=0xb6fd3b34
    | state=S schedstat=( 1777264743 425281075 4901 ) utm=108 stm=69 core=1 HZ=100
    | stack=0xbe70f000-0xbe711000 stackSize=8MB
    | held mutexes=
    #00 pc 0000000000016a6c /system/lib/libc.so (syscall+28)
    #01 pc 00000000000f60bb /system/lib/libart.so (_ZN3art17ConditionVariable4WaitEPNS_6ThreadE+82)
    #02 pc 0000000000284619 /system/lib/libart.so (_ZN3art3JNI16CallObjectMethodEP7_JNIEnvP8_jobjectP10_jmethodIDz+624)
    #03 pc 0000000000002bc3 /system/lib/libnativehelper.so (jniGetReferent+94)
    #04 pc 0000000000077d03 /system/lib/libandroid_runtime.so (_ZN7android26NativeDisplayEventReceiver13dispatchVsyncExij+26)
    #05 pc 0000000000077f25 /system/lib/libandroid_runtime.so (_ZN7android26NativeDisplayEventReceiver11handleEventEiiPv+80)
    #06 pc 0000000000012f4f /system/lib/libutils.so (_ZN7android6Looper9pollInnerEi+530)
    #07 pc 000000000001301f /system/lib/libutils.so (_ZN7android6Looper8pollOnceEiPiS1_PPv+130)
    #08 pc 0000000000083dbd /system/lib/libandroid_runtime.so (_ZN7android18NativeMessageQueue8pollOnceEP7_JNIEnvP8_jobjecti+22)
    #09 pc 0000000000000585 /system/framework/arm/boot.oat (Java_android_os_MessageQueue_nativePollOnce__JI+96)
    at android.os.MessageQueue.nativePollOnce (Native method)
    at android.os.MessageQueue.next (MessageQueue.java:323)
    at android.os.Looper.loop (Looper.java:135)
    at android.app.ActivityThread.main (ActivityThread.java:5443)
    at java.lang.reflect.Method.invoke! (Native method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:728)
    at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:618)



    And the question is - can we generate any files during the assembly that will help us in the analysis of these errors?

    For example, generate certain files with the procedure directions, load them into the google console and then work with them in our internal directional space?
     
  2. Seraphim-Whiteless

    Seraphim-Whiteless

    Joined:
    Jun 23, 2014
    Posts:
    197
    is there any chance of solving the issue?
     
  3. Seraphim-Whiteless

    Seraphim-Whiteless

    Joined:
    Jun 23, 2014
    Posts:
    197
  4. Crashthatch

    Crashthatch

    Joined:
    Sep 25, 2017
    Posts:
    8
    I too have ANR stack traces from Google Developer console that look like this, and have not been able to find a way to figure out what is causing the underlying issue.
     
  5. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Is there any pattern in the ANRs? Such as Android version, device model, etc. Generally to address an issue, we need steps to reproduce. Understood this can be difficult when you can't reproduce internally.
     
  6. g8minhquan

    g8minhquan

    Joined:
    Jun 18, 2014
    Posts:
    38
    Hi JeffD,
    Could you please take a look at my ANR report: https://pastebin.com/8ndSvECy
    It happens mostly on these Android versions:
    - Android 5.1 42 60.0%
    - Android 5.0 28 40.0%

    Occurrences by device models:
    Galaxy J3 Pro (j3xproltechn) 13 18.6%
    Galaxy J2 (j2lte) 10 14.3%
    Galaxy Note3 (hlte) 10 14.3%
    Galaxy A7 (a7ltelgt) 6 8.6%
    Galaxy J3(2016) (j3xnlte) 5 7.1%
    Galaxy Note3 (ha3g) 5 7.1%
    Galaxy J5 (j5ltekx) 3 4.3%
    Galaxy J3(2016) (j3xlte) 3 4.3%
    Galaxy J1 Mini (j1mini3g) 2 2.9%
    Galaxy S5 (klte) 2 2.9%
    Galaxy Note3 (hltektt) 2 2.9%
    Galaxy Note4 (tre3caltelgt) 1 1.4%
    Galaxy Note3 Neo (frescolteskt) 1 1.4%
    Galaxy E5 (e53g) 1 1.4%
    Galaxy Grand Prime (fortunalte) 1 1.4%
    Galaxy Tab 4 8.0 (milletwifikx) 1 1.4%
    Galaxy A8 (SCV32) 1 1.4%
    Xperia Z5 (501SO) 1 1.4%
    Galaxy Grand Prime (fortuna3g) 1 1.4%
    ZenFone 2 (ZE551ML) (Z00A) 1 1.4%

    Thanks :)
     
  7. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You will likely need to test on one of these devices to reproduce.