Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Video App Crash with Videoplayer

Discussion in 'Audio & Video' started by Alex_in_wonderland, Jan 15, 2020.

  1. Alex_in_wonderland

    Alex_in_wonderland

    Joined:
    Aug 2, 2017
    Posts:
    9
    We are using 2019.2.6 f1 with a lot of videoplayers and switch scene automatically. The app just crashed with the following log. Does anyone suffer the similar issue?

    --------- beginning of crash
    10-11 13:47:23.971 16435-16455/com.alextest.testscene E/AndroidRuntime: FATAL EXCEPTION: UnityMain
    Process: com.alextest.testscene, PID: 16435
    java.lang.Error: FATAL EXCEPTION [UnityMain]
    Unity version : 2019.2.6f1
    Device model : orbbec V1-PERSEE-RK3288-US-V028
    Device fingerprint: Android/rk3288_box/rk3288_box:5.1.1/LMY47V/root01172220:userdebug/test-keys

    Caused by: java.lang.Error: signal 6 (SIGABRT), code -6 (?), fault addr --------
    Build fingerprint: 'Android/rk3288_box/rk3288_box:5.1.1/LMY47V/root01172220:userdebug/test-keys'
    Revision: '0'
    pid: 16435, tid: 16462, name: Thread-917 >>> com.alextest.testscene <<<
    r0 00000000 r1 0000404e r2 00000006 r3 00000000
    r4 a050edd8 r5 00000006 r6 0000000b r7 0000010c
    r8 00000000 r9 b76cd928 sl b873ff60 fp 00000001
    ip 0000404e sp a050ddb0 lr b6ddddb1 pc b6e04104 cpsr bb582c00

    at libc.tgkill(tgkill:12)
    at libc.pthread_kill(pthread_kill:52)
    at libc.raise(raise:10)
    at libc.__libc_android_abort(__libc_android_abort:36)
    at libc.abort(abort:4)
    at libc.abort(abort:4)
    at libc.abort(abort:4)
    at libc.abort(abort:4)
    at libc.abort(abort:4)
    at libc.abort(abort:4)
    at libc.abort(abort:4)
    at libc.abort(abort:4)
    at libc.abort(abort:4)
    at libc.abort(abort:4)
    at libc.abort(abort:4)
    at libc.abort(abort:4)
    at libc.abort(abort:4)
    at libc.abort(abort:4)
    at libc.abort(abort:4)
    at libc.abort(abort:4)
    at libc.abort(abort:4)
    at libc.abort(abort:4)
    at libc.abort(abort:4)
    at libc.abort(abort:4)
    at libc.abort(abort:4)
    at libc.abort(abort:4)
    at libc.abort(abort:4)
    at libc.abort(abort:4)
    at libc.abort(abort:4)
    at libc.abort(abort:4)
    at libc.abort(abort:4)
    at libc.abort(abort:4)
     

    Attached Files:

  2. DominiqueLrx

    DominiqueLrx

    Unity Technologies

    Joined:
    Dec 14, 2016
    Posts:
    256
    Hi!

    Thanks for bringing this to our attention. You mention you are using "a lot of videoplayers": if too many players are active at the same time (video is prepared and playing or paused), this may exceed the device's capabilities which will often lead to a crash. The better approach is to have the minimal number of playbacks active at once, since some older/low-capability devices can be limited to as low as 1-2 movies at the same time. To make things even more delicate, there is no way on these devices to know about the limit ahead of time (it may depend on resolution, actual codec and so on) so you need to be cautious.

    So after checking that you indeed have minimized the number of concurrently active playbacks, if you still get this crash, please submit a bug report with a minimal project that demonstrates the issue and we'll be able to have a look.

    Hope this helps!

    Dominique Leroux
    A/V developer at Unity
     
  3. Alex_in_wonderland

    Alex_in_wonderland

    Joined:
    Aug 2, 2017
    Posts:
    9
    Thanks for the reply. And sorry for the confusion. We use only one VideoPlayer in each scene. Will this VideoPlayer be destroyed whenever app leave the scene?
     
  4. DominiqueLrx

    DominiqueLrx

    Unity Technologies

    Joined:
    Dec 14, 2016
    Posts:
    256
    OK, thanks for the clarification.

    And you're positive it's because of the VideoPlayer (e.g.: disabling the VideoPlayer removes the crash)? There are indeed a good number of seemingly-video-related messages in the log, but the Android device's video backend shipped with the OS is typically quite chatty so it's hard to be sure.

    The source of the crash seems to be this message:

    JNI ERROR (app bug): local reference table overflow (max=512)

    local reference table dump:
    Last 10 entries (of 512):
    511: 0x13232520 java.lang.ClassNotFoundException
    510: 0x74737358 java.lang.NoClassDefFoundError
    509: 0x132324e0 java.lang.String "java.lang.invoke... (37 chars)
    508: 0x12e6c320 dalvik.system.PathClassLoader
    507: 0x1315ef10 java.lang.Class[] (1 elements)
    506: 0x13230c40 float[] (16 elements)
    505: 0x1315ef00 $Proxy8
    504: 0x1315ee10 java.lang.Class[] (1 elements)
    503: 0x1301b680 android.view.Surface
    502: 0x12e1c880 android.os.Message
    Summary:
    1 of java.lang.ClassNotFoundException
    127 of float[] (16 elements) (127 unique instances)
    63 of android.view.Surface (63 unique instances)
    1 of dalvik.system.PathClassLoader
    1 of java.lang.NoClassDefFoundError
    128 of java.lang.Class[] (1 elements) (128 unique instances)
    1 of java.lang.String
    127 of $Proxy8 (127 unique instances)
    63 of android.os.Message (3 unique instances)

    Runtime aborting...
    So something is causing unbound growth of JNI local references somewhere. It could be video or something else (the video implementation does make use of JNI in certain scenarios).

    But it's the first time we hear of this issue, so there probably is something specific to the media you're playing or to the device/OS version. Have you tried playing different footage (vary resolution, frame rate or format)? Is this happening on other devices?

    But regardless, I do recommend submitting a bug report with footage so we can take a close look.

    Dominique
     
  5. Alex_in_wonderland

    Alex_in_wonderland

    Joined:
    Aug 2, 2017
    Posts:
    9
    Thanks for the reply. We are not 100% sure what caused this issue. Already submit a bug report.
     
  6. Alex_in_wonderland

    Alex_in_wonderland

    Joined:
    Aug 2, 2017
    Posts:
    9
    Hi,
    We found our bug is closed. Is it fixed ?
    upload_2020-2-5_14-41-24.png