Godot c# crashed in android device
Tested versions
-Reproducible in godot4.2.1 godot4.3rc1
System information
Godot v4.3.rc1.mono - Windows 10 - Vulkan (Mobile) - dedicated NVIDIA GeForce GT 1030 (NVIDIA; 31.0.15.3623) - AMD Ryzen 5 3600 6-Core Processor (12 Threads)
Issue description
Exported game for android will crash imediately after screen splash. Everything goes well, if no C# script is attached to nodes in scene.
A Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 8654 (VkThread), pid 8604 (com.example.aaa)
2024-07-27 17:09:38.240 8698-8698 DEBUG crash_dump64 A *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2024-07-27 17:09:38.240 8698-8698 DEBUG crash_dump64 A Build fingerprint: 'Redmi/evergo/evergo:13/TP1A.220624.014/V14.0.4.0.TGBCNXM:user/release-keys'
2024-07-27 17:09:38.240 8698-8698 DEBUG crash_dump64 A Revision: '0'
2024-07-27 17:09:38.240 8698-8698 DEBUG crash_dump64 A ABI: 'arm64'
2024-07-27 17:09:38.240 8698-8698 DEBUG crash_dump64 A Timestamp: 2024-07-27 17:09:38.004415071+0800
2024-07-27 17:09:38.240 8698-8698 DEBUG crash_dump64 A Process uptime: 3s
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A ZygotePid: 1437891469
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A Cmdline: com.example.aaa
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A pid: 8604, tid: 8654, name: VkThread >>> com.example.aaa <<<
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A uid: 10203
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000000
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A Cause: null pointer dereference
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A x0 b40000737dfbb910 x1 00000073a4d0a9e0 x2 00000073a4d0a984 x3 0062617241007465
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A x4 0000000000000011 x5 8000000000800000 x6 ff6160713fff7364 x7 7f7f7f7f7f7f7f7f
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A x8 0000000000000000 x9 b40000737dd54a00 x10 000000000000000a x11 0000000000000000
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A x12 b40000737ddbb5c0 x13 b40000737ddc3ac0 x14 000000001ad29800 x15 0000000000000000
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A x16 00000073b79de2a0 x17 00000074e15b4070 x18 00000073a3fd4000 x19 b40000737dfbb910
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A x20 00000073a4d0e000 x21 00000073b76d31a0 x22 0000000000000001 x23 b4000073857a3198
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A x24 0000000000000001 x25 b4000073857a3198 x26 00000073a4d0e000 x27 0000000000000000
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A x28 00000073b76e4000 x29 00000073a4d0aa10
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A lr 00000073b4c495a8 sp 00000073a4d0a9c0 pc 0000000000000000 pst 0000000060001000
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A backtrace:
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A #00 pc 0000000000000000 <unknown>
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A #01 pc 000000000143a5a4 /data/app/~~mUlsDVbQH3XRclE-_me3Hw==/com.example.aaa-NxX8oExdQNHj9Oz-VbgQgw==/lib/arm64/libgodot_android.so
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A #02 pc 000000000143b854 /data/app/~~mUlsDVbQH3XRclE-_me3Hw==/com.example.aaa-NxX8oExdQNHj9Oz-VbgQgw==/lib/arm64/libgodot_android.so
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A #03 pc 0000000003770f04 /data/app/~~mUlsDVbQH3XRclE-_me3Hw==/com.example.aaa-NxX8oExdQNHj9Oz-VbgQgw==/lib/arm64/libgodot_android.so
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A #04 pc 000000000377174c /data/app/~~mUlsDVbQH3XRclE-_me3Hw==/com.example.aaa-NxX8oExdQNHj9Oz-VbgQgw==/lib/arm64/libgodot_android.so
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A #05 pc 0000000003772b94 /data/app/~~mUlsDVbQH3XRclE-_me3Hw==/com.example.aaa-NxX8oExdQNHj9Oz-VbgQgw==/lib/arm64/libgodot_android.so
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A #06 pc 000000000271739c /data/app/~~mUlsDVbQH3XRclE-_me3Hw==/com.example.aaa-NxX8oExdQNHj9Oz-VbgQgw==/lib/arm64/libgodot_android.so
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A #07 pc 0000000002721818 /data/app/~~mUlsDVbQH3XRclE-_me3Hw==/com.example.aaa-NxX8oExdQNHj9Oz-VbgQgw==/lib/arm64/libgodot_android.so
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A #08 pc 0000000003770f04 /data/app/~~mUlsDVbQH3XRclE-_me3Hw==/com.example.aaa-NxX8oExdQNHj9Oz-VbgQgw==/lib/arm64/libgodot_android.so
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A #09 pc 000000000377174c /data/app/~~mUlsDVbQH3XRclE-_me3Hw==/com.example.aaa-NxX8oExdQNHj9Oz-VbgQgw==/lib/arm64/libgodot_android.so
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A #10 pc 0000000003772b94 /data/app/~~mUlsDVbQH3XRclE-_me3Hw==/com.example.aaa-NxX8oExdQNHj9Oz-VbgQgw==/lib/arm64/libgodot_android.so
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A #11 pc 0000000003772d30 /data/app/~~mUlsDVbQH3XRclE-_me3Hw==/com.example.aaa-NxX8oExdQNHj9Oz-VbgQgw==/lib/arm64/libgodot_android.so
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A #12 pc 0000000000f1b8a4 /data/app/~~mUlsDVbQH3XRclE-_me3Hw==/com.example.aaa-NxX8oExdQNHj9Oz-VbgQgw==/lib/arm64/libgodot_android.so
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A #13 pc 0000000000ee9b50 /data/app/~~mUlsDVbQH3XRclE-_me3Hw==/com.example.aaa-NxX8oExdQNHj9Oz-VbgQgw==/lib/arm64/libgodot_android.so (Java_org_godotengine_godot_GodotLib_step+172)
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A #14 pc 000000000021a354 /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148) (BuildId: 7f5a860edf02a702e654f67e19c9adf9)
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A #15 pc 0000000000209398 /apex/com.android.art/lib64/libart.so (nterp_helper+152) (BuildId: 7f5a860edf02a702e654f67e19c9adf9)
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A #16 pc 0000000000029068 [anon:dalvik-classes2.dex extracted in memory from /data/app/~~mUlsDVbQH3XRclE-_me3Hw==/com.example.aaa-NxX8oExdQNHj9Oz-VbgQgw==/base.apk!classes2.dex] (org.godotengine.godot.vulkan.VkRenderer.onVkDrawFrame+0)
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A #17 pc 000000000020a254 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 7f5a860edf02a702e654f67e19c9adf9)
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A #18 pc 000000000002993a [anon:dalvik-classes2.dex extracted in memory from /data/app/~~mUlsDVbQH3XRclE-_me3Hw==/com.example.aaa-NxX8oExdQNHj9Oz-VbgQgw==/base.apk!classes2.dex] (org.godotengine.godot.vulkan.VkThread.run+290)
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A #19 pc 000000000021096c /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+556) (BuildId: 7f5a860edf02a702e654f67e19c9adf9)
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A #20 pc 0000000000279de8 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+184) (BuildId: 7f5a860edf02a702e654f67e19c9adf9)
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A #21 pc 000000000062957c /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+460) (BuildId: 7f5a860edf02a702e654f67e19c9adf9)
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A #22 pc 0000000000671e30 /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1296) (BuildId: 7f5a860edf02a702e654f67e19c9adf9)
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A #23 pc 00000000000fba4c /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204) (BuildId: 3908c7c57fa04c64df24425cf16523cf)
2024-07-27 17:09:38.241 8698-8698 DEBUG crash_dump64 A #24 pc 000000000008e5f0 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 3908c7c57fa04c64df24425cf16523cf)
2024-07-27 17:15:46.189 9901-9942 libc com.example.aaa A Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 9942 (GLThread 355), pid 9901 (com.example.aaa)
Steps to reproduce
- Add a TextureRect to 2d scene.
- attach a C# script on it, modify the script(add a print), make sure it is comipled.
- remote debug to my android device (redmi note 11 5G).
- It will crash imediately after screen splash.
If all C# scripts are removed from scenes , it will not crash.
Minimal reproduction project (MRP)
SAMPLE PROJECT : aaa.zip
I'm unable to reproduce the issue, it may be hardware-dependent. Let me ask a few questions to try and narrow down the issue.
- Are there any other errors or exceptions before the crash? Previous log messages may give us a hint as to what's going on.
- Can you reproduce the issue with a different renderer? I'm not sure if the issue is related to rendering at all, but seeing
VkThreadin the backtrace made me think it may be worth trying different renderers since Vulkan is not always supported. - Can you reproduce the issue with GDScript? It may be that the issue occurs for any scripting language and not just C#.
- Xiaomi Redmi Note 11 Pro 5G, Snapdragon 695,
Adreno 619
I tested yesterday on Samsung Tab S7, also Adreno 6xx. (unable to reproduce)
But without C# (Godotversion), I replaced the C#-Script with GDScript. MRP was set to Compatibility (OpenGLES), but according to the logs the crash happens with Mobile / Forward+ (Vulkan). (org.godotengine.godot.vulkan.VkRenderer.onVkDrawFrame)
@zhmt Can you check that you've uploaded the correct MRP?
@zhmt Can you check that you've uploaded the correct MRP?
Yes. I have tested with it. You have to attach a c# script to a node in scene tree. (the script must do something , printing some string for example ).
- Are there any other errors or exceptions before the crash? Previous log messages may give us a hint as to what's going on.
No, no other errors. just a error about vsync which has no effect on crash.
- Can you reproduce the issue with a different renderer? I'm not sure if the issue is related to rendering at all, but seeing
VkThreadin the backtrace made me think it may be worth trying different renderers since Vulkan is not always supported.
I have tested opengl, no luck.
- Can you reproduce the issue with GDScript? It may be that the issue occurs for any scripting language and not just C#.
If all c# script is removed from scene and autoloading, no crash. GDScript is ok.