godot: Crashes on android devices
Godot version
3.4 stable
System information
Android devices, Build system - Linux, Gles3
Issue description
In android developer console I getting a huge crashes:
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)
libgodot_android.so (offset 0xe0000)
`*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> games.misu.zombie.room.survival.game <<<
backtrace:
#00 pc 00000000011c941c /data/app/~~AdRta8FiFC2yVoZygn13xg==/games.misu.zombie.room.survival.game-PXP58lSuNtRA5jQeEEiuxg==/split_config.arm64_v8a.apk!lib/arm64-v8a/libgodot_android.so (offset 0xe0000)
#00 pc 0000000000330a20 /data/app/~~AdRta8FiFC2yVoZygn13xg==/games.misu.zombie.room.survival.game-PXP58lSuNtRA5jQeEEiuxg==/split_config.arm64_v8a.apk!lib/arm64-v8a/libgodot_android.so (offset 0xe0000)
#00 pc 0000000001144cf4 /data/app/~~AdRta8FiFC2yVoZygn13xg==/games.misu.zombie.room.survival.game-PXP58lSuNtRA5jQeEEiuxg==/split_config.arm64_v8a.apk!lib/arm64-v8a/libgodot_android.so (offset 0xe0000)
#00 pc 00000000011468fc /data/app/~~AdRta8FiFC2yVoZygn13xg==/games.misu.zombie.room.survival.game-PXP58lSuNtRA5jQeEEiuxg==/split_config.arm64_v8a.apk!lib/arm64-v8a/libgodot_android.so (offset 0xe0000)
#00 pc 00000000011453d0 /data/app/~~AdRta8FiFC2yVoZygn13xg==/games.misu.zombie.room.survival.game-PXP58lSuNtRA5jQeEEiuxg==/split_config.arm64_v8a.apk!lib/arm64-v8a/libgodot_android.so (offset 0xe0000)
#00 pc 000000000073c79c /data/app/~~AdRta8FiFC2yVoZygn13xg==/games.misu.zombie.room.survival.game-PXP58lSuNtRA5jQeEEiuxg==/split_config.arm64_v8a.apk!lib/arm64-v8a/libgodot_android.so (offset 0xe0000)
#00 pc 000000000073dc88 /data/app/~~AdRta8FiFC2yVoZygn13xg==/games.misu.zombie.room.survival.game-PXP58lSuNtRA5jQeEEiuxg==/split_config.arm64_v8a.apk!lib/arm64-v8a/libgodot_android.so (offset 0xe0000)
#00 pc 00000000011431d4 /data/app/~~AdRta8FiFC2yVoZygn13xg==/games.misu.zombie.room.survival.game-PXP58lSuNtRA5jQeEEiuxg==/split_config.arm64_v8a.apk!lib/arm64-v8a/libgodot_android.so (offset 0xe0000)
#00 pc 000000000072a360 /data/app/~~AdRta8FiFC2yVoZygn13xg==/games.misu.zombie.room.survival.game-PXP58lSuNtRA5jQeEEiuxg==/split_config.arm64_v8a.apk!lib/arm64-v8a/libgodot_android.so (offset 0xe0000)
#00 pc 000000000072a6a0 /data/app/~~AdRta8FiFC2yVoZygn13xg==/games.misu.zombie.room.survival.game-PXP58lSuNtRA5jQeEEiuxg==/split_config.arm64_v8a.apk!lib/arm64-v8a/libgodot_android.so (offset 0xe0000)
#00 pc 0000000000199188 /data/app/~~AdRta8FiFC2yVoZygn13xg==/games.misu.zombie.room.survival.game-PXP58lSuNtRA5jQeEEiuxg==/split_config.arm64_v8a.apk!lib/arm64-v8a/libgodot_android.so (offset 0xe0000)
#00 pc 0000000000169778 /data/app/~~AdRta8FiFC2yVoZygn13xg==/games.misu.zombie.room.survival.game-PXP58lSuNtRA5jQeEEiuxg==/split_config.arm64_v8a.apk!lib/arm64-v8a/libgodot_android.so (offset 0xe0000) (Java_org_godotengine_godot_GodotLib_step+188)
#00 pc 00000000000882f0 /data/app/~~AdRta8FiFC2yVoZygn13xg==/games.misu.zombie.room.survival.game-PXP58lSuNtRA5jQeEEiuxg==/oat/arm64/base.odex (art_jni_trampoline+144)
#00 pc 000000000019001c /data/app/~~AdRta8FiFC2yVoZygn13xg==/games.misu.zombie.room.survival.game-PXP58lSuNtRA5jQeEEiuxg==/oat/arm64/base.odex (org.godotengine.godot.GodotRenderer.onDrawFrame+92)
#00 pc 00000000006286a4 /system/framework/arm64/boot-framework.oat (android.opengl.GLSurfaceView$GLThread.guardedRun+3652)
#00 pc 0000000000628e90 /system/framework/arm64/boot-framework.oat (android.opengl.GLSurfaceView$GLThread.run+224)
#00 pc 0000000000133564 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548)
#00 pc 00000000001a8a78 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
#00 pc 0000000000556650 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+460)
#00 pc 00000000005a5a74 /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1308)
#00 pc 00000000000afc6c /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
#00 pc 00000000000502c8 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)`
Repeated on different android devices. On my personal + 10 testers could not find and repeat such a failure. Therefore, I cannot fix this problem in any way. 20% of users are affected by this problem and I don’t know how to solve it. I found information on this error in Google, but it says that it will be fixed in the 3.4 version of the engine.
Occurs on completely different processors. Most often cases on: Redmi Note 8 Pro Samsung Galaxy A50
But I think that there is no connection here, it’s just that people have the most of these devices.
Steps to reproduce
No steps.
Minimal reproduction project
Game can be installed from google play: https://play.google.com/store/apps/details?id=games.misu.zombie.room.survival.game
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 2
- Comments: 15 (3 by maintainers)
I’m seeing the same report from my Google Play Console. The only crash that was consistently happening was on a Pixel 2 arm64 emulator. Simply wouldn’t launch:
https://github.com/godotengine/godot/assets/137741188/53702c1f-40fb-4c80-afe3-bccc838a6156
Though I will note, this is Godot 4, so this may not be the same problem anymore, unsure if I should create a new issue for this. Also, here’s the reported console output: https://pastebin.com/wfAWYw0i
any news on that topic ?
Just to provide some info on Android debugging - to debug Android in general the minimum needed to start with might be something like:
Along with the usual stuff like
A crash without debug symbols is rarely enough information to go on on its own. You will usually need access to the hardware that fails and have it cabled to a PC.
In general I personally would advise against using GLES3 on Android, as there are too many things that can go wrong, I’m not sure whether we are officially supporting GLES3 on Android at this stage (I’m just a contributor not a spokesperson 🙂 ).
As it says in the new project dialog, GLES3 may not work on older hardware, and this is especially the case with Android, I would personally expect it to crash / malfunction on a large percentage of users. So I would make a copy of any project and convert to GLES2 and start from there.
I would also usually advise against using custom shaders on Android unless you really know you are doing because you are highly likely to run into hardware issues / hardware bugs, you would have to investigate and work around these yourself. This normally involves studying the relevant GLES API spec, mandated features, checking out the caps of target hardware and working to constraints.
As an open source project we don’t have massive (any! 😁 ) resources to investigate particular problems on specific hardware so we have to rely on users to do a lot of the work, and interest from a capable developer who is likely donating their spare time for free. Also bear in mind Android is problematic for compatibility not just for Godot, but for all devs. I’ve had to deal with similar issues prior to working with Godot, it comes with the territory unfortunately.
We have tried all minor and major releases from version 2.1.3 to 3.4.2 and nothing has changed over the years. The console is still full of inexplicable crashes. Compiling with separate debugging symbols would help, but Godot does not support this feature and is not even going to
And it’s terrible. We cannot get a feature or a good organic traffic when we have 20+% of crashes.
I getting 11 and 12 android versions.