Search Unity

Bug Unity 2020 - null pointer dereference

Discussion in 'Android' started by Qbit86, Mar 1, 2022.

  1. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    After updating Unity from 2018.4.10 to 2020.3.26 our game started having a new nasty crash on Android (IL2CPP).
    We cannot reproduce it locally on available devices, it is only reported in Google Play Console.

    The stack trace is:
    Code (csharp):
    1. java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    2. Version '2020.3.26f1 (7298b473bc1a)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
    3. Build fingerprint: 'samsung/a31nndx/a31:11/RP1A.200720.012/A315GDXU1CUG5:user/release-keys'
    4. Revision: '3'
    5. ABI: 'arm64'
    6. Timestamp: 2022-03-01 09:27:12-0300
    7. pid: 21818, tid: 25180, name: UnityMain  >>> com.***.*** <<<
    8. uid: 10545
    9. signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
    10. Cause: null pointer dereference
    11. x0  0000000000000000  x1  0000007389a2c05d  x2  000000749638b627  x3  0000000000000005
    12. x4  0000000000000000  x5  0000aa0000101000  x6  0000000000000000  x7  7fff7fff7fffffff
    13. x8  0000000000000041  x9  0aa7489c39ba85cf  x10 0000000000000000  x11 00000073f68f7151
    14. x12 0000000000000000  x13 0000000000000047  x14 0000000000000001  x15 000023f1ec4ece20
    15. x16 00000074963be9b0  x17 0000007496396670  x18 000000007c5ec72c  x19 00000073f68f7260
    16. x20 00000072e1d75098  x21 00000072e01c0a50  x22 0000000000000002  x23 0000000000000001
    17. x24 00000073f68f7ef0  x25 00000073f68fa000  x26 00000073f68fa000  x27 00000073f68f79a0
    18. x28 0000000000000000  x29 00000073f68f8900
    19. sp  00000073f68f71e0  lr  0000007388fa31a4  pc  0000007388e89a40
    20. backtrace:
    21.   at
    22.   at
    23.   at ... a lot of empty entries
    24.   at
    25.   at
    26.   at libunity.0x2bfa40 (Native Method)
    27.   at libunity.0x3d91a0 (Native Method)
    28.   at libunity.0x3d8e50 (Native Method)
    29.   at libunity.0x3c7f9c (Native Method)
    30.   at libunity.0x3c761c (Native Method)
    31.   at libunity.0x8c4328 (Native Method)
    32.   at libunity.0x54d36c (Native Method)
    33.   at libunity.0x54d5d4 (Native Method)
    34.   at libunity.0x38f5e4 (Native Method)
    35.   at libunity.0x37af7c (Native Method)
    36.   at libunity.0x37bb00 (Native Method)
    37.   at libunity.0x3912d4 (Native Method)
    38.   at base.0x10837c (Native Method)
    I've tried to symbolicate addresses with addr2line, but got nothing meaningful:
    Code (csharp):
    1. ...
    Upd. 2022-10-23: I deleted the stack trace so as not to be misleading. Initially, I got it with the wrong version of addr2line. See the fixed stack trace further in the thread.

    The majority of occurrences are on Android 11 (SDK 30), a little on Android 9, 10, 8; no Android 12.
    There are no dominant devices; the top ones are Samsung Galaxy A51 and Huawei P20 Lite.

    It looks like some regression in Unity, since we don't encounter such an issue in 2018.4, but a lot of users hit the crash on the version built with 2020.3. And the error message “Cause: null pointer dereference” indicates that an issue is rather somewhere in engine code, not in scripts.
     
    Last edited: Oct 23, 2022
    FamishedMammal and CunningFox146 like this.
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,918
    T
    The resolved stacktrace doesn't look correct, are you sure you've used the correct symbol file?
     
  3. PolluxDevelopersTeam

    PolluxDevelopersTeam

    Joined:
    Nov 13, 2016
    Posts:
    12
  4. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    No, I'm not sure...
    Ok, there is similar stacktrace, but for another ABI platform:
    Code (csharp):
    1. Version '2020.3.26f1 (7298b473bc1a)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'armeabi-v7a'
    2. ...
    3. signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
    4. Cause: null pointer dereference
    5. ...
    6. backtrace:
    7.   at
    8. ...
    9.   at
    10.   at libunity.0x1cb7dc (Native Method)
    11.   at libunity.0x299c8c (Native Method)
    12.   at libunity.0x2998d8 (Native Method)
    13.   at libunity.0x287414 (Native Method)
    14.   at libunity.0x286820 (Native Method)
    15.   at libunity.0x73ea1b (Native Method)
    16.   at libunity.0x42df38 (Native Method)
    17.   at libunity.0x42e1d0 (Native Method)
    18.   at libunity.0x25efbf (Native Method)
    19.   at libunity.0x2500b3 (Native Method)
    20.   at libunity.0x250c01 (Native Method)
    21.   at libunity.0x260459 (Native Method)
    I'm using addr2line.exe on Windows from this path:
    .../android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-addr2line.exe
    Is it right?

    I pass libunity.sym.so from this path:
    C:\Program Files\Unity\Hub\Editor\2020.3.26f1\Editor\Data\PlaybackEngines\AndroidPlayer\Variations\il2cpp\Release\Symbols\armeabi-v7a\libunity.sym.so

    Now I have this stacktrace:
    Code (csharp):
    1. ...
    Upd. 2022-10-23: I deleted the stack trace to avoid misleading readers who encountered the same crash. I resolved it with the wrong version of addr2line. See the fixed stack trace further in the thread.
     
    Last edited: Oct 23, 2022
  5. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,918
    Qbit86 likes this.
  6. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    Ok, I have rebuilt the APK from the same commit (hoping that build is deterministic) and passed generated libunity.sym.so instead of the one provided with Unity installation.

    Now I have a somewhat more realistic stacktrace:
    Code (csharp):
    1. 0x001cb7dc: BeginsWith(char const*, char const*) at ??:?
    2. 0x00299c8c: ApiGLES::FillExtensions(dynamic_array<core::basic_string_ref<char>, 0u>&) at ??:?
    3. 0x002998d8: ApiGLES::Init(GfxContextGLES const&, GfxDeviceLevelGL&) at ??:?
    4. 0x00287414: GfxDeviceGLES::Init(GfxDeviceLevelGL) at ??:?
    5. 0x00286820: CreateGLESGfxDevice(GfxDeviceRenderer) at ??:?
    6. 0x0073ea1b: CreateClientGfxDevice(GfxDeviceRenderer, GfxCreateDeviceFlags) at ??:?
    7. 0x0042df38: CreateGfxDevice(GfxDeviceRenderer, GfxCreateDeviceFlags) at ??:?
    8. 0x0042e1d0: InitializeGfxDevice() at ??:?
    9. 0x0025efbf: AndroidGraphics::Startup() at ??:?
    10. 0x002500b3: UnityInitApplication() at ??:?
    11. 0x00250c01: UnityPlayerLoop() at ??:?
    12. 0x00260459: nativeRender(_JNIEnv*, _jobject*) at ??:?
     
    Last edited: Apr 1, 2022
  7. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,918
    Yes, that looks correct. Seems like something's bad happening with GLES, @florianpenzkofer any ideas?
     
  8. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    479
    Code looks like it would crash with this callstack if glGetString(GL_RENDERER) returns NULL.
    But if that‘s the case something went wrong earlier during startup.
     
  9. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    Why can it return null, in what circumstances? How can I prevent this? Why is this not an issue for Unity 2018.4?

    What can go wrong? Does this initialization happen before any code in scripts?
     
  10. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
  11. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    479
    It returns NULL if we were not able to create a valid OpenGLES/EGL context. It might happen when the system is very resource constrained. It might also be caused by a bug.

    Yes this happens before any script code runs and before anything is rendered using Unity (but there may be native Android UI and Java plugin code running before that).

    We should not crash when this happens and instead we should show an error dialog. But that won't solve the underlying issue.
     
    ROBYER1 likes this.
  12. rysenko

    rysenko

    Joined:
    Sep 6, 2015
    Posts:
    5
    I'm facing thousands of these errors on user devices (seen both in Google Play and in Crashlytics) since update from Unity 2018 to Unity 2020. I'm using Unity 2020.3.34 now and build is done on macOS. Happens on wide range of devices, but Google Play mostly reports Huawei devices.

    Stack trace is as follows:
    Code (CSharp):
    1. Caused by java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    2. Version '2020.3.34f1 (9a4c9c70452b)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
    3. Build fingerprint: 'samsung/a31xx/a31:11/RP1A.200720.012/A315FXXU1CUK4:user/release-keys'
    4. Revision: '3'
    5. ABI: 'arm64'
    6. Timestamp: 2022-06-26 12:39:30+0300
    7. pid: 10269, tid: 12315, name: UnityMain  >>> bundle.id <<<
    8. uid: 10255
    9. signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
    10. Cause: null pointer dereference
    11.     x0  0000000000000000  x1  0000007bd6e5188e  x2  0000007cdcf4a627  x3  0000000000000005
    12.     x4  0000000000000000  x5  0000aa0000101000  x6  0000000000000000  x7  ff7f7f7fffff7fff
    13.     x8  0000000000000041  x9  e12b387ceabd4dae  x10 0000000000000000  x11 0000007bde90e071
    14.     x12 0000000000000000  x13 0000000000000047  x14 0000000000000001  x15 00003e04809d99b9
    15.     x16 0000007cdcf7d9b0  x17 0000007cdcf55670  x18 000000007c5ec72c  x19 0000007bde90e180
    16.     x20 0000007b30d39c18  x21 0000007b302cefc0  x22 0000000000000000  x23 0000000000000001
    17.     x24 0000007bde90ee10  x25 0000007bde910000  x26 0000007bde910000  x27 0000007bde90e8c0
    18.     x28 0000000000000001  x29 0000000000000001
    19.     sp  0000007bde90e100  lr  0000007bd626037c  pc  0000007bd60bed48
    20. backtrace:
    21.       #00 pc 00000000005bad48 (BeginsWith(char const*, char const*) at ??:?)  /data/app/~~qFH1LQV0MwsoUCykyBnTqw==/bundle.id-Pn6SiNxzh4Yy6Zyhw2vKvg==/lib/arm64/libunity.so (BuildId: 53994a4518c674de19e889c82b6bb22a2875a971)
    22.       #01 pc 000000000075c378 (ApiGLES::FillExtensions(dynamic_array<core::basic_string_ref<char>, 0ul>&) at ??:?)  /data/app/~~qFH1LQV0MwsoUCykyBnTqw==/bundle.id-Pn6SiNxzh4Yy6Zyhw2vKvg==/lib/arm64/libunity.so (BuildId: 53994a4518c674de19e889c82b6bb22a2875a971)
    23.       #02 pc 000000000075c028 (ApiGLES::Init(GfxContextGLES const&, GfxDeviceLevelGL&) at ??:?)  /data/app/~~qFH1LQV0MwsoUCykyBnTqw==/bundle.id-Pn6SiNxzh4Yy6Zyhw2vKvg==/lib/arm64/libunity.so (BuildId: 53994a4518c674de19e889c82b6bb22a2875a971)
    24.       #03 pc 000000000074b4cc (GfxDeviceGLES::Init(GfxDeviceLevelGL) at ??:?)  /data/app/~~qFH1LQV0MwsoUCykyBnTqw==/bundle.id-Pn6SiNxzh4Yy6Zyhw2vKvg==/lib/arm64/libunity.so (BuildId: 53994a4518c674de19e889c82b6bb22a2875a971)
    25.       #04 pc 000000000074ab1c  /da<truncated: 1613 chars>
    26.        at libunity.0x5bad48()
    27.        at libunity.0x75c378()
    28.        at libunity.0x75c028()
    29.        at libunity.0x74b4cc()
    30.        at libunity.0x74ab1c()
    31.        at libunity.0x3ddc08()
    32.        at libunity.0x8f2504()
    33.        at libunity.0x8f276c()
    34.        at libunity.0x6a8c5c()
    35.        at libunity.0x6928f4()
    36.        at libunity.0x6934a4()
    37.        at libunity.0x6aaa10()
    38.        at base.0xc79ac()
     
    Petr777, D_Cergy, sogonen and 2 others like this.
  13. sogonen

    sogonen

    Joined:
    Mar 3, 2017
    Posts:
    6
    We have been getting the same error almost a year now we asked help about it on this thread https://answers.unity.com/questions/1774444/signal-11-sigsegv-code-1-segv-maperr-fault-addr-0x.html

    And after reading mac build may solve it we have migrated our project to mac and got a build from there with the error below again. This seem to be a very common error on all versions of unity 2020.3 and idk how come we can't find a solution for it this long.

    Code (CSharp):
    1. java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    2. Version '2020.3.30f1 (1fb1bf06830e)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'armeabi-v7a'
    3. Build fingerprint: 'samsung/a10sxx/a10s:11/RP1A.200720.012/A107FXXU8CUL2:user/release-keys'
    4. Revision: '0'
    5. ABI: 'arm'
    6. Timestamp: 2022-06-28 12:23:03+0200
    7. pid: 11086, tid: 13082, name: Thread-86  >>>xxxxxxxxxxxxx <<<
    8. uid: 10375
    9. signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x2a
    10. Cause: null pointer dereference
    11. r0  00000000  r1  ae0a0ae0  r2  8abc8910  r3  8abc89fc
    12. r4  8abc89fc  r5  00000000  r6  00000000  r7  8abc8910
    13. r8  00000003  r9  98070800  r10 00000000  r11 13900a20
    14. ip  af3ad36c  sp  8abc88c0  lr  af950983  pc  ae0d7aa4
    15. backtrace:
    16.   at
    17.   at libil2cpp.0x2cbaa4 (Native Method)
     
    Last edited: Jul 1, 2022
  14. Warmacha

    Warmacha

    Joined:
    Dec 13, 2015
    Posts:
    30
    Getting this crash again on 2021.3.7f1

     
    gamedev_co likes this.
  15. CameronDWills

    CameronDWills

    Joined:
    Feb 26, 2021
    Posts:
    91
    I'm getting this error as well. Previous builds worked fine, the only thing I've changed since the previous build is I've added Unity Mediation. I'm using Unity 2022.1.14f1

    Code (CSharp):
    1. FATAL EXCEPTION: UnityMain
    2. java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    3. Version '2022.1.14f1 (ff7e140968b4)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
    4. Build fingerprint: 'google/oriole/oriole:12/SQ1D.220205.004/8151327:user/release-keys'
    5. Revision: 'MP1.0'
    6. ABI: 'arm64'
    7. Timestamp: 2022-08-29 08:56:25-0700
    8. pid: 19661, tid: 19683, name: UnityMain
    9. uid: 10233
    10. signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
    11. Cause: null pointer dereference
    12.     x0  0000000000000000  x1  0000000000000010  x2  0000000000000010  x3  000000000000000c
    13.     x4  0000000000000000  x5  000000740eb5861d  x6  0000000000000000  x7  0000000000000001
    14.     x8  00000073e000f360  x9  0000000000000a7a  x10 0000000000000000  x11 0000000000000000
    15.     x12 0000000000000527  x13 0000000000000000  x14 0000000000000526  x15 00000002e3998bb0
    16.     x16 000000740eed1cb8  x17 000000771fb31680  x18 0000007407668000  x19 000000738003ca20
    17.     x20 000000740dbc47c0  x21 0000000000000000  x22 000000740dbc4719  x23 0000000000000001
    18.     x24 b4000074f65f6ec0  x25 0000000000000000  x26 0000000000000018  x27 000000740dbc4d90
    19.     x28 000000740ec01e75  x29 0000000000000049
    20.     sp  000000740dbc4650  lr  000000740df97680  pc  000000771fb31690
    21. backtrace:
    22.       #00 pc 0000000000049690  /apex/com.android.runtime/lib64/bionic/libc.so (__strlen_aarch64+16) (BuildId: 28943f8bb3b7b23557619af9a38223c5)
    23.       #01 pc 00000000003cd67c  /data/app/~~BaT1HLkuhvyckhznJTajfQ==/-onwunts25lvnXm2ED85_Pw==/split_config.arm64_v8a.apk (BuildId: a5967d7e23ae3fd72044f366f964aedfefea1098)
    24.       #02 pc 00000000003c8770  /data/app/~~BaT1HLkuhvyckhznJTajfQ==/-onwunts25lvnXm2ED85_Pw==/split_config.arm64_v8a.apk (BuildId: a5967d7e23ae3fd72044f366f964aedfefea1098)
    25.       #03 pc 00000000003b4d10  /data/app/~~BaT1HLkuhvyckhznJTajfQ==/-onwunts25lvnXm2ED85_Pw==/split_config.arm64_v8a.apk (BuildId: a5967d7e23ae3fd72044f366f964aedfefea1098)
    26.       #04 pc 00000000003b65ac  /data/app/~~BaT1HLkuhvyckhznJTajfQ==/-onwunts25lvnXm2ED85_Pw==/split_config.arm64_v8a.apk (BuildId: a5967d7e23ae3fd72044f366f964aedfefea1098)
    27.       #05 pc 00000000003cdf84  /data/app/~~BaT1HLkuhvyckhznJTajfQ==/-onwunts25lvnXm2ED85_Pw==/split_config.arm64_v8a.apk (BuildId: a5967d7e23ae3fd72044f366f964aedfefea1098)
    28.       #06 pc 0000000000222244  /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148) (BuildId: e6c658201ef1ec3760112fa1b838ab2c)
    29.       #07 pc 0000000000212520  /apex/com.android.art/lib64/libart.so (nterp_helper+4016) (BuildId: e6c658201ef1ec3760112fa1b838ab2c)
    30.       #08 pc 00000000002115a4  /apex/com.android.art/lib64/libart.so (nterp_helper+52) (BuildId: e6c658201ef1ec3760112fa1b838ab2c)
    31.       #09 pc 00000000004efe70  /system/framework/arm64/boot-framework.oat (BuildId: b475cc2538d0c50ace3ee34f4ccdf79c9b7101d2)
    32.     at libc.__strlen_aarch64(__strlen_aarch64:16)
    33.     at split_config.0x3cd67c(Native Method)
    34.     at split_config.0x3c8770(Native Method)
    35.     at split_config.0x3b4d10(Native Method)
    36.     at split_config.0x3b65ac(Native Method)
    37.     at split_config.0x3cdf84(Native Method)
    38.     at libart.art_quick_generic_jni_trampoline(art_quick_generic_jni_trampoline:148)
    39.     at libart.nterp_helper(nterp_helper:4016)
    40.     at libart.nterp_helper(nterp_helper:52)
    41.     at boot-framework.0x4efe70(Native Method)
     
    Last edited: Aug 30, 2022
    shikharchaurasia likes this.
  16. MacroPinch

    MacroPinch

    Joined:
    Dec 6, 2013
    Posts:
    43
    I'm seeing the same crash using Unity 2022.1.16 on Google Pixel 1

    upload_2022-9-14_12-55-21.png

    Code (CSharp):
    1. 09-14 12:35:40.499 32735   373 E AndroidRuntime: FATAL EXCEPTION: UnityMain
    2. 09-14 12:35:40.499 32735   373 E AndroidRuntime: Process: com.nosixfive.chaos, PID: 32735
    3. 09-14 12:35:40.499 32735   373 E AndroidRuntime: java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    4. 09-14 12:35:40.499 32735   373 E AndroidRuntime: Version '2022.1.16f1 (7321c9670bc2)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
    5. 09-14 12:35:40.499 32735   373 E AndroidRuntime: Build fingerprint: 'google/sailfish/sailfish:10/QP1A.191005.007.A3/5972272:user/release-keys'
    6. 09-14 12:35:40.499 32735   373 E AndroidRuntime: Revision: '0'
    7. 09-14 12:35:40.499 32735   373 E AndroidRuntime: ABI: 'arm64'
    8. 09-14 12:35:40.499 32735   373 E AndroidRuntime: Timestamp: 2022-09-14 12:35:40+0300
    9. 09-14 12:35:40.499 32735   373 E AndroidRuntime: pid: 32735, tid: 373, name: UnityMain  >>> com.nosixfive.chaos <<<
    10. 09-14 12:35:40.499 32735   373 E AndroidRuntime: uid: 11059
    11. 09-14 12:35:40.499 32735   373 E AndroidRuntime: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
    12. 09-14 12:35:40.499 32735   373 E AndroidRuntime: Cause: null pointer dereference
    13. 09-14 12:35:40.499 32735   373 E AndroidRuntime:     x0  0000000000000000  x1  0000000000000010  x2  0000000000000010  x3  000000000000000c
    14. 09-14 12:35:40.499 32735   373 E AndroidRuntime:     x4  0000000000000000  x5  000000753eea5ead  x6  0000000000000000  x7  0000000000000001
    15. 09-14 12:35:40.499 32735   373 E AndroidRuntime:     x8  0101010101010101  x9  000000000000041a  x10 0000000000000000  x11 0000000000000000
    16. 09-14 12:35:40.499 32735   373 E AndroidRuntime:     x12 0000000000000525  x13 0000000000000000  x14 0000000000000524  x15 000000000000000a
    17. 09-14 12:35:40.499 32735   373 E AndroidRuntime:     x16 000000753f1c8128  x17 000000762c08ade0  x18 000000753997e000  x19 00000074b003ca20
    18. 09-14 12:35:40.499 32735   373 E AndroidRuntime:     x20 0000007539d0ab20  x21 0000000000000000  x22 0000007539d0aa79  x23 0000000000000001
    19. 09-14 12:35:40.499 32735   373 E AndroidRuntime:     x24 0000000000000004  x25 0000007539d0d020  x26 0000000000000018  x27 0000007539d0b0f0
    20. 09-14 12:35:40.499 32735   373 E AndroidRuntime:     x28 000000753ef47b25  x29 0000000000000049
    21. 09-14 12:35:40.499 32735   373 E AndroidRuntime:     sp  0000007539d0a9b0  lr  000000753e44f7fc  pc  000000762c08adf0
    22. 09-14 12:35:40.499 32735   373 E AndroidRuntime:
    23. 09-14 12:35:40.499 32735   373 E AndroidRuntime: backtrace:
    24. 09-14 12:35:40.499 32735   373 E AndroidRuntime:       #00 pc 000000000007edf0  /apex/com.android.runtime/lib64/bionic/libc.so (strlen+16) (BuildId: 5812256023147338b8a9538321d4c456)
    25. 09-14 12:35:40.499 32735   373 E AndroidRuntime:       #01 pc 00000000003877f8  /data/app/com.nosixfive.chaos-0tk2vNw-KbJ94PMGqlLfGA==/lib/arm64/libunity.so (BuildId: 95b88d0de953e908d43f29bd61e549ff273524fd)
    26. 09-14 12:35:40.499 32735   373 E AndroidRuntime:       #02 pc 00000000003828ec  /data/app/com.nosixfive.chaos-0tk2vNw-KbJ94PMGqlLfGA==/lib/arm64/libunity.so (BuildId: 95b88d0de953e908d43f29bd61e549ff273524fd)
    27. 09-14 12:35:40.499 32735   373 E AndroidRuntime:       #03 pc 00000000003711b4  /data/app/com.nosixfive.chaos-0tk2vNw-KbJ94PMGqlLfGA==/lib/arm64/libunity.so (BuildId: 95b88d0de953e908d43f29bd61e549ff273524fd)
    28. 09-14 12:35:40.499 32735   373 E AndroidRuntime:       #04 pc 0000000000372aa4  /data/app/com.nosixfive.chaos-0tk2vNw-KbJ94PMGqlLfGA==/lib/arm64/libunity.so (BuildId: 95b88d0de953e908d43f29bd61e549ff273524fd)
    29. 09-14 12:35:40.499 32735   373 E AndroidRuntime:       #05 pc 0000000000388300  /data/app/com.nosixfive.chaos-0tk2vNw-KbJ94PMGqlLfGA==/lib/arm64/libunity.so (BuildId: 95b88d0de953e908d43f29bd61e549ff273524fd)
    30. 09-14 12:35:40.499 32735   373 E AndroidRuntime:       #06 pc 00000000000111fc  /data/app/com.nosixfive.chaos-0tk2vNw-KbJ94PMGqlLfGA==/oat/arm64/base.odex
    31. 09-14 12:35:40.499 32735   373 E AndroidRuntime:
    32. 09-14 12:35:40.499 32735   373 E AndroidRuntime:        at libc.strlen(strlen:16)
    33. 09-14 12:35:40.499 32735   373 E AndroidRuntime:        at libunity.0x3877f8(Native Method)
    34. 09-14 12:35:40.499 32735   373 E AndroidRuntime:        at libunity.0x3828ec(Native Method)
    35. 09-14 12:35:40.499 32735   373 E AndroidRuntime:        at libunity.0x3711b4(Native Method)
    36. 09-14 12:35:40.499 32735   373 E AndroidRuntime:        at libunity.0x372aa4(Native Method)
    37. 09-14 12:35:40.499 32735   373 E AndroidRuntime:        at libunity.0x388300(Native Method)
    38. 09-14 12:35:40.499 32735   373 E AndroidRuntime:        at base.0x111fc(Native Method)
     
  17. MacroPinch

    MacroPinch

    Joined:
    Dec 6, 2013
    Posts:
    43
    Found the problem in my case.
    It seems like Unity is using internally com.google.android.play:core android library. In February this library was split in 3 smaller libraries and I started using one of them (com.google.android.play:asset-delivery) in my custom code for Play Asset Delivery.

    It looks like some collision between these libraries is happening, because I see the following 2 gradle warnings during the build process

    Code (CSharp):
    1. [com.google.android.play:asset-delivery:2.0.0] C:\Users\Baceto\.gradle\caches\transforms-3\c4b6775b2416107bb62776bd67542083\transformed\jetified-asset-delivery-2.0.0\AndroidManifest.xml Warning:
    2.         Namespace 'com.google.android.play.core.client' used in: com.google.android.play:asset-delivery:2.0.0, com.google.android.play:core-common:2.0.0.
    Code (CSharp):
    1. WARNING:R8: Missing class com.google.android.play.core.tasks.OnCompleteListener (referenced from: void com.unity3d.player.a.a(java.lang.String[], com.unity3d.player.IAssetPackManagerDownloadStatusCallback) and 3 other contexts)
    2. Missing class com.google.android.play.core.tasks.OnSuccessListener (referenced from: void com.unity3d.player.a.a(android.app.Activity, com.unity3d.player.IAssetPackManagerMobileDataConfirmationCallback) and 1 other context)
    3. Missing class com.google.android.play.core.tasks.RuntimeExecutionException (referenced from: void com.unity3d.player.a$d.onComplete(com.google.android.play.core.tasks.Task) and 1 other context)
    4. Missing class com.google.android.play.core.tasks.Task (referenced from: void com.unity3d.player.a$d.onComplete(com.google.android.play.core.tasks.Task) and 6 other contexts)

    What I did to fix the native unity crash is replace the new play:asset-delivery lib with the old one play:core in my code
     
    Last edited: Sep 15, 2022
  18. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    Do you have any updates on this crash? It is now top-1 in our Google Play Console after upgrading from Unity 2018 to Unity 2021. It prevents us from rolling out the new build to a wider audience.

    Code (csharp):
    1.  
    2. 0x002e266c: BeginsWith(char const*, char const*) at ??:?
    3. 0x00803d20: ApiGLES::FillExtensions(dynamic_array<core::basic_string_ref<char>, 0u>&) at ??:?
    4. 0x00803980: ApiGLES::Init(GfxContextGLES const&, GfxDeviceLevelGL&) at ??:?
    5. 0x007f168c: GfxDeviceGLES::Init(GfxDeviceLevelGL) at ??:?
    6. 0x007f0c9c: CreateGLESGfxDevice(GfxDeviceRenderer) at ??:?
    7. 0x003ca9b5: CreateClientGfxDevice(GfxDeviceRenderer, GfxCreateDeviceFlags) at ??:?
    8. 0x007dd460: CreateGfxDevice(GfxDeviceRenderer, GfxCreateDeviceFlags) at ??:?
    9. 0x007dd720: InitializeGfxDevice() at ??:?
    10. 0x003a7d7f: AndroidGraphics::Startup() at ??:?
    11. 0x00398c1f: UnityInitApplication() at ??:?
    12. 0x00399811: UnityPlayerLoop() at ??:?
    13. 0x003a951d: nativeRender(_JNIEnv*, _jobject*) at ??:?
    14.  
     
  19. gamedev_co

    gamedev_co

    Joined:
    Apr 16, 2021
    Posts:
    7
    We are facing the same issue with Unity 2021.3.7f1
     
    CunningFox146 and Qbit86 like this.
  20. tom-teleportal

    tom-teleportal

    Joined:
    Apr 4, 2017
    Posts:
    10
    Same issue with our app from Unity 2021.3.4f1. This crash is affecting about 32% of our Android users.
     
    CunningFox146 and Qbit86 like this.
  21. am1goo_43

    am1goo_43

    Joined:
    Sep 8, 2020
    Posts:
    7
    Looks like it is a same issue with different reason in Unity 2020.3.40f1. Any one know why?

    Code (CSharp):
    1. 2022/10/19 11:32:06.099 1964 2037 Error CRASH Version '2020.3.40f1 (ba48d4efcef1)', Build type 'Development', Scripting Backend 'mono', CPU 'armeabi-v7a'
    2. 2022/10/19 11:32:06.099 1964 2037 Error CRASH Build fingerprint: 'realme/RMX2063RU/RMX2063L1:10/QKQ1.191222.002/1600711782:user/release-keys'
    3. 2022/10/19 11:32:06.099 1964 2037 Error CRASH Revision: '0'
    4. 2022/10/19 11:32:06.099 1964 2037 Error CRASH ABI: 'arm'
    5. 2022/10/19 11:32:06.099 1964 2037 Error CRASH Timestamp: 2022-10-19 11:32:06+0300
    6. 2022/10/19 11:32:06.099 1964 2037 Error CRASH pid: 1964, tid: 2037, name: UnityMain  >>> com.gaijin.Voxel <<<
    7. 2022/10/19 11:32:06.099 1964 2037 Error CRASH uid: 10232
    8. 2022/10/19 11:32:06.099 1964 2037 Error CRASH signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
    9. 2022/10/19 11:32:06.099 1964 2037 Error CRASH Cause: null pointer dereference
    10. 2022/10/19 11:32:06.099 1964 2037 Error CRASH     r0  c121d400  r1  00ffffe9  r2  00000001  r3  00ffffdc
    11. 2022/10/19 11:32:06.099 1964 2037 Error CRASH     r4  00000000  r5  00000000  r6  00000000  r7  00339aa8
    12. 2022/10/19 11:32:06.099 1964 2037 Error CRASH     r8  00000010  r9  00340000  r10 eeb3717c  r11 bf901180
    13. 2022/10/19 11:32:06.099 1964 2037 Error CRASH     ip  000000ff  sp  bd97aa70  lr  be44fdc3  pc  bf073da2
    14. 2022/10/19 11:32:06.099 1964 2037 Error CRASH
    15. 2022/10/19 11:32:06.099 1964 2037 Error CRASH backtrace:
    16. 2022/10/19 11:32:06.099 1964 2037 Error CRASH       #00 pc 01016da2  /data/app/com.gaijin.Voxel-OX8bNuI-9NkYGkp0H8kdzw==/lib/arm/libunity.so
    17. 2022/10/19 11:32:06.099 1964 2037 Error CRASH       #01 pc 003f2dc1  /data/app/com.gaijin.Voxel-OX8bNuI-9NkYGkp0H8kdzw==/lib/arm/libunity.so
    18. 2022/10/19 11:32:06.099 1964 2037 Error CRASH       #02 pc 003e3a55  /data/app/com.gaijin.Voxel-OX8bNuI-9NkYGkp0H8kdzw==/lib/arm/libunity.so
    19. 2022/10/19 11:32:06.099 1964 2037 Error CRASH       #03 pc 003e3b79  /data/app/com.gaijin.Voxel-OX8bNuI-9NkYGkp0H8kdzw==/lib/arm/libunity.so
    20. 2022/10/19 11:32:06.099 1964 2037 Error CRASH       #04 pc 003e0905  /data/app/com.gaijin.Voxel-OX8bNuI-9NkYGkp0H8kdzw==/lib/arm/libunity.so
    21. 2022/10/19 11:32:06.099 1964 2037 Error CRASH       #05 pc 0089fb4b  /data/app/com.gaijin.Voxel-OX8bNuI-9NkYGkp0H8kdzw==/lib/arm/libunity.so
    22. 2022/10/19 11:32:06.099 1964 2037 Error CRASH       #06 pc 0001cc6e  <anonymous:93623000>
    23. 2022/10/19 11:32:06.099 1964 2037 Error CRASH
    24. 2022/10/19 11:32:06.099 1964 2037 Error CRASH managed backtrace:
    25. 2022/10/19 11:32:06.099 1964 2037 Error CRASH       #00 (wrapper managed-to-native) Unity.Collections.LowLevel.Unsafe.UnsafeUtility:Malloc (long,int,Unity.Collections.Allocator)
    26. 2022/10/19 11:32:06.099 1964 2037 Error CRASH       #01 Unity.Collections.NativeArray`1<OptIn.Voxel.VoxelMeshBuilder/NativeMeshData/VertexData>:Allocate (int,Unity.Collections.Allocator,Unity.Collections.NativeArray`1<OptIn.Voxel.VoxelMeshBuilder/NativeMeshData/VertexData>&) </home/bokken/build/output/unity/unity/Runtime/Export/NativeArray/NativeArray.cs:100>
    27. 2022/10/19 11:32:06.099 1964 2037 Error CRASH       #02 Unity.Collections.NativeArray`1<OptIn.Voxel.VoxelMeshBuilder/NativeMeshData/VertexData>:.ctor (int,Unity.Collections.Allocator,Unity.Collections.NativeArrayOptions) </home/bokken/build/output/unity/unity/Runtime/Export/NativeArray/NativeArray.cs:57>
    28. 2022/10/19 11:32:06.099 1964 2037 Error CRASH       #03 OptIn.Voxel.VoxelMeshBuilder/NativeMeshData:.ctor (Unity.Mathematics.int3,int,int) <F:\Projects\voxelgrounds\Assets\Scripts\Voxel\VoxelMeshBuilder.cs:139>
    29. 2022/10/19 11:32:06.099 1964 2037 Error CRASH       #04 Chunk/<RebuildMeshes>d__93:MoveNext () <F:\Projects\voxelgrounds\Assets\Scripts\Chunk\Chunk.cs:394>
    30. 2022/10/19 11:32:06.099 1964 2037 Error CRASH       #05 UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr) </home/bokken/build/output/unity/unity/Runtime/Export/Scripting/Coroutines.cs:17>
    31. 2022/10/19 11:32:06.099 1964 2037 Error CRASH       #06 (wrapper runtime-invoke) <Module>:runtime_invoke_void_object_intptr (object,intptr,intptr,intptr)
    32.  
     
  22. tom-teleportal

    tom-teleportal

    Joined:
    Apr 4, 2017
    Posts:
    10
    @florianpenzkofer are there any updates on this or a workaround we can do? About a third of our Android users are still crashing with `null pointer dereference` . Unity 2021.3.9f1.
     
    arufolo-wellovate, grimjim and Qbit86 like this.
  23. Tomsterk

    Tomsterk

    Joined:
    Nov 23, 2012
    Posts:
    10
    I am seeing the same issue after upgrading my personal testing device to Pixel 7 Pro. In order to build to Pixel 7, we are required to use IL2CPP instead of mono, since Pixel 7 requires ARM64 (no 32 bit apps). I can confirm this is also crashing on my old device under the same settings (Pixel 4a).

    we are using OpenGLES3 and no other graphics APIs.

    We are using 2020.3.39f1

    Here are my crash results:

    Mono + ARMv7 (64 not available on mono): No crash
    IL2CPP + ARMv7: No crash
    IL2CPP + ARMv7 + ARM64: Crash
    IL2CPP + ARM64: No crash on either device

    There seems to be an issue when building an APK with both architectures.

    for posterity


    SystemInfo CPU = ARM64 FP ASIMD AES, Cores = 8, Memory = 11422mb

    10-28 14:10:38.852 20067 20099 I Unity : SystemInfo ARM big.LITTLE configuration: 4 big (mask: 0xf0), 4 little (mask: 0xf)

    10-28 14:10:38.852 20067 20099 I Unity : ApplicationInfo com.[hidden for forum] version 0.22 build c71effe0-3409-432f-8218-16f2b251d631

    10-28 14:10:38.852 20067 20099 I Unity : Built from '2020.3/staging' branch, Version '2020.3.39f1 (fd6670bb8be9)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a', Stripping 'Enabled'

    10-28 14:10:38.868 20067 20099 E CRASH : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

    10-28 14:10:38.868 20067 20099 E CRASH : Version '2020.3.39f1 (fd6670bb8be9)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'

    10-28 14:10:38.868 20067 20099 E CRASH : Build fingerprint: 'google/cheetah/cheetah:13/TD1A.220804.009.A2/8940162:user/release-keys'

    10-28 14:10:38.868 20067 20099 E CRASH : Revision: 'MP1.0'

    10-28 14:10:38.868 20067 20099 E CRASH : ABI: 'arm64'

    10-28 14:10:38.869 20067 20099 E CRASH : Timestamp: 2022-10-28 14:10:38-0400

    10-28 14:10:38.869 20067 20099 E CRASH : pid: 20067, tid: 20099, name: UnityMain >>> com.[hidden for forum] <<<

    10-28 14:10:38.869 20067 20099 E CRASH : uid: 10392

    10-28 14:10:38.869 20067 20099 E CRASH : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xa

    10-28 14:10:38.869 20067 20099 E CRASH : Cause: null pointer dereference

    10-28 14:10:38.869 20067 20099 E CRASH : x0 0000000000000002 x1 0000007531343f38 x2 b40000769f8cf0c0 x3 0000000000000000

    10-28 14:10:38.869 20067 20099 E CRASH : x4 b40000769f8cf0c0 x5 0000007531343f28 x6 b40000761f8eab50 x7 b40000769f8cee10

    10-28 14:10:38.869 20067 20099 E CRASH : x8 0000000000000013 x9 0000000000000002 x10 000000000000004c x11 000000000000004d

    10-28 14:10:38.869 20067 20099 E CRASH : x12 0000000000000002 x13 000000752ccc3738 x14 0000000000000004 x15 0000000000000000

    10-28 14:10:38.869 20067 20099 E CRASH : x16 000000752ce16dd8 x17 000000785fe71e20 x18 000000005638db18 x19 ec0a034343bb4e21

    10-28 14:10:38.869 20067 20099 E CRASH : x20 0000000000000001 x21 b400007523b3f488 x22 000000001cfaa2db x23 000000752cfc4000

    10-28 14:10:38.869 20067 20099 E CRASH : x24 000000752cfc4000 x25 00000000000007ff x26 0000000000000002 x27 0000007523b39340

    10-28 14:10:38.869 20067 20099 E CRASH : x28 0000007523b39344 x29 0000007531343d80

    10-28 14:10:38.869 20067 20099 E CRASH : sp 0000007531343d50 lr 000000752abf284c pc 000000752abf259c
     
    Haraven likes this.
  24. tom-teleportal

    tom-teleportal

    Joined:
    Apr 4, 2017
    Posts:
    10
    Thx for sharing. We haven't been able to reproduce the crash locally (same with other devs in this thread) so this is interesting. We are also using OpenGLES3 only on Android and targeting ARMv7 + ARM64 with IL2CPP and are not experiencing the crash. Some of our test devices are:
    - Samsung Galaxy Fold3 (Android 12)
    - Samsung Galaxy Tab A7 (Android 11)
    - Samsung Galaxy Note 10+
    - Google Pixel 2 XL (Android 9)
    - OnePlus Nord N200

    Do any of the build settings shown in the screenshots differ from yours @Tomsterk?
     

    Attached Files:

  25. Tomsterk

    Tomsterk

    Joined:
    Nov 23, 2012
    Posts:
    10

    They are slightly different
     

    Attached Files:

  26. tom-teleportal

    tom-teleportal

    Joined:
    Apr 4, 2017
    Posts:
    10
    I'll try to reproduce a crash with our project using your settings.
     
  27. tom-teleportal

    tom-teleportal

    Joined:
    Apr 4, 2017
    Posts:
    10
    Unable to reproduce a crash using those settings on Unity 2021.3.11f1 with Google Pixel 2 XL (Android 9) or Samsung Galaxy Fold3 (Android 12).
     
    Tommy-Angelo likes this.
  28. mmomin_504

    mmomin_504

    Joined:
    May 8, 2021
    Posts:
    14
    I fixed it by setting Minimum API Level to Android 4.4(API Level 20) in build settings. I hope this will fix the issue at your end too.:)
     
  29. tom-teleportal

    tom-teleportal

    Joined:
    Apr 4, 2017
    Posts:
    10
    Interesting. I wonder if this is worked around using `androidx.*` compatibility libraries. We can't go that low unfortunately due to other libraries that are using newer Android APIs.
     
  30. Robotec555

    Robotec555

    Joined:
    Feb 11, 2022
    Posts:
    5
    Same issue with unity 2021.3.11f1. The problem seams to be starting with showing error
    Code (CSharp):
    1. Error SwappyVk Failed to vkQueueSubmit 5
    then
    Code (CSharp):
    1. 2022/11/27 18:22:44.824 30176 30339 Error CRASH Version '2021.3.11f1 (0a5ca18544bf)', Build type 'Development', Scripting Backend 'mono', CPU 'armeabi-v7a'
    2. 2022/11/27 18:22:44.824 30176 30339 Error CRASH Build fingerprint: 'samsung/starqltesq/starqltesq:10/QP1A.190711.020/G960USQS7DTE1:user/release-keys'
    3. 2022/11/27 18:22:44.824 30176 30339 Error CRASH Revision: '14'
    4. 2022/11/27 18:22:44.824 30176 30339 Error CRASH ABI: 'arm'
    5. 2022/11/27 18:22:44.824 30176 30339 Error CRASH Timestamp: 2022-11-27 18:22:44+0300
    6. 2022/11/27 18:22:44.824 30176 30339 Error CRASH pid: 30176, tid: 30339, name: UnityMain  >>> com.robotec.racetrack <<<
    7. 2022/11/27 18:22:44.824 30176 30339 Error CRASH uid: 10560
    8. 2022/11/27 18:22:44.824 30176 30339 Error CRASH signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x70
    9. 2022/11/27 18:22:44.824 30176 30339 Error CRASH Cause: null pointer dereference
    10. 2022/11/27 18:22:44.824 30176 30339 Error CRASH     r0  00000070  r1  00000008  r2  b102da00  r3  00000000
    11. 2022/11/27 18:22:44.824 30176 30339 Error CRASH     r4  00000008  r5  00000000  r6  00000070  r7  b9537018
    12. 2022/11/27 18:22:44.824 30176 30339 Error CRASH     r8  00000000  r9  b95371f0  r10 b567d788  r11 00000000
    13. 2022/11/27 18:22:44.824 30176 30339 Error CRASH     ip  bb8ebb38  sp  b9537008  lr  bb552731  pc  eadf851c
    14.  
    Why is unity full of bugs?
     
  31. Robotec555

    Robotec555

    Joined:
    Feb 11, 2022
    Posts:
    5
    I found this guy talking on google issuetracker, suggesting disabling optimized Frame Pacing
    Code (CSharp):
    1. I found out that this is due to an incompatibility between Adaptime Performance and Unity 2019's Optimized Frame Pacing feature.
    2.  
    3. I found the following instructions in the documentation (https://docs.unity3d.com/Packages/com.unity.adaptiveperformance.samsung.android@4.0/manual/vrr.html):
    4. Adapitve Performance and Variable Refresh Rate is not compatible with framce pacing and we recommend to dissable Optimized Frame Pacing under Edit > Project Settings > Player > Resolution and Presentation.
    5.  
    6. So you don't need to track this issue, thank you for your attention and dedication!
    So, I did what he suggested and now no longer this error is showing again, but I got another warning
    Code (CSharp):
    1. 2022/11/27 18:41:06.358 1880 2161 Warn Adreno-GSL <gsl_ldd_control:549>: ioctl fd 86 code 0xc040094a (IOCTL_KGSL_GPU_COMMAND) failed: errno 35 Resource deadlock would occur
    2. 2022/11/27 18:41:06.358 1880 2161 Warn Adreno-GSL <log_gpu_snapshot:458>: panel.gpuSnapshotPath is not set.not generating user snapshot
    3.  
    which keeps on overloading the whole android logcat. The game gradually gets jittery before crashing and closing with allocation error as below
    Code (CSharp):
    1. 2022/11/27 18:41:40.056 1880 2161 Error Unity Could not allocate memory: System out of memory!
    2. 2022/11/27 18:41:40.056 1880 2161 Error Unity Trying to allocate: 8519680B with 16 alignment. MemoryLabel: NewDelete
    3. 2022/11/27 18:41:40.056 1880 2161 Error Unity Allocation happened at: Line:0 in Overloaded New
    4. 2022/11/27 18:41:40.056 1880 2161 Error Unity Memory overview
    5. 2022/11/27 18:41:40.056 1880 2161 Error Unity
    6. 2022/11/27 18:41:40.056 1880 2161 Error Unity [ ALLOC_TEMP_TLS ] used: 32832B | peak: 0B | reserved: 6914048B
    7. 2022/11/27 18:41:40.056 1880 2161 Error Unity [ ALLOC_MEMORYPROFILER ] used: 452312B | peak: 452312B | reserved: 1048576B
    8. 2022/11/27 18:41:40.056 1880 2161 Error Unity [ ALLOC_DEFAULT ] used: 113316816B | peak: 0B | reserved: 142745600B
    9. 2022/11/27 18:41:40.056 1880 2161 Error Unity [ ALLOC_TEMP_JOB_1_FRAME ] used: 0B | peak: 0B | reserved: 2097152B
    10. 2022/11/27 18:41:40.056 1880 2161 Error Unity [ ALLOC_TEMP_JOB_2_FRAMES ] used: 0B | peak: 0B | reserved: 2097152B
    11. 2022/11/27 18:41:40.056 1880 2161 Error Unity [ ALLOC_TEMP_JOB_4_FRAMES (JobTemp) ] used: 0B | peak: 0B | reserved: 4194304B
    12. 2022/11/27 18:41:40.056 1880 2161 Error Unity [ ALLOC_TEMP_JOB_ASYNC (Background) ] used: 0B | peak: 0B | reserved: 9437184B
    13. 2022/11/27 18:41:40.056 1880 2161 Error Unity [ ALLOC_GFX ] used: 448160B | peak: 0B | reserved: 33554432B
    14. 2022/11/27 18:41:40.056 1880 2161 Error Unity [ ALLOC_CACHEOBJECTS ] used: 16486972B | peak: 0B | reserved: 20971520B
    15. 2022/11/27 18:41:40.056 1880 2161 Error Unity [ ALLOC_TYPETREE ] used: 27232B | peak: 0B | reserved: 4194304B
    16. 2022/11/27 18:41:40.056 1880 2161 Error Unity [ ALLOC_PROFILER ] used: 389668B | peak: 34818300B | reserved: 50331648B
    17.  
    What seams to be the problem here, UNITY? @Tomas1856
    Using unity 2021.3.11f1
     
    Last edited: Dec 2, 2022
  32. ytarkan

    ytarkan

    Joined:
    Nov 21, 2017
    Posts:
    3
    We have the same problem with 2021.3.13f1 and 2021.3.16f1. We tried various version of firebase sdk 8.5 to 9.5 since we suspected that it is caused by firebase but nothing helped. Problem seemed quite common not sure if all the same but 1/3 of our android users having crashes due to this. I attached one of the stacktraces. It is much appreciated if anyone have an idea
     

    Attached Files:

  33. hippogames

    hippogames

    Joined:
    Feb 5, 2015
    Posts:
    233
    Got the same error after upgradng 2021.3.12f1 > 2021.3.16f1. Thinking about downgrading...
     
  34. hippogames

    hippogames

    Joined:
    Feb 5, 2015
    Posts:
    233
    My crash logs just in case. 2021.3.16f1
     

    Attached Files:

  35. hippogames

    hippogames

    Joined:
    Feb 5, 2015
    Posts:
    233
    In my case, the crash was caused by adding Memory Profiler package, not upgrading Unity. After removing it, these crashes stopped.
     
    SergeyTarasenko likes this.
  36. npestov

    npestov

    Joined:
    Feb 7, 2018
    Posts:
    10
    Having same issue, is there a fix?
     
    arufolo-wellovate likes this.
  37. Haraven

    Haraven

    Joined:
    Apr 6, 2022
    Posts:
    5
    Can confirm I noticed the same behavior. If I use IL2CPP + ARMv7 + ARM64, my app crashes. If I uncheck the ARM64 from the Android Player options, it runs fine.

    In my case, I'd rather build without ARM64 even if it means supporting fewer devices, because it at least works on some devices this way.

    UPDATE: Disabling ARM64 may work, but it makes you unable to publish to Google Play (they require ARM64 support for all apps). This is just a workaround to be able to test when developing, but it's not a good final solution.
     
    Last edited: Jun 15, 2023
    vohoainam2009hoc likes this.
  38. PenProd

    PenProd

    Joined:
    Dec 17, 2022
    Posts:
    171
    Just wanted to add my "me too". Building with IL2CPP + ARM64 = crash. IL2CPP + ARMv7 and everything runs fine.
     
  39. PenProd

    PenProd

    Joined:
    Dec 17, 2022
    Posts:
    171
    Actually, it still crashes (as I found out today). Just not as often as when it's built for ARM64.
     
  40. Mastaroth

    Mastaroth

    Joined:
    Dec 20, 2014
    Posts:
    13
    More than a year latter and still happening on 2022.2.15.
    No straight workarounds... thats looking really good
     
    Arty_Brest likes this.
  41. ltomov

    ltomov

    Joined:
    Aug 3, 2017
    Posts:
    96
    Similar thing is happening in my case.

    I recently upgraded Unity from 2021.3 to 2022.3 and the error started appearing. Tracked it down to a plugin that used the com.google.android.play:core:1.10.0 library. I upgraded it to use the newer
    com.google.android.play:review library and the error disappeared.
     
  42. EyeDev44

    EyeDev44

    Joined:
    Apr 8, 2017
    Posts:
    149
    Same on Unity 2022 "LTS."
     
  43. fernandocelso25

    fernandocelso25

    Joined:
    Aug 12, 2021
    Posts:
    1
    Same on unity 2022.2.16, still no results?
     
  44. EyeDev44

    EyeDev44

    Joined:
    Apr 8, 2017
    Posts:
    149
    Same on Unity 2022.3.6 "LTS" dur to FirebaseUser_UserId_get


    2023/08/20 14:51:20.565 Error CRASH *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    2023/08/20 14:51:20.565 Error CRASH Version '2022.3.6f1 (b9e6e7e9fa2d)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
    2023/08/20 14:51:20.565 Error CRASH Build fingerprint: '****/fleur_p_eea/fleur:13/TP1A.220624.014/V14.0.3.0.****:user/release-keys'
    2023/08/20 14:51:20.565 Error CRASH Revision: '0'
    2023/08/20 14:51:20.565 Error CRASH ABI: 'arm64'
    2023/08/20 14:51:20.565 Error CRASH Timestamp: 2023-08-20 14:51:20.565643747+0300
    2023/08/20 14:51:20.565 Error CRASH pid: 16016, tid: 16090, name: UnityMain >>> com.***.***<<<
    2023/08/20 14:51:20.565 Error CRASH uid: 10539
    2023/08/20 14:51:20.565 Error CRASH signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr --------
    2023/08/20 14:51:20.565 Error CRASH Cause: null pointer dereference
    2023/08/20 14:51:20.565 Error CRASH x0 b400006fd8397d60 x1 b400006f13103858 x2 0000000000000000 x3 0000006f55656d4c
    2023/08/20 14:51:20.565 Error CRASH x4 0000000000000000 x5 0000000000000000 x6 0000007098440000 x7 0000000020f01bbe
    2023/08/20 14:51:20.565 Error CRASH x8 0000000000000000 x9 5dbb648c6f537d08 x10 0000006f660b60b8 x11 0000000000000000
    2023/08/20 14:51:20.565 Error CRASH x12 0000006f660b4dfc x13 0000000000000104 x14 0000006f55655280 x15 00005d2071d8b561
    2023/08/20 14:51:20.565 Error CRASH x16 000000707b74aa70 x17 000000707b73a8a0 x18 0000006ee2086478 x19 b400006fd8397d60
    2023/08/20 14:51:20.565 Error CRASH x20 b400006f13103858 x21 0000006f45b31548 x22 0000000000000001 x23 0000000000000002
    2023/08/20 14:51:20.565 Error CRASH x24 0000006f45b2a078 x25 0000000000000000 x26 0000006f556575b4 x27 0000000000000001
    2023/08/20 14:51:20.565 Error CRASH x28 0000000000000001 x29 0000006f55656d10
    2023/08/20 14:51:20.565 Error CRASH lr 0000006e04279d30 sp 0000006f55656d00 pc 0000006e04279d38 pst 0000000060001000
    2023/08/20 14:51:20.565 Error CRASH backtrace:
    2023/08/20 14:51:20.565 Error CRASH #00 pc 0000000000200d38 /data/app/~~KScmK2-4ULp1dlTl7vA4_A==/com.***.***-93I_cODMuDHsdEvT5IT_cQ==/lib/arm64/libFirebaseCppApp-11_2_0.so (Firebase_Auth_CSharp_FirebaseUser_UserId_get+36)
    2023/08/20 14:51:20.565 Error CRASH #01 pc 00000000021d49d4 /data/app/~~KScmK2-4ULp1dlTl7vA4_A==/com.***.***-93I_cODMuDHsdEvT5IT_cQ==/lib/arm64/libil2cpp.so (BuildId: ae89423f3f379120)
    2023/08/20 14:51:20.565 Error CRASH #02 pc 00000000021c6c70 /data/app/~~KScmK2-4ULp1dlTl7vA4_A==/com.***.***-93I_cODMuDHsdEvT5IT_cQ==/lib/arm64/libil2cpp.so (BuildId: ae89423f3f379120)
    2023/08/20 14:51:20.565 Error CRASH #03 pc 0000000003a6ced8 /data/app/~~KScmK2-4ULp1dlTl7vA4_A==/com.***.***-93I_cODMuDHsdEvT5IT_cQ==/lib/arm64/libil2cpp.so (BuildId: ae89423f3f379120)
    2023/08/20 14:51:20.565 Error CRASH #04 pc 0000000003a70a14 /data/app/~~KScmK2-4ULp1dlTl7vA4_A==/com.***.***-93I_cODMuDHsdEvT5IT_cQ==/lib/arm64/libil2cpp.so (BuildId: ae89423f3f379120)
    2023/08/20 14:51:20.566 Error CRASH #05 pc 00000000028a66ac /data/app/~~KScmK2-4ULp1dlTl7vA4_A==/com.***.***-93I_cODMuDHsdEvT5IT_cQ==/lib/arm64/libil2cpp.so (BuildId: ae89423f3f379120)
    2023/08/20 14:51:20.566 Error CRASH #06 pc 0000000003a9a6b0 /data/app/~~KScmK2-4ULp1dlTl7vA4_A==/com.***.***-93I_cODMuDHsdEvT5IT_cQ==/lib/arm64/libil2cpp.so (BuildId: ae89423f3f379120)
    2023/08/20 14:51:20.566 Error CRASH #07 pc 00000000028a9058 /data/app/~~KScmK2-4ULp1dlTl7vA4_A==/com.***.***-93I_cODMuDHsdEvT5IT_cQ==/lib/arm64/libil2cpp.so (BuildId: ae89423f3f379120)
    2023/08/20 14:51:20.566 Error CRASH #08 pc 0000000003f2c9dc /data/app/~~KScmK2-4ULp1dlTl7vA4_A==/com.***.***-93I_cODMuDHsdEvT5IT_cQ==/lib/arm64/libil2cpp.so (BuildId: ae89423f3f379120)
    2023/08/20 14:51:20.566 Error CRASH #09 pc 0000000003f5d090 /data/app/~~KScmK2-4ULp1dlTl7vA4_A==/com.***.***-93I_cODMuDHsdEvT5IT_cQ==/lib/arm64/libil2cpp.so (BuildId: ae89423f3f379120)
    2023/08/20 14:51:20.566 Error CRASH #10 pc 0000000001f1201c /data/app/~~KScmK2-4ULp1dlTl7vA4_A==/com.***.***-93I_cODMuDHsdEvT5IT_cQ==/lib/arm64/libil2cpp.so (BuildId: ae89423f3f379120)
    2023/08/20 14:51:20.566 Error CRASH #11 pc 0000000001f11f68 /data/app/~~KScmK2-4ULp1dlTl7vA4_A==/com.***.***-93I_cODMuDHsdEvT5IT_cQ==/lib/arm64/libil2cpp.so (BuildId: ae89423f3f379120)
    2023/08/20 14:51:20.566 Error CRASH #12 pc 0000000000604ab8 /data/app/~~KScmK2-4ULp1dlTl7vA4_A==/com.***.***-93I_cODMuDHsdEvT5IT_cQ==/lib/arm64/libunity.so (BuildId: 59171b60a8a90ad6)
    2023/08/20 14:51:20.566 Error CRASH #13 pc 0000000000613df4 /data/app/~~KScmK2-
    ...

    2023/08/20 14:51:20.566 Error CRASH #19 pc 0000000000461554 /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148) (BuildId: 289d75599f6112d5757113220599e90b)
    2023/08/20 14:51:20.566 Error CRASH #20 pc 000000000020a2b0 /apex/com.android.art/lib64/libart.so (nterp_helper+4016) (BuildId: 289d75599f6112d5757113220599e90b)
    2023/08/20 14:51:20.566 Error CRASH #21 pc 0000000000209334 /apex/com.android.art/lib64/libart.so (nterp_helper+52) (BuildId: 289d75599f6112d5757113220599e90b)
    2023/08/20 14:51:20.566 Error CRASH #22 pc 0000000000b6b0a4 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat
    2023/08/20 14:51:20.823 Error CRASH Tombstone written to: /storage/emulated/0/Android/data/com.***.***/files/tombstone_00
    2023/08/20 14:51:20.823 Error CRASH Forwarding signal 11
    0001/01/01 00:00:00.000 Info --------- beginning of crash
    2023/08/20 14:51:20.823 Fatal libc Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x10 in tid 16090 (UnityMain), pid 16016 (amcatch.Somnium)
     
  45. unity_3D1F2458AB75386BB89A

    unity_3D1F2458AB75386BB89A

    Joined:
    Aug 16, 2022
    Posts:
    12
    Happened to me on 2021.3.12f1 after installing Google's Asset Pack Delivery 2.0.2 plugin,
    happening on all build configuration, Mono/Il2cpp and arm64/arm7/together

    I have google core plugin installed, also 2.0.2
     
  46. unity_3D1F2458AB75386BB89A

    unity_3D1F2458AB75386BB89A

    Joined:
    Aug 16, 2022
    Posts:
    12
    Also, right before crash there is that line:
    2023/10/24 15:11:32.774 2547 2639 Info PlayCore UID: [10508] PID: [2547] FakeAssetPackService : syncPacks()

    I don't get why FakeAssetPackService is being called, and not real one
     
  47. unity_3D1F2458AB75386BB89A

    unity_3D1F2458AB75386BB89A

    Joined:
    Aug 16, 2022
    Posts:
    12
  48. andrey_berestovskyi

    andrey_berestovskyi

    Joined:
    May 28, 2019
    Posts:
    4
  49. unity_3D1F2458AB75386BB89A

    unity_3D1F2458AB75386BB89A

    Joined:
    Aug 16, 2022
    Posts:
    12