[libunity.so] SIGSEGV ANR unity

Our latest game release received a “[libunity.so] SIGSEGV” ANR for 19 users.
And here is the stack trace we received. Can anyone help me?


pid: 0, tid: 27255 >>> com.tgmedia.wordrelax <<<

backtrace:
#00 pc 0x00000000008708de /data/app/com.tgmedia.wordrelax-RPINC1KBJB2k5-9M3llaOQ==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
#01 pc 0x00000000001b2dc9 /data/app/com.tgmedia.wordrelax-RPINC1KBJB2k5-9M3llaOQ==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
#02 pc 0x00000000001b4a13 /data/app/com.tgmedia.wordrelax-RPINC1KBJB2k5-9M3llaOQ==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
#03 pc 0x00000000001b2379 /data/app/com.tgmedia.wordrelax-RPINC1KBJB2k5-9M3llaOQ==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
#04 pc 0x0000000000418a63 /data/app/com.tgmedia.wordrelax-RPINC1KBJB2k5-9M3llaOQ==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
#05 pc 0x0000000000a1a427 /data/app/com.tgmedia.wordrelax-RPINC1KBJB2k5-9M3llaOQ==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)

Well, the provided info isn’t really enough to say much about your issue. Just for context, “SIGSEGV” is short for SIGnal SEGmentation fault / Violation. It’s a kernal signal that happens when some code tries to access protected or unreachable memory. Triggering a segmentation fault in C# is quite difficult as C# has managed memory and in normal cases it’s quite rare to break boundaries that aren’t caught by normal exceptions. Most segmentation faults are caused by some native code plugin that has bugs / errors. However depending on the platform and what build has been made it’s also possible that your normal C# code that has bugs could trigger those from “normal” C# errors. When the app was build without exception handling (to get more preformance) it means that even trivial errors like an array out of bounds could result in a segmentation fault.

I doubt that the backtrace though the Unity core engine would even help actual Unity employees. At least they would need to know the exact Unity version since libunity.so is a binary executable and the program counters listed in the backtrace don’t make much sense when you look at the wrong version. We (the community) can’t really help you here. So at a minimum you should provide more details like the Unity version and maybe what native plugins you may use in your app.

So when you said you have 19 users who hit this error, it means you haven’t been able to reproduce it yourself? Do you have any additional information on the users devices? Any particular model / OS version, etc…? Any information when those errors occur? Right at startup or later in the game when something specitic may happen?

You also said your “latest release” has those issues. Did you have a pervious version that seemingly didn’t have those issues? If so, what things has been changed / added between those versions? Those are the things you should go through in your head as well. Of course it’s up to you what kind of information you have and can share here or maybe with the actual Unity staff. I’m just telling you that we can’t really do anything with the information provided :slight_smile:

Happy debugging.

You need to have build symbols available to resolve this stacktrace.

We are currently using Unity version 2022.3.17f1. The devices that we have seen experiencing ANRs so far are:
- gtasliteltevzw [2GB RAM] with 4x ARM Cortex-A53 CPU (1400 MHz)
- gta2swifi [2GB RAM] with 4x ARM Cortex-A53 CPU (1400 MHz)
- Apollo_8_4G_TMO [3GB RAM] with 4x ARM Cortex-A53 CPU (2000 MHz)
- j2y18lte [1.5GB RAM] with 4x ARM Cortex-A53 CPU (1400 MHz)
- j4primelte [2GB RAM] with 4x ARM Cortex-A53 CPU (1400 MHz)

Here are some more stack traces:
[1]
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 1052 >>> com.tgmedia.wordrelax <<<

backtrace:
  #00  pc 0x0000000000152bb0  /vendor/lib/egl/libGLESv2_adreno.so (EsxRenderBucket::AddUnbucketedEntries(EsxCmdBufType, unsigned int)+132)
  #01  pc 0x0000000000152127  /vendor/lib/egl/libGLESv2_adreno.so (EsxRenderBucket::BucketRenderingCmds(EsxRenderBucketParams*)+740)
  #02  pc 0x000000000018607d  /vendor/lib/egl/libGLESv2_adreno.so (EsxContext::BucketRenderingCmds(int)+712)
  #03  pc 0x00000000001856f7  /vendor/lib/egl/libGLESv2_adreno.so (EsxContext::BucketProcessingSetup()+70)
  #04  pc 0x00000000000dccff  /vendor/lib/egl/libGLESv2_adreno.so (EsxContext::Clear(unsigned int, unsigned int, unsigned int, EsxClearValues*)+390)
  #05  pc 0x0000000000102c79  /vendor/lib/egl/libGLESv2_adreno.so (EsxGlApiParamValidate::GlClear(EsxDispatch*, unsigned int)+136)
  #06  pc 0x0000000000681f60  /data/app/com.tgmedia.wordrelax-kngpvC_1elVgR9UaPfIpaA==/lib/arm/libunity.so
  #07  pc 0x0000000000675fe8  /data/app/com.tgmedia.wordrelax-kngpvC_1elVgR9UaPfIpaA==/lib/arm/libunity.so
  #08  pc 0x0000000000693c04  /data/app/com.tgmedia.wordrelax-kngpvC_1elVgR9UaPfIpaA==/lib/arm/libunity.so
  #09  pc 0x000000000067020c  /data/app/com.tgmedia.wordrelax-kngpvC_1elVgR9UaPfIpaA==/lib/arm/libunity.so
  #10  pc 0x000000000081dce7  /data/app/com.tgmedia.wordrelax-kngpvC_1elVgR9UaPfIpaA==/lib/arm/libunity.so
  #11  pc 0x000000000081d9d9  /data/app/com.tgmedia.wordrelax-kngpvC_1elVgR9UaPfIpaA==/lib/arm/libunity.so
  #12  pc 0x000000000081d753  /data/app/com.tgmedia.wordrelax-kngpvC_1elVgR9UaPfIpaA==/lib/arm/libunity.so
  #13  pc 0x00000000002cb01b  /data/app/com.tgmedia.wordrelax-kngpvC_1elVgR9UaPfIpaA==/lib/arm/libunity.so
  #14  pc 0x0000000000073ab1  /system/lib/libc.so (__pthread_start(void*)+22)
  #15  pc 0x000000000001e1cd  /system/lib/libc.so (__start_thread+24)

[2]
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 19455 >>> com.tgmedia.wordrelax <<<

backtrace:
  #00  pc 0x0000000000098812  /system/vendor/lib/egl/libRBGLESv2_adreno.so (rb_vbo_getptr+21)
  #01  pc 0x0000000000076399  /system/vendor/lib/egl/libRBGLESv2_adreno.so (stream_buffer_object+44)
  #02  pc 0x0000000000076585  /system/vendor/lib/egl/libRBGLESv2_adreno.so (core_glFlushMappedBufferRange+156)
  #03  pc 0x000000000065d0ac  /data/app/com.tgmedia.wordrelax-1/lib/arm/libunity.so
  #04  pc 0x000000000066deb8  /data/app/com.tgmedia.wordrelax-1/lib/arm/libunity.so
  #05  pc 0x000000000066de0c  /data/app/com.tgmedia.wordrelax-1/lib/arm/libunity.so
  #06  pc 0x0000000000630450  /data/app/com.tgmedia.wordrelax-1/lib/arm/libunity.so
  #07  pc 0x0000000000632254  /data/app/com.tgmedia.wordrelax-1/lib/arm/libunity.so
  #08  pc 0x0000000000823a6b  /data/app/com.tgmedia.wordrelax-1/lib/arm/libunity.so
  #09  pc 0x000000000081d9d9  /data/app/com.tgmedia.wordrelax-1/lib/arm/libunity.so
  #10  pc 0x000000000081d753  /data/app/com.tgmedia.wordrelax-1/lib/arm/libunity.so
  #11  pc 0x00000000002cb01b  /data/app/com.tgmedia.wordrelax-1/lib/arm/libunity.so
  #12  pc 0x0000000000047ab3  /system/lib/libc.so (__pthread_start(void*)+22)
  #13  pc 0x0000000000019f55  /system/lib/libc.so (__start_thread+6)

[3]
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 494 >>> com.tgmedia.wordrelax <<<

backtrace:
  #00  pc 0x00000000001b3d0a  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
  #01  pc 0x00000000001b2dbd  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
  #02  pc 0x00000000001b4a13  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
  #03  pc 0x00000000001b2379  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
  #04  pc 0x00000000001bf7cd  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
  #05  pc 0x00000000001bf755  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
  #06  pc 0x00000000001bd495  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
  #07  pc 0x00000000001bd409  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
  #08  pc 0x00000000001bd839  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
  #09  pc 0x00000000001bda9b  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
  #10  pc 0x00000000001d6cb7  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
  #11  pc 0x00000000001d5bc5  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
  #12  pc 0x00000000001d5875  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
  #13  pc 0x00000000001d60b5  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
  #14  pc 0x00000000001d644f  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
  #15  pc 0x000000000017f715  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
  #16  pc 0x0000000001f6703c  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libil2cpp.so (BuildId: 5f3b5aa2f91abd2e226b3655dc15682e7799be5b)
  #17  pc 0x0000000000d80054  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libil2cpp.so (BuildId: 5f3b5aa2f91abd2e226b3655dc15682e7799be5b)
  #18  pc 0x0000000000a8c1d0  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libil2cpp.so (BuildId: 5f3b5aa2f91abd2e226b3655dc15682e7799be5b)
  #19  pc 0x0000000000a8bf1c  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libil2cpp.so (BuildId: 5f3b5aa2f91abd2e226b3655dc15682e7799be5b)
  #20  pc 0x0000000000a7bca8  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libil2cpp.so (BuildId: 5f3b5aa2f91abd2e226b3655dc15682e7799be5b)
  #21  pc 0x000000000082d250  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libil2cpp.so (BuildId: 5f3b5aa2f91abd2e226b3655dc15682e7799be5b)
  #22  pc 0x000000000082d190  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libil2cpp.so (BuildId: 5f3b5aa2f91abd2e226b3655dc15682e7799be5b)
  #23  pc 0x00000000002f4dd5  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
  #24  pc 0x00000000003008ad  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
  #25  pc 0x000000000030a1a5  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
  #26  pc 0x00000000001d6a3d  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
  #27  pc 0x0000000000255d51  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
  #28  pc 0x0000000000255d73  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
  #29  pc 0x0000000000255f5b  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
  #30  pc 0x000000000035b8d9  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
  #31  pc 0x000000000036c2bb  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/lib/arm/libunity.so (BuildId: f2d6b99fadf991fb)
  #32  pc 0x00000000001a605b  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/oat/arm/base.odex (art_jni_trampoline+74)
  #33  pc 0x00000000004285e1  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/oat/arm/base.odex (com.unity3d.player.UnityPlayer$F$a.handleMessage+1104)
  #34  pc 0x00000000006c58df  /system/framework/arm/boot-framework.oat (android.os.Handler.dispatchMessage+110)
  #35  pc 0x00000000006c82d3  /system/framework/arm/boot-framework.oat (android.os.Looper.loop+1266)
  #36  pc 0x0000000000428f2b  /data/app/com.tgmedia.wordrelax-kekyNhJxJrU6MVmjfNULQg==/oat/arm/base.odex (com.unity3d.player.UnityPlayer$F.run+234)
  #37  pc 0x00000000000d7bc5  /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub_internal+68)
  #38  pc 0x000000000042e6a7  /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub+250)
  #39  pc 0x00000000000dffb7  /apex/com.android.runtime/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+174)
  #40  pc 0x00000000003702e7  /apex/com.android.runtime/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+54)
  #41  pc 0x0000000000370fd9  /apex/com.android.runtime/lib/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*)+304)
  #42  pc 0x00000000003a1bf7  /apex/com.android.runtime/lib/libart.so (art::Thread::CreateCallback(void*)+978)
  #43  pc 0x00000000000a60b3  /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+20)
  #44  pc 0x0000000000060783  /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30)