Dodge the Creeps tutorial game crashes immediately on Android

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By gdough

I recently built the example game Dodge the Creeps from the Godot Engine documentation. It runs fine on desktop (PC), but when it came to the exporting section of the docs, I couldn’t get the game to run on my Android device. I used adb to install the app, but the result is no different when just running the game on the device via the Android button in the top-right of Godot.

A site I came across suggested using adb to get the output of what was happening on the device using adb logcat godot:I ActivityManager:I *:S. Here’s what I got (project has “Verbose Stdout” enabled):

11:06:04.907   986  4214 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10004000 cmp=org.godotengine.dodgethecreeps/com.godot.game.GodotApp} from uid 10152
11:06:05.507   986  1008 W ActivityManager: Slow operation: 462ms so far, now at startProcess: returned from zygote!
11:06:05.507   986  1008 W ActivityManager: Slow operation: 463ms so far, now at startProcess: done updating battery stats
11:06:05.507   986  1008 W ActivityManager: Slow operation: 463ms so far, now at startProcess: building log message
11:06:05.507   986  1008 I ActivityManager: Start proc 11708:org.godotengine.dodgethecreeps/u0a134 for activity org.godotengine.dodgethecreeps/com.godot.game.GodotApp
11:06:05.507   986  1008 W ActivityManager: Slow operation: 463ms so far, now at startProcess: starting to update pids map
11:06:05.507   986  1008 W ActivityManager: Slow operation: 463ms so far, now at startProcess: done updating pids map
11:06:06.834 11708 11727 I godot   : Godot Engine v3.2.3.stable.official - https://godotengine.org
11:06:06.861 11708 11727 I godot   : Using GLES2 video driver
11:06:06.861 11708 11727 I godot   : godot: ENABLING GL DEBUG
11:06:06.874 11708 11727 I godot   : OpenGL ES 2.0 Renderer:
11:06:06.909 11708 11727 E godot   : **ERROR**: Condition "v.id == 0" is true. Returned: __null
11:06:06.909 11708 11727 E godot   :    At: drivers/gles2/shader_gles2.cpp:228:get_current_version() - Condition "v.id == 0" is true. Returned: __null
11:06:06.909 11708 11727 E godot   : **ERROR**: Condition "!version" is true. Returned: false
11:06:06.909 11708 11727 E godot   :    At: drivers/gles2/shader_gles2.cpp:89:bind() - Condition "!version" is true. Returned: false
11:06:06.909 11708 11727 I godot   : OpenGL ES 2.0 Batching: ON
11:06:06.909 11708 11727 I godot   :      OPTIONS
11:06:06.909 11708 11727 I godot   :      max_join_item_commands 16
11:06:06.909 11708 11727 I godot   :      colored_vertex_format_threshold 0.25
11:06:06.909 11708 11727 I godot   :      batch_buffer_size 16384
11:06:06.909 11708 11727 I godot   :      light_scissor_area_threshold 1
11:06:06.909 11708 11727 I godot   :      item_reordering_lookahead 4
11:06:06.909 11708 11727 I godot   :      light_max_join_items 32
11:06:06.909 11708 11727 I godot   :      single_rect_fallback False
11:06:06.909 11708 11727 I godot   :      debug_flash False
11:06:06.909 11708 11727 I godot   :      diagnose_frame False
11:06:06.923 11708 11727 E godot   : **ERROR**: Directional shadow framebuffer status invalid
11:06:06.923 11708 11727 E godot   :    At: drivers/gles2/rasterizer_scene_gles2.cpp:4027:initialize() - Directional shadow framebuffer status invalid
11:06:06.949 11708 11727 I godot   :
11:06:08.449   986 11744 W ActivityManager:   Force finishing activity org.godotengine.dodgethecreeps/com.godot.game.GodotApp
11:06:08.493   986  1007 I ActivityManager: Showing crash dialog for package org.godotengine.dodgethecreeps u0
11:06:08.545   986  3311 I ActivityManager: Process org.godotengine.dodgethecreeps (pid 11708) has died: vis  +99TOP
11:06:08.779   986  4217 W ActivityManager: Scheduling restart of crashed service com.google.android.gms/.chimera.GmsIntentOperationService in 1000ms
11:06:08.779   986  4217 W ActivityManager: Scheduling restart of crashed service com.google.android.gms/.analytics.service.AnalyticsService in 10999ms
11:06:09.101   986  1008 W ActivityManager: Slow operation: 282ms so far, now at startProcess: returned from zygote!
11:06:09.102   986  1008 W ActivityManager: Slow operation: 282ms so far, now at startProcess: done updating battery stats
11:06:09.102   986  1008 W ActivityManager: Slow operation: 282ms so far, now at startProcess: building log message
11:06:09.102   986  1008 W ActivityManager: Slow operation: 283ms so far, now at startProcess: starting to update pids map
11:06:09.102   986  1008 W ActivityManager: Slow operation: 283ms so far, now at startProcess: done updating pids map
11:06:15.734   986 11744 W ActivityManager: Ignoring remove of inactive process: ProcessRecord{5f1b664 0:org.godotengine.dodgethecreeps/u0a134}

My phone is a Moto G4 running Android version 9. It is a custom ROM which may mean it has a bug in it causing this problem. Hopefully the logs will reveal something?

Thanks.

Try switching renderer to GLES3.

yrtv | 2021-02-07 17:00

I did in fact try this and I had no luck.

Just tried it again. adb output when using GLES3:

19:05:43.017   986  4219 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10004000 cmp=org.godotengine.dodgethecreeps/com.godot.game.GodotApp} from uid 10152
19:05:43.402   986  1008 W ActivityManager: Slow operation: 309ms so far, now at startProcess: returned from zygote!
19:05:43.402   986  1008 W ActivityManager: Slow operation: 309ms so far, now at startProcess: done updating battery stats
19:05:43.403   986  1008 W ActivityManager: Slow operation: 309ms so far, now at startProcess: building log message
19:05:43.403   986  1008 I ActivityManager: Start proc 24838:org.godotengine.dodgethecreeps/u0a134 for activity org.godotengine.dodgethecreeps/com.godot.game.GodotApp
19:05:43.403   986  1008 W ActivityManager: Slow operation: 309ms so far, now at startProcess: starting to update pids map
19:05:43.403   986  1008 W ActivityManager: Slow operation: 309ms so far, now at startProcess: done updating pids map
19:05:43.403   986  1008 W ActivityManager: Slow operation: 127ms so far, now at startProcess: asking zygote to start proc
19:05:43.594   986  1008 W ActivityManager: Slow operation: 319ms so far, now at startProcess: returned from zygote!
19:05:43.595   986  1008 W ActivityManager: Slow operation: 319ms so far, now at startProcess: done updating battery stats
19:05:43.595   986  1008 W ActivityManager: Slow operation: 319ms so far, now at startProcess: building log message
19:05:43.595   986  1008 W ActivityManager: Slow operation: 319ms so far, now at startProcess: starting to update pids map
19:05:43.595   986  1008 W ActivityManager: Slow operation: 319ms so far, now at startProcess: done updating pids map
19:05:44.464 24838 24879 I godot   : Godot Engine v3.2.3.stable.official - https://godotengine.org
19:05:44.491 24838 24879 I godot   : Using GLES3 video driver
19:05:44.491 24838 24879 I godot   : OpenGL ES 3.0 Renderer:
19:05:44.538 24838 24879 E godot   : **ERROR**: Condition "status != 0x8CD5" is true. Continuing.
19:05:44.538 24838 24879 E godot   :    At: drivers/gles3/rasterizer_scene_gles3.cpp:5095:initialize() - Condition "status != 0x8CD5" is true. Continuing.
------------------- edit: the above 2 lines 28 more times ------------------
19:05:44.548 24838 24879 E godot   : **ERROR**: Condition "status != 0x8CD5" is true. Continuing.
19:05:44.548 24838 24879 E godot   :    At: drivers/gles3/rasterizer_scene_gles3.cpp:5095:initialize() - Condition "status != 0x8CD5" is true. Continuing.
19:05:44.548 24838 24879 E godot   : **ERROR**: Directional shadow framebuffer status invalid
19:05:44.548 24838 24879 E godot   :    At: drivers/gles3/rasterizer_scene_gles3.cpp:5120:initialize() - Directional shadow framebuffer status invalid
19:05:44.548 24838 24879 E godot   : **ERROR**: Condition "status != 0x8CD5" is true. Continuing.
19:05:44.548 24838 24879 E godot   :    At: drivers/gles3/rasterizer_scene_gles3.cpp:5223:initialize() - Condition "status != 0x8CD5" is true. Continuing.
------------------- edit: the above 2 lines 28 more times ------------------
19:05:44.550 24838 24879 E godot   : **ERROR**: Condition "status != 0x8CD5" is true. Continuing.
19:05:44.550 24838 24879 E godot   :    At: drivers/gles3/rasterizer_scene_gles3.cpp:5223:initialize() - Condition "status != 0x8CD5" is true. Continuing.
19:05:44.553 24838 24879 E godot   : **ERROR**: Condition "status != 0x8CD5" is true. Continuing.
19:05:44.553 24838 24879 E godot   :    At: drivers/gles3/rasterizer_scene_gles3.cpp:5303:initialize() - Condition "status != 0x8CD5" is true. Continuing.
------------------- edit: the above 2 lines 4 more times -------------------
19:05:44.553 24838 24879 E godot   : **ERROR**: Condition "status != 0x8CD5" is true. Continuing.
19:05:44.553 24838 24879 E godot   :    At: drivers/gles3/rasterizer_scene_gles3.cpp:5303:initialize() - Condition "status != 0x8CD5" is true. Continuing.
19:05:44.571 24838 24879 I godot   :
19:05:46.134   986 24895 W ActivityManager:   Force finishing activity org.godotengine.dodgethecreeps/com.godot.game.GodotApp
19:05:46.153   986  1007 I ActivityManager: Showing crash dialog for package org.godotengine.dodgethecreeps u0
19:05:46.250   986  4218 I ActivityManager: Process org.godotengine.dodgethecreeps (pid 24838) has died: vis  +99TOP
19:05:46.344   986  1032 W ActivityManager: setHasOverlayUi called on unknown pid: 24838
19:05:49.954   986 24895 W ActivityManager: Ignoring remove of inactive process: ProcessRecord{7a84802 0:org.godotengine.dodgethecreeps/u0a134}

gdough | 2021-02-07 17:03

Does it work in android SDK bundled emulator and only fails on hardware?
Does any Godot Asset Library projects work on device?

yrtv | 2021-02-07 18:24

Both are good questions.

I do not have Android Studio or SDK installed, but I do have platform-tools installed (it’s how I have access to adb). Running the Android emulator could be an option to try, if your other suggestion doesn’t work.

I followed along with the tutorial writing the code myself, so perhaps it’s a problem with my GDScripts. I’ll test the Dodge the Creeps final project found on the assets library, and others, to see if any of them run successfully.

Thanks.

gdough | 2021-02-07 20:39