Search Issue Tracker

Fixed

Fixed in 2020.3.38f1, 2021.3.9f1, 2022.1.16f1, 2022.2.0b8, 2023.1.0a5

Votes

33

Found in

2020.3.33f1

Issue ID

UUM-7051

Regression

No

Android Player crashing in FMOD when targetting SDK Level 31

--

-

There are no steps for bug reproduction

Reproducible with: 2020.3.33f1

Notes:
- 3 fixes, which potentially can fix this issue, are being made to audio that were causing crashes

Backtrace:
#00 pc 000000000004fbcc /apex/com.android.runtime/lib64/bionic/libc.so (abort+164)
#00 pc 00000000006d157c /apex/com.android.art/lib64/libart.so (art::Runtime::Abort(char const*)+668)
#00 pc 000000000001695c /apex/com.android.art/lib64/libbase.so (android::base::SetAborter(std::__1::function<void (char const*)>&&)::$_3::__invoke(char const*)+76)
#00 pc 0000000000015f8c /apex/com.android.art/lib64/libbase.so (android::base::LogMessage::~LogMessage()+364)
#00 pc 00000000002926b0 /apex/com.android.art/lib64/libart.so (art::Thread::AssertNoPendingException() const+1536)
#00 pc 000000000028ea68 /apex/com.android.art/lib64/libart.so (art::ClassLinker::FindClass(art::Thread*, char const*, art::Handle<art::mirror::ClassLoader>)+64)
#00 pc 00000000005951d0 /apex/com.android.art/lib64/libart.so (art::JNI<false>::FindClass(_JNIEnv*, char const*)+816)
#00 pc 000000000016bbcc /system/lib64/libandroid_runtime.so (android_media_AudioSystem_error_callback(int)+52)
#00 pc 000000000005b104 /system/lib64/libaudioclient.so (android::AudioSystem::get_audio_flinger() (.cfi)+1740)
#00 pc 000000000007f630 /system/lib64/libaudioclient.so (android::AudioTrack::createTrack_l()+64)
#00 pc 00000000000849d4 /system/lib64/libaudioclient.so (android::AudioTrack::restoreTrack_l(char const*)+780)
#00 pc 0000000000087f38 /system/lib64/libaudioclient.so (android::AudioTrack::getTimestamp_l(android::ExtendedTimestamp*)+84)
#00 pc 0000000000086d70 /system/lib64/libaudioclient.so (android::AudioTrack::start()+380)
#00 pc 0000000000018f3c /system/lib64/libwilhelm.so (object_unlock_exclusive_attributes_(Object_interface*, unsigned int, char const*, int)+464)
#00 pc 000000000003401c /system/lib64/libwilhelm.so (IPlay_SetPlayState(SLPlayItf_ const* const*, unsigned int)+116)
#00 pc 00000000009d662c /data/app/~~T4t95Pns5eLNsd9-RX6vWQ==/com.scopely.wheeloffortune-fAQKedd11O6QRZKa9oXx5Q==/lib/arm64/libunity.so (FMOD::OutputOpenSL::startCallback(FMOD_OUTPUT_STATE*))

  1. Resolution Note (fix version 2023.1.0a5):

    Fixed an Android audio crash when targeting API Level 31 and running on an Android 12 device. Also fixed an AudioManager.GetStreamVolume exception when targeting API Level 29 or later, which caused the AudioSettings.Mobile.stopAudioOutputOnMute feature to not work correctly, if enabled.

  2. Resolution Note (fix version 2022.2.0b8):

    Android: Fixed an Android audio crash when targeting API Level 31 and running on an Android 12 device. Also fixed an AudioManager.GetStreamVolume exception when targeting API Level 29 or later, which caused the AudioSettings.Mobile.stopAudioOutputOnMute feature to not work correctly, if enabled.

  3. Resolution Note (fix version 2022.1.16f1):

    Android: Fixed an Android audio crash when targeting API Level 31 and running on an Android 12 device. Also fixed an AudioManager.GetStreamVolume exception when targeting API Level 29 or later, which caused the AudioSettings.Mobile.stopAudioOutputOnMute feature to not work correctly, if enabled.

  4. Resolution Note (fix version 2021.3.9f1):

    Android: Fixed an Android audio crash when targeting API Level 31 and running on an Android 12 device. Also fixed an AudioManager.GetStreamVolume exception when targeting API Level 29 or later, which caused the AudioSettings.Mobile.stopAudioOutputOnMute feature to not work correctly, if enabled.

  5. Resolution Note (fix version 2020.3.38f1):

    Android: Fixed an Android audio crash when targeting API Level 31 and running on an Android 12 device. Also fixed an AudioManager.GetStreamVolume exception when targeting API Level 29 or later, which caused the AudioSettings.Mobile.stopAudioOutputOnMute feature to not work correctly, if enabled.

Comments (21)

  1. ickimceo69

    Jun 30, 2024 13:39

    There are 2 solutions.
    Choose one.

    1. comment out mUnityPlayer.pause() in onPause()
    protected void onPause()
    {
    //mUnityPlayer.pause();
    super.onPause();
    }
    2. override addPhoneCallListener()

    mUnityPlayer = new UnityPlayer(this, this){
    protected void addPhoneCallListener()
    {
    //unity cause crash: security exception : required READ_PHONE_STATE permission
    }
    };

  2. Kingyal

    Jan 31, 2023 06:41

    Does anyone try in Unity 2021.3.17f1

  3. Hunterkiddo

    Dec 16, 2022 03:16

    I am experiencing this issue on 2021.3.15f1

  4. nightqnearth

    Nov 30, 2022 12:38

    @RYANJAY100 thanks for workaround with "Mute Other Audio Sources", it works fine for me.

  5. watsonsong

    Nov 03, 2022 13:13

    Again, Please get this fixed on 2019 LTS!!!!

  6. rgvRedvel

    Sep 27, 2022 09:05

    We've facing the same problem, also 2020.3.38f1 —which we updated to just trying to solve this.
    We have noticed a pattern in ocurrences: low free RAM. May I say extremely low on average (>100MB, even >50MB), and quite low even in the greater ones (~200MB).

  7. HoangVP

    Sep 13, 2022 02:27

    Please get this fixed on 2019 LTS

  8. Avocco

    Sep 05, 2022 19:22

    Will this be fixed in the 2019 LTS version?

  9. yourstoryinteractive

    Sep 02, 2022 10:21

    Isse also present in Unity 2019.4.40f1. Any chances to get a fix for that LTS?

  10. ryanjay100

    Aug 25, 2022 01:16

    Confirmed that the fix (2020.3.38) worked on my repro

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.