[Crash] signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)

Hello. sometimes, my app is crashed with error message “CRASH signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)”. according to backtrace, the error point is here "GfxDeviceVK::SyncLastPresent(bool) "

Unity Version
2019.3.6f1

Scripting Backend
mono

CPU
armeabi-v7a

Error Messages

2020-05-19 06:44:17.388 31595 32037 Error CRASH *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2020-05-19 06:44:17.388 31595 32037 Error CRASH Version ‘2019.3.6f1 (5c3fb0a11183)’, Build type ‘Development’, Scripting Backend ‘mono’, CPU ‘armeabi-v7a’
2020-05-19 06:44:17.388 31595 32037 Error CRASH Build fingerprint: ‘samsung/crownlteks/crownlteks:8.1.0/M1AJQ/N960NKSU1ARH5:user/release-keys’
2020-05-19 06:44:17.388 31595 32037 Error CRASH Revision: ‘28’
2020-05-19 06:44:17.388 31595 32037 Error CRASH ABI: ‘arm’
2020-05-19 06:44:17.388 31595 32037 Error CRASH Timestamp: 2020-05-19 06:44:17+0200
2020-05-19 06:44:17.388 31595 32037 Error CRASH pid: 31595, tid: 32037, name: Thread-5 >>> com.MasrGames.SchoolNightmare <<<
2020-05-19 06:44:17.388 31595 32037 Error CRASH uid: 10422
2020-05-19 06:44:17.388 31595 32037 Error CRASH signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8
2020-05-19 06:44:17.388 31595 32037 Error CRASH Cause: null pointer dereference
2020-05-19 06:44:17.388 31595 32037 Error CRASH r0 adef1e10 r1 00000000 r2 00002e86 r3 00000000
2020-05-19 06:44:17.388 31595 32037 Error CRASH r4 00000001 r5 00000000 r6 c5691af8 r7 00000008
2020-05-19 06:44:17.388 31595 32037 Error CRASH r8 c568cf40 r9 00000001 r10 00000000 r11 00000000
2020-05-19 06:44:17.388 31595 32037 Error CRASH ip 00000000 sp bcb7f670 lr c76231f0 pc c7623240
2020-05-19 06:44:17.388 31595 32037 Error CRASH
2020-05-19 06:44:17.388 31595 32037 Error CRASH backtrace:
2020-05-19 06:44:17.388 31595 32037 Error CRASH #00 pc 00989240 /data/app/com.MasrGames.SchoolNightmare-I3SuAecYDbI6oIXCDyiJWw==/lib/arm/libunity.so GfxDeviceVK::SyncLastPresent(bool) at ??:?
2020-05-19 06:44:17.388 31595 32037 Error CRASH #01 pc 00999a9c /data/app/com.MasrGames.SchoolNightmare-I3SuAecYDbI6oIXCDyiJWw==/lib/arm/libunity.so GfxDeviceVK::InsertCustomMarkerCallbackAndData(void ()(int, void), int, void*, unsigned int) at ??:?
2020-05-19 06:44:17.388 31595 32037 Error CRASH #02 pc 0036d4ed /data/app/com.MasrGames.SchoolNightmare-I3SuAecYDbI6oIXCDyiJWw==/lib/arm/libunity.so GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&) at ??:?
2020-05-19 06:44:17.388 31595 32037 Error CRASH #03 pc 0036db4b /data/app/com.MasrGames.SchoolNightmare-I3SuAecYDbI6oIXCDyiJWw==/lib/arm/libunity.so GfxDeviceWorker::RunExt(ThreadedStreamBuffer&) at ??:?
2020-05-19 06:44:17.388 31595 32037 Error CRASH #04 pc 0036db11 /data/app/com.MasrGames.SchoolNightmare-I3SuAecYDbI6oIXCDyiJWw==/lib/arm/libunity.so GfxDeviceWorker::Run() at ??:?
2020-05-19 06:44:17.388 31595 32037 Error CRASH #05 pc 00366d53 /data/app/com.MasrGames.SchoolNightmare-I3SuAecYDbI6oIXCDyiJWw==/lib/arm/libunity.so GfxDeviceWorker::RunGfxDeviceWorker(void*) at ??:?
2020-05-19 06:44:17.388 31595 32037 Error CRASH #06 pc 007e93e7 /data/app/com.MasrGames.SchoolNightmare-I3SuAecYDbI6oIXCDyiJWw==/lib/arm/libunity.so Thread::RunThreadWrapper(void*) at ??:?
2020-05-19 06:44:17.389 31595 32037 Error CRASH #07 pc 000488c7 /system/lib/libc.so (__pthread_start(void*)+22) (BuildId: 59fffc7b974bf43fd2a9a8b5dac27d7d)
2020-05-19 06:44:17.389 31595 32037 Error CRASH #08 pc 0001b419 /system/lib/libc.so (__start_thread+32) (BuildId: 59fffc7b974bf43fd2a9a8b5dac27d7d)
2020-05-19 06:44:18.931 31595 31595 Debug ViewRootImpl@678d90[UnityPlayerActivity] ViewPostIme pointer 0
2020-05-19 06:44:18.935 31595 31595 Error CRASH other thread is trapped; signum = 11

I am struggling to find solutions while I am waiting for answers from someone.

anyway, I feel it is a memory problem. I tried to reduce textures as half, and 32bits colors to 16bits colors. and set strip level as high, and compress & optimized meshs. after adjustment some options, the application is ok for my phone. but the other phone(with lower hw specs) it still keeps stopped (not all the time…)

is there someone who can explain the optimized values of CPU usuage & memory usuage???

It doesn’t look like an out-of-memory issue to me.
What’s the device you are using?
Do you use CommandBuffer.IssuePluginEventAndData from C#? I can’t tell from your callstack if it’s your script or Unity internal (could be e.g. VideoPlayer or XR).
Do you use GraphicsJobs with Vulkan?

Things you could try:
Disable Multithreaded Rendering to get more info in the callstack.
Switch Graphics API from Vulkan to OpenGL ES 3 and check if it’s still reproducible.

my phone is Samsung Galaxy Note 9. and the other phone is belong my friend, I will ask what is the model name.

2)-(1) Nope. I didn’t use " CommandBuffer.IssuePluginEventAndData", in source level. I tried to search the keyword “CommandBuffer” at the Visual studio 2019 with “whole of the solutions” to check there is any downloaded assets using this or not. the result is nothing used this in my project & solution.

2)-(2) I didn’t use XR & VIdeoPlayer also. but the built-in package of XR was enable (as default), I will try to check again after making it disable.

  1. what is the meaning of “GraphicsJobs with Vulkan” exactly? I didn’t use any expert-level graphics works in my codes. but I use the graphics API “Vulkan” as default value of the build setting for android.

5873746--625432--upload_2020-5-20_12-32-54.png

  1. ok, I will make “Multithreaded Rendering” disable

  2. and I will also switch both.

Ohhhh… I forgot that I was using Post processing to make bloom effect with light? maybe, can it make problem with android platform? let me disable post-processing also.

after making “Post Processing & XR” disable, and also disable Multithread rendering, I found another errors with my phone (Samsung Note 9)

GLSL link error (1)

2020-05-20 05:47:51.399 18656 18696 Error Unity -------- GLSL link error: The number of vertex shader storage blocks (1) is greater than the maximum number allowed (0).
2020-05-20 05:47:51.399 18656 18696 Error Unity
2020-05-20 05:47:51.399 18656 18696 Error Unity
2020-05-20 05:47:51.399 18656 18696 Error Unity
2020-05-20 05:47:51.399 18656 18696 Error Unity UnityEngine.Canvas:GetDefaultCanvasMaterial()
2020-05-20 05:47:51.399 18656 18696 Error Unity UnityEngine.UI.Graphic:get_defaultGraphicMaterial() (at C:\Program Files\Unity\Hub\Editor\2019.3.6f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\UI\Core\Graphic.cs:95)
2020-05-20 05:47:51.399 18656 18696 Error Unity UnityEngine.UI.Graphic:get_defaultMaterial() (at C:\Program Files\Unity\Hub\Editor\2019.3.6f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\UI\Core\Graphic.cs:409)
2020-05-20 05:47:51.399 18656 18696 Error Unity UnityEngine.UI.Image:get_material() (at C:\Program Files\Unity\Hub\Editor\2019.3.6f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\UI\Core\Image.cs:737)
2020-05-20 05:47:51.399 18656 18696 Error Unity UnityEngine.UI.Graphic:get_materialForRendering() (at C:\Program Files\Unity\Hub\Editor\2019.3.6f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\UI\Core\Graphic.cs:444)
2020-05-20 05:47:51.399 18656 18696 Error Unity UnityEngine.UI.Graphic:UpdateMaterial() (at C:\Program Files\Unity\Hub\Edito

GLSL link error (2)

2020-05-20 05:50:41.303 18656 18696 Error Unity -------- GLSL link error: The number of vertex shader storage blocks (1) is greater than the maximum number allowed (0).
2020-05-20 05:50:41.303 18656 18696 Error Unity
2020-05-20 05:50:41.303 18656 18696 Error Unity
2020-05-20 05:50:41.303 18656 18696 Error Unity
2020-05-20 05:50:41.303 18656 18696 Error Unity (Filename: ./Runtime/GfxDevice/opengles/ApiGLES.cpp Line: 645)
2020-05-20 05:50:41.303 18656 18696 Error Unity

even I have this error messages, still my app is running without crashes. but I want to debug this error. how can I fix it?

“GLSL link error: The number of vertex shader storage blocks (1) is greater than the maximum number allowed (0)” means that you are using a shader that uses SSBO (e.g. StructuredBuffer, RWTexture) in vertex shader on a device that doesn’t support it (probably it has a Mali GPU).
However the default UI shader should not use these features, so I don’t know why you are getting this error here.

It’s an additional checkbox in PlayerSettings. I would recommend to turn it off on Android and only use it if you see a performance benefit for you project.