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. Dismiss Notice

Unity app freezes on Android 13

Discussion in 'Android' started by LanHyde, Sep 2, 2022.

  1. LanHyde

    LanHyde

    Joined:
    Oct 22, 2015
    Posts:
    7
    Hello.
    My Unity app runs properly on Android 7~12, but on Android 13, my app always freezes with the following exception:

    2022-09-02 13:55:29.355 22091-22314/com.xxxx.xxxx E/MediaCodec: Codec reported err 0x80000000/UNKNOWN_ERROR, actionCode 0, while in state 6/STARTED
    2022-09-02 13:55:29.355 22091-22158/com.xxxx.xxxx E/NdkMediaCodec: untranslated sf error code: -38
    AndroidVideoMedia::GetNextVideoFrameRaw bad buffer index: -10000
    (Filename: ./PlatformDependent/AndroidPlayer/Modules/Video/Private/AndroidVideoMedia.cpp Line: 3149)


    Does anyone know how to solve this issue? Thanks in advance. Unity ver: 2019.4.40
     
  2. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,143
  3. LanHyde

    LanHyde

    Joined:
    Oct 22, 2015
    Posts:
    7
    Thank you for your reply.
    Hmm... I did use webcam in my app, but webcam is called in another scene.
    This error occurred on my home screen which does not use any webcam features.
    and it even occurs at the first time the app starts and shows home screen only.
    I've no idea why it happens.

    I also tested on other android devices running Android 13, and it works as usual.
    in other words,
    my app does not work on Pixel 5 (Android 13)
    my app works on Pixel 4/6 (Android 11~13)
     
    Last edited: Sep 2, 2022
  4. LanHyde

    LanHyde

    Joined:
    Oct 22, 2015
    Posts:
    7
    figured out the issue:
    it seems that there's an internal video decoder issue in Android 13, which may or may not cause the app to freeze.
    after removing the VideoPlayer component and disabling the relevant code, my app works again.
    Since our app won't work after upgrading Unity to 202x, so we have to figure out another way to show the animation instead of using VideoPlayer