Godot: Android crash with two specific images for no clear reason

Created on 26 Sep 2020  ·  4Comments  ·  Source: godotengine/godot

I wasn't able to find anything that seemed indicative of this issue, but it's possible I wasn't using the right search words.

Godot version:
3.2.3.stable

OS/device including version:
Android 11/Pixel 4

Issue description:
When running the provided demo project, it appears the images included cause Android itself to crash pretty badly; if you let it completely stop flickering on startup, it crashes the entire phone and the phone does not seem to continue to be functional at all. It must be the case that some setting is wrong I guess that causes Android to lose its mind, but I tried almost everything and could not figure it out. This happens on both GLES 2 and 3.

Hard reset eventually fixed it, but at first it seemed to have completely bricked the phone as even attempting to reset the phone seemed to be unresponsive, so be careful with the demo project I've provided - if you get the flicker right away when exporting to Android, it may be best not to let it complete. There is nothing, as far as I can tell, that's special about either of the images included; I'd used these in previous versions of Godot as an on-screen joystick implementation and had no trouble with them.

Steps to reproduce:
Download demo project
Run it on Android

Minimal reproduction project:
BorkedJoystick.zip

bug confirmed crash android porting

All 4 comments

at first it seemed to have completely bricked the phone ...

~I doubt an image can cause that~, looks like a random hardware failure but I definitely won't test it;)

I wonder if this issue is related to that viral image that was crashing android phones https://www.google.com/amp/s/www.popularmechanics.com/technology/amp32757062/android-wallpaper-crash/

Image information:

❯ file **/*.png
assets/ui/JoystickBase.png:   PNG image data, 64 x 64, 8-bit/color RGBA, non-interlaced
assets/ui/JoystickButton.png: PNG image data, 32 x 32, 8-bit/color RGBA, non-interlaced
icon.png:                     PNG image data, 128 x 128, 8-bit/color RGBA, non-interlaced

❯ identify **/*.png
assets/ui/JoystickBase.png PNG 64x64 64x64+0+0 8-bit sRGB 1446B 0.000u 0:00.000
assets/ui/JoystickButton.png PNG 32x32 32x32+0+0 8-bit sRGB 741B 0.000u 0:00.000
icon.png PNG 128x128 128x128+0+0 8-bit sRGB 7370B 0.000u 0:00.000

These files don't seem any special to me…

Does it work better if you try to export this project where I optimized the images using oxipng --strip --zopfli?
BorkedJoystick.zip

@WolfgangSenff I was experiencing the same crash behavior on my mobile device, a Moto E4 with an Adreno 308 GPU. Through trial and error I was able to narrow down the point at which this crash behavior begins to occur, running the project under Godot_3.2-rc1 it works normally, builds beginning with Godot_3.2-rc2 and later caused the phone to reboot.

After reviewing the diff between 3.2-rc1 and 3.2-rc2 I noticed that PR 35302 looked like the most likely cause.

I then confirmed that changing the project Environment so that background mode is set to Custom Color rather than Sky allows my project to run on versions of Godot later than 3.2-rc1 without causing the phone to crash.

I've attached the modified borkedjoystick project, this is after changing the default_env.tres and I also changed Joystick.tscn to fix a case sensitivity problem with the resource path so that it reads as res://assets/ui/... rather than res://assets/UI/...

I'd appreciate if you can confirm if this modified project now runs successfully on your device.

BorkedJoystick-rev2.zip

Also this issue sounds like its closely related: Issue 26924

Was this page helpful?
0 / 5 - 0 ratings