Search Unity

Bug Game built with Unity 2019.4.28, crashes in vulkan.so library, but I'm using OpenGLES2/3

Discussion in 'General Graphics' started by yangfch3, Aug 9, 2022.

  1. yangfch3

    yangfch3

    Joined:
    Jun 9, 2020
    Posts:
    3
    I built a game with Unity 2019.4.28 with OpenGLES 2/3 chosen for the graphics API, but I've been getting some weird crashes recently.

    libunity called 'EGL_ClientWaitSyncKHR' of 'libGLESv2_samsung.so', and finally crashed in /vendor/lib64/hw/vulkan.samsung.so.

    Currently only appears on Samsung S22, and the crash rate is relatively high, reaching 600/4100.

    The following is the wrong stack information:

    Exception java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    Version '2019.4.28f1c1 (1f7bb6726984)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
    Build fingerprint: 'samsung/b0sxeea/b0s:12/SP1A.210812.016/S908BXXU2AVF1:user/release-keys'
    Revision: '28'
    ABI: 'arm64'
    Timestamp: 2022-07-18 22:00:53+0200
    pid: 15934, tid: 16127, name: UnityMain >>> com.mattel163.skipbo <<<
    uid: 10361
    signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x18
    Cause: null pointer dereference
    x0 b40000791c9411a8 x1 0000000000000001 x2 b4000079b3c6cab8 x3 0000000000000001
    x4 0000000002faf080 x5 00000079719451f4 x6 0000007980832d74 x7 00009dde00009bfa
    x8 00000077e09eb930 x9 0000000000000000 x10 0000000000003e5a x11 0000007cb67f5038
    x12 0000007cb67f5030 x13 000000007fffffff x14 00000000007662da x15 000000a1b55cc4ee
    x16 000dbcb05dd00000 x17 0000000027100000 x18 00000077bdef4000 x19 0000000002faf080
    x20 0000000000000001 x21 b4000079b3c6cac0 x22 b40000791c9411a8 x23 00000077e09eb930
    x24 b400007bc3c22050 x25 00000077e09ec000 x26 0000000000000001 x27 00000000000fc000
    x28 00000077e08f3000 x29 00000077e09eb950
    sp 00000077e09eb930 lr 00000079807fc400 pc 0000007971942678

    backtrace:
    #00 pc 00000000013fc678 /vendor/lib64/hw/vulkan.samsung.so (BuildId: 3c3f650bfd63758b76be354f30896f41c5962e82)
    #01 pc 00000000003f73fc /vendor/lib64/egl/libGLESv2_samsung.so (BuildId: a637a476c6448ffa)
    #02 pc 00000000004229c8 /vendor/lib64/egl/libGLESv2_samsung.so (BuildId: a637a476c6448ffa)
    #03 pc 000000000042d0d4 /vendor/lib64/egl/libGLESv2_samsung.so (BuildId: a637a476c6448ffa)
    #04 pc 000000000042ddb8 /vendor/lib64/egl/libGLESv2_samsung.so (BuildId: a637a476c6448ffa)
    #05 pc 00000000002322f4 /vendor/lib64/egl/libGLESv2_samsung.so (BuildId: a637a476c6448ffa)
    #06 pc 000000000023a5fc /vendor/lib64/egl/libGLESv2_samsung.so (EGL_ClientWaitSyncKHR+128) (BuildId: a637a476c6448ffa)
    #07 pc 00000000008c8418 /data/app/~~2PKYGXJe42OqU-O14yb-Yg==/com.mattel163.skipbo-PJ4zPNgi-bllkFxugxLJIA==/lib/arm64/libunity.so (BuildId: b7ac788f8983fc05f4e203fbbff666b8334a1f34)
    #08 pc 000000000075336c /data/app/~~2PKYGXJe42OqU-O14yb-Yg==/com.mattel163.skipbo-PJ4zPNgi-bllkFxugxLJIA==/lib/arm64/libunity.so (BuildId: b7ac788f8983fc05f4e203fbbff666b8334a1f34)
    #09 pc 00000000000b3020 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+264) (BuildId: 1001969d8caf747bff324cbb95af4b2e)
    #10 pc 000000000005288c /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 1001969d8caf747bff324cbb95af4b2e)

    at vulkan.0x13fc678(Native Method)
    at libGLESv2_samsung
    at libGLESv2_samsung
    at libGLESv2_samsung
    at libGLESv2_samsung
    at libGLESv2_samsung
    at libGLESv2_samsung.EGL_ClientWaitSyncKHR (EGL_ClientWaitSyncKHR:128)
    at libunity
    at libunity
    at libc.__pthread_start(void*) (__pthread_start:264)
    at libc.__start_thread (__start_thread:64)
     
  2. yangfch3

    yangfch3

    Joined:
    Jun 9, 2020
    Posts:
    3
    Added: It looks like it will only appear on Samsung S22 devices
     
  3. yangfch3

    yangfch3

    Joined:
    Jun 9, 2020
    Posts:
    3
    Solved!

    I found out that this is due to an incompatibility between Adaptime Performance and Unity 2019's Optimized Frame Pacing feature.

    I found the following instructions in the documentation (https://docs.unity3d.com/Packages/com.unity.adaptiveperformance.samsung.android@4.0/manual/vrr.html):
    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.
     
    FrankiePlayside likes this.
  4. BBO_Lagoon

    BBO_Lagoon

    Joined:
    Mar 2, 2017
    Posts:
    200
    I' using Unity 2021.3.14f1 and I'm not using Adaptive Performance but I have the same crash on S22, S22+ and S22 Ultra devices with GFX: ANGLE (Samsung Xclipse 920) on Vulkan 1.1.179.
    I do use Optimized Frame Pacing.

    Native StackTrace:
    Thread 0 (crashed)
    0 vulkan.samsung.so 0x000000740297bbb4 <symbols missing for uuid: d967432dc921286ffc905120cf3f3fc7826f8c2c>
    1 libGLESv2_samsung.so 0x000000740600a9f0 <symbols missing for uuid: ed3f6a7c128e6933>
    2 libGLESv2_samsung.so 0x00000074060361e0 <symbols missing for uuid: ed3f6a7c128e6933>
    3 libGLESv2_samsung.so 0x000000740604095c <symbols missing for uuid: ed3f6a7c128e6933>
    4 libGLESv2_samsung.so 0x0000007406041640 <symbols missing for uuid: ed3f6a7c128e6933>
    5 libGLESv2_samsung.so 0x0000007405e45824 <symbols missing for uuid: ed3f6a7c128e6933>
    6 libGLESv2_samsung.so 0x0000007405e4dbf0 <symbols missing for uuid: ed3f6a7c128e6933>
    7 libEGL.so 0x0000007738382ef0 <symbols missing for uuid: 3e11d5ee9f036e30a6e0ae011fe1c71d>
    8 split_config.arm64_v8a.apk 0x00000073b0c4f610 swappy::EGL::FenceWaiter::threadMain()
    9 split_config.arm64_v8a.apk 0x00000073b0ba65e4 void* std::__ndk1::__thread_proxy<std::__ndk1::tuple<std::__ndk1::unique_ptr<std::__ndk1::__thread_struct, std::__ndk1::default_delete<std::__ndk1::__thread_struct> >, std::__ndk1::function<void ()> > >(void*)
    10 libc.so 0x000000773f9977a8 <symbols missing for uuid: 75a8b9514072ca2f2e610bee585c55ed>
    11 libc.so 0x000000773f93440c <symbols missing for uuid: 75a8b9514072ca2f2e610bee585c55ed>