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)

Most upvoted comments

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:

  • Provide an ADB logcat trace when the error occurs. This will provide godot output and can in some cases help pinpoint what is going wrong, particularly with CPU side problems.
  • Stack trace with debug symbols.
  • Precise version info - previous version it worked at e.g. 3.2.2 beta 2 (if it did), at what point did it stop working (same format) . This may help pin down some potential culprits if significant changes were made.
  • Minimum reproduction project (not a full game) I had a work in progress doc I was working on about these which may be useful at: https://github.com/lawnjelly/Misc/blob/master/MRP2.md

Along with the usual stuff like

  • Hardware info and OS versions etc for any devices that fail, and any that work

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.

Note that the latest “stable” version of 3.4 is 3.4.2, and we are already on betas for 3.4.3: https://godotengine.org/article/release-candidate-godot-3-4-3-rc-1

It is highly advised to use the latest point release to get all the latest bug fixes (unless there has been some regression which breaks an earlier version, which we try to avoid), this may be a bug that has been fixed.

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

Yes, I get tons of these errors, hundreds of thousands of people play mine, and my Google Play Console reports tens of thousands of crashes every day.

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.