How to Debug for Android Devices?

Godot Version

godot 4

Question

I have recently uploaded my first Godot game to the Google Play Store. I’ve discovered via the console I have a couple of bugs causing it to crash. For example:

[split_config.arm64_v8a.apk!libgodot_android.so]
SIGSEGV

When I select the error in the Google Play Console I get a bunch of random info which does nothing to assist me in identifying the source of the crash. For example:

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 6847 >>> com.mycompany.mygame <<<

backtrace:
  #00  pc 0x0000000003333844  /data/app/~~Bi0nqXnb7-UXp-xmDXeroQ==/com.mycompany.mygame-JyKRbjj7jQqrIEeMZpg2YA==/split_config.arm64_v8a.apk!libgodot_android.so
  #01  pc 0x0000000002475318  /data/app/~~Bi0nqXnb7-UXp-xmDXeroQ==/com.mycompany.mygame-JyKRbjj7jQqrIEeMZpg2YA==/split_config.arm64_v8a.apk!libgodot_android.so
  #17  pc 0x00000000000c3914  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208)
  #18  pc 0x000000000005d084  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+68)

I don’t even know where to start to decipher this. I don’t know which class, scene, line this is referring to. I was able to discover the SIGSEGV is referring to a memory issue, so I’ve been looking into that.

I have played my game hundreds of times, I have had testers play it as well. I’ve played it in the emulator and across multiple real devices and so far haven’t discovered a scenario where the game crashed.

However, just playing the game with no idea of where to look seems like a haphazard way to locate a bug. If I wasn’t an independent developer but instead a company with employees and millions of downloads - this couldn’t possibly be the way they would use to quickly locate and resolve bugs!

I’ve seen comments about Godot not currently having debug symbols. I’m still a novice level developer - but is there any way to get more detailed information regarding crashes and ANRs for Android? I figure there has to be something or else what’s the point of developing in Godot.

Any feedback would be greatly appreciated!

I haven’t tried it yet, but I think you would have to create your own Android template and the debug symbols. As long as Godot engine does not provide these debug symbols (maybe soon, someday)


Debugging symbols: Introduction to the buildsystem — Godot Engine (stable) documentation in English

Play Console Help: Deobfuscate or symbolicate crash stack traces - Play Console Help

For the Play Console Help link - it doesn’t appear that Godot is applicable.

It states that for applications developed in Java I can use ProGaurd (which is not applicable)

And for apps developed in native code, like C++, one can upload a debug symbols file. I know that Godot can support C++, but I built my game in GDScript, which I do not think would be considered native…so not applicable?

I posted the second link so you know where to upload it to the Play Store. You can ignore the rest.

Native: Generate a debug symbols file

GdScript calls the native C++ functions in the engine. GdScript does not directly cause crashes (GdScript is not native).


  1. Introduction to the buildsystem — Godot Engine (stable) documentation in English

  2. Custom Template

  3. Upload Debug Symbols to the Play Store Console