Unity 2021.3.18f1 Android build crash at runtime

Hi all,
can anyone help with this Unity crash backtrace stack?
I think it’s something related to the media player, but I cannot figure out more.
Thanks in advance.

2023/05/29 15:58:00.079 24431 24431 Fatal DEBUG *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2023/05/29 15:58:00.079 24431 24431 Fatal DEBUG Build fingerprint: ‘oculus/hollywood/hollywood:12/SQ3A.220605.009.A1/50500320057200150:user/release-keys’
2023/05/29 15:58:00.079 24431 24431 Fatal DEBUG Revision: ‘0’
2023/05/29 15:58:00.079 24431 24431 Fatal DEBUG ABI: ‘arm64’
2023/05/29 15:58:00.079 24431 24431 Fatal DEBUG Timestamp: 2023-05-29 15:57:59.702409677+0200
2023/05/29 15:58:00.079 24431 24431 Fatal DEBUG Process uptime: 0s
2023/05/29 15:58:00.079 24431 24431 Fatal DEBUG Cmdline: com.myapp.dev
2023/05/29 15:58:00.079 24431 24431 Fatal DEBUG pid: 23625, tid: 23673, name: Background Job. >>> com.myapp.dev <<<
2023/05/29 15:58:00.079 24431 24431 Fatal DEBUG uid: 10134
2023/05/29 15:58:00.079 24431 24431 Fatal DEBUG signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
2023/05/29 15:58:00.079 24431 24431 Fatal DEBUG Cause: null pointer dereference
2023/05/29 15:58:00.079 24431 24431 Fatal DEBUG x0 0000000000000000 x1 0000000000002db6 x2 0000000070220568 x3 0000000000000002
2023/05/29 15:58:00.079 24431 24431 Fatal DEBUG x4 0000007203ffb8b0 x5 0000007203ffb830 x6 0000000000000000 x7 002e00640069006f
2023/05/29 15:58:00.079 24431 24431 Fatal DEBUG x8 0000007203ffb6f0 x9 0000007203ffb760 x10 0000007203ffb6c0 x11 ffffff80ffffffd8
2023/05/29 15:58:00.079 24431 24431 Fatal DEBUG x12 006e006e006f0043 x13 0069007400630065 x14 0000000000000140 x15 0000007403296ae0
2023/05/29 15:58:00.080 24431 24431 Fatal DEBUG x16 00000074093e3e18 x17 00000073eed5263c x18 0000007203e3a000 x19 0000007203ffc000
2023/05/29 15:58:00.080 24431 24431 Fatal DEBUG x20 0000007203ffb830 x21 0000007203ffb8b0 x22 b40000719623fd20 x23 0000000000000002
2023/05/29 15:58:00.080 24431 24431 Fatal DEBUG x24 0000000000000000 x25 00000073ec7ee590 x26 0000000000000000 x27 b400007130438600
2023/05/29 15:58:00.080 24431 24431 Fatal DEBUG x28 0000007203ffc000 x29 0000007203ffb740
2023/05/29 15:58:00.080 24431 24431 Fatal DEBUG lr 0000007409356c4c sp 0000007203ffb640 pc 00000074092cd398 pst 0000000060001000
2023/05/29 15:58:00.080 24431 24431 Fatal DEBUG backtrace:
2023/05/29 15:58:00.080 24431 24431 Fatal DEBUG #00 pc 00000000000c5398 /system/lib64/libandroid_runtime.so (_JNIEnv::CallBooleanMethod(_jobject*, _jmethodID*, …)+100) (BuildId: e20ab5e97d68f4082e3b48ff8cc1bb41)
2023/05/29 15:58:00.080 24431 24431 Fatal DEBUG #01 pc 000000000014ec48 /system/lib64/libandroid_runtime.so (JavaBBinder::onTransact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+156) (BuildId: e20ab5e97d68f4082e3b48ff8cc1bb41)
2023/05/29 15:58:00.080 24431 24431 Fatal DEBUG #02 pc 000000000003e840 /system/lib64/libbinder.so (android::BBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+260) (BuildId: e1a55c3f245d543c75a9e51629bbce19)
2023/05/29 15:58:00.080 24431 24431 Fatal DEBUG #03 pc 0000000000041f88 /system/lib64/libmedia.so (android::BpMediaHTTPConnection::disconnect()+284) (BuildId: 66396fb2c807b7c497792f86c765e3c6)
2023/05/29 15:58:00.080 24431 24431 Fatal DEBUG #04 pc 000000000000c658 /system/lib64/libdatasource.so (android::MediaHTTP::disconnect()+120) (BuildId: 7d86477da197bc40d6b9f61ba0259a8a)
2023/05/29 15:58:00.080 24431 24431 Fatal DEBUG #05 pc 000000000012eb28 /system/lib64/libstagefright.so (android::NuMediaExtractor::~NuMediaExtractor()+588) (BuildId: 4f95722fb1fb2f3903b294cf746c90c8)
2023/05/29 15:58:00.080 24431 24431 Fatal DEBUG #06 pc 000000000012ebfc /system/lib64/libstagefright.so (android::NuMediaExtractor::~NuMediaExtractor()+16) (BuildId: 4f95722fb1fb2f3903b294cf746c90c8)
2023/05/29 15:58:00.080 24431 24431 Fatal DEBUG #07 pc 000000000000ee4c /system/lib64/libutils.so (android::RefBase::decStrong(void const*) const+108) (BuildId: 2b5b63b97d8a7062f81ea0aa3fc6d164)
2023/05/29 15:58:00.080 24431 24431 Fatal DEBUG #08 pc 000000000001d6e8 /system/lib64/libmediandk.so (AMediaExtractor_delete.cfi+140) (BuildId: 481afe7a2acdd663bd4b8cd8f9407652)
2023/05/29 15:58:00.080 24431 24431 Fatal DEBUG #09 pc 0000000000a34de0 /data/app/~~uQA_BArX2RzT6Mt12CZ7_g==/com.myapp.dev-qOT7RwpSSSqqwAxfGZzGRA==/lib/arm64/libunity.so (BuildId: 4b06900db29d5506dda7e027e7ada20391827d3d)
2023/05/29 15:58:00.080 24431 24431 Fatal DEBUG #10 pc 00000000009cbc48 /data/app/~~uQA_BArX2RzT6Mt12CZ7_g==/com.myapp.dev-qOT7RwpSSSqqwAxfGZzGRA==/lib/arm64/libunity.so (BuildId: 4b06900db29d5506dda7e027e7ada20391827d3d)
2023/05/29 15:58:00.080 24431 24431 Fatal DEBUG #11 pc 000000000044d5f8 /data/app/~~uQA_BArX2RzT6Mt12CZ7_g==/com.myapp.dev-qOT7RwpSSSqqwAxfGZzGRA==/lib/arm64/libunity.so (BuildId: 4b06900db29d5506dda7e027e7ada20391827d3d)
2023/05/29 15:58:00.080 24431 24431 Fatal DEBUG #12 pc 000000000044d96c /data/app/~~uQA_BArX2RzT6Mt12CZ7_g==/com.myapp.dev-qOT7RwpSSSqqwAxfGZzGRA==/lib/arm64/libunity.so (BuildId: 4b06900db29d5506dda7e027e7ada20391827d3d)
2023/05/29 15:58:00.080 24431 24431 Fatal DEBUG #13 pc 000000000044dc40 /data/app/~~uQA_BArX2RzT6Mt12CZ7_g==/com.myapp.dev-qOT7RwpSSSqqwAxfGZzGRA==/lib/arm64/libunity.so (BuildId: 4b06900db29d5506dda7e027e7ada20391827d3d)
2023/05/29 15:58:00.080 24431 24431 Fatal DEBUG #14 pc 000000000044cf9c /data/app/~~uQA_BArX2RzT6Mt12CZ7_g==/com.myapp.dev-qOT7RwpSSSqqwAxfGZzGRA==/lib/arm64/libunity.so (BuildId: 4b06900db29d5506dda7e027e7ada20391827d3d)
2023/05/29 15:58:00.080 24431 24431 Fatal DEBUG #15 pc 0000000000511018 /data/app/~~uQA_BArX2RzT6Mt12CZ7_g==/com.myapp.dev-qOT7RwpSSSqqwAxfGZzGRA==/lib/arm64/libunity.so (BuildId: 4b06900db29d5506dda7e027e7ada20391827d3d)
2023/05/29 15:58:00.080 24431 24431 Fatal DEBUG #16 pc 00000000000dddec /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+132) (BuildId: d7676abcaa144b1eeebd8fdc21061019)
2023/05/29 15:58:00.080 24431 24431 Fatal DEBUG #17 pc 000000000008a02c /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: d7676abcaa144b1eeebd8fdc21061019)

Looks like it’s just a nullref. Go fix it! Here’s how:

How to fix a NullReferenceException error

https://forum.unity.com/threads/how-to-fix-a-nullreferenceexception-error.1230297/

Three steps to success:

  • Identify what is null ← any other action taken before this step is WASTED TIME
  • Identify why it is null
  • Fix that

Yeah, I saw that but with Unity 2020.x this did not happen, neither on editor I got any error.
I’ll check better, maybe something got wrong on editor upgrade.

Using the stacktrace utility seems to be something related to the video player: in fact the crash happens after a while a video starts playing.

2023/05/29 18:05:17.864 3041 3084 Error CRASH #00 pc 00000000000c5398 (libandroid_runtime.so not found) /system/lib64/libandroid_runtime.so (BuildId: e20ab5e97d68f4082e3b48ff8cc1bb41)
2023/05/29 18:05:17.864 3041 3084 Error CRASH #01 pc 000000000014ec48 (libandroid_runtime.so not found) /system/lib64/libandroid_runtime.so (BuildId: e20ab5e97d68f4082e3b48ff8cc1bb41)
2023/05/29 18:05:17.864 3041 3084 Error CRASH #02 pc 000000000003e840 (libbinder.so not found) /system/lib64/libbinder.so (android::BBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+260) (BuildId: e1a55c3f245d543c75a9e51629bbce19)
2023/05/29 18:05:17.864 3041 3084 Error CRASH #03 pc 0000000000041f88 (libmedia.so not found) /system/lib64/libmedia.so (BuildId: 66396fb2c807b7c497792f86c765e3c6)
2023/05/29 18:05:17.864 3041 3084 Error CRASH #04 pc 000000000000c658 (libdatasource.so not found) /system/lib64/libdatasource.so (android::MediaHTTP::disconnect()+120) (BuildId: 7d86477da197bc40d6b9f61ba0259a8a)
2023/05/29 18:05:17.864 3041 3084 Error CRASH #05 pc 000000000012eb28 (libstagefright.so not found) /system/lib64/libstagefright.so (android::NuMediaExtractor::~NuMediaExtractor()+588) (BuildId: 4f95722fb1fb2f3903b294cf746c90c8)
2023/05/29 18:05:17.864 3041 3084 Error CRASH #06 pc 000000000012ebfc (libstagefright.so not found) /system/lib64/libstagefright.so (android::NuMediaExtractor::~NuMediaExtractor()+16) (BuildId: 4f95722fb1fb2f3903b294cf746c90c8)
2023/05/29 18:05:17.864 3041 3084 Error CRASH #07 pc 000000000000ee4c (libutils.so not found) /system/lib64/libutils.so (android::RefBase::decStrong(void const*) const+108) (BuildId: 2b5b63b97d8a7062f81ea0aa3fc6d164)
2023/05/29 18:05:17.864 3041 3084 Error CRASH #08 pc 000000000001d6e8 (libmediandk.so not found) /system/lib64/libmediandk.so (BuildId: 481afe7a2acdd663bd4b8cd8f9407652)
2023/05/29 18:05:17.864 3041 3084 Error CRASH #09 pc 0000000000a34de0 (AndroidVideoMediaAndroidMediaNDK::Traits::ThreadedCleanup() at ??:?) /data/app/~~Sl_3C78UZtYbb1gc4pSGzA==/com.myapp.dev-sQD0DOvRrsFA5wfVA7i9UA==/lib/arm64/libunity.so (BuildId: 4b06900db29d5506dda7e027e7ada20391827d3d)
2023/05/29 18:05:17.864 3041 3084 Error CRASH #10 pc 00000000009cbc48 (VideoClipPlayback::ScheduleCleanupJob(void ()(void, VideoClipPlayback*), void*)::CleanupJob::ExecuteCleanupJob(CleanupJob*) at ??:?) /data/app/~~Sl_3C78UZtYbb1gc4pSGzA==/com.myapp.dev-sQD0DOvRrsFA5wfVA7i9UA==/lib/arm64/libunity.so (BuildId: 4b06900db29d5506dda7e027e7ada20391827d3d)
2023/05/29 18:05:17.864 3041 3084 Error CRASH #11 pc 000000000044d5f8 (JobQueue::Exec(JobInfo*, long long, int, bool) at ??:?) /data/app/~~Sl_3C78UZtYbb1gc4pSGzA==/com.myapp.dev-sQD0DOvRrsFA5wfVA7i9UA==/lib/arm64/libunity.so (BuildId: 4b06900db29d5506dda7e027e7ada20391827d3d)
2023/05/29 18:05:17.864 3041 3084 Error CRASH #12 pc 000000000044d96c (JobQueue::ExecuteJobFromHighPriorityStack(bool, bool&) at ??:?) /data/app/~~Sl_3C78UZtYbb1gc4pSGzA==/com.myapp.dev-sQD0DOvRrsFA5wfVA7i9UA==/lib/arm64/libunity.so (BuildId: 4b06900db29d5506dda7e027e7ada20391827d3d)
2023/05/29 18:05:17.864 3041 3084 Error CRASH #13 pc 000000000044dc40 (JobQueue::ProcessJobs(JobQueue::ThreadInfo*, void*) at ??:?) /data/app/~~Sl_3C78UZtYbb1gc4pSGzA==/com.myapp.dev-sQD0DOvRrsFA5wfVA7i9UA==/lib/arm64/libunity.so (BuildId: 4b06900db29d5506dda7e027e7ada20391827d3d)
2023/05/29 18:05:17.864 3041 3084 Error CRASH #14 pc 000000000044cf9c (JobQueue::WorkLoop(void*) at ??:?) /data/app/~~Sl_3C78UZtYbb1gc4pSGzA==/com.myapp.dev-sQD0DOvRrsFA5wfVA7i9UA==/lib/arm64/libunity.so (BuildId: 4b06900db29d5506dda7e027e7ada20391827d3d)
2023/05/29 18:05:17.864 3041 3084 Error CRASH #15 pc 0000000000511018 (Thread::RunThreadWrapper(void*) at ??:?) /data/app/~~Sl_3C78UZtYbb1gc4pSGzA==/com.myapp.dev-sQD0DOvRrsFA5wfVA7i9UA==/lib/arm64/libunity.so (BuildId: 4b06900db29d5506dda7e027e7ada20391827d3d)
2023/05/29 18:05:17.864 3041 3084 Error CRASH #16 pc 00000000000dddec (libc.so not found) /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+132) (BuildId: d7676abcaa144b1eeebd8fdc21061019)
2023/05/29 18:05:17.864 3041 3084 Error CRASH #17 pc 000000000008a02c (libc.so not found) /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: d7676abcaa144b1eeebd8fdc21061019)