Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash of Godot 4.2.stable game on Google Pixel 2 #85895

Closed
cengiz-pz opened this issue Dec 7, 2023 · 9 comments
Closed

Crash of Godot 4.2.stable game on Google Pixel 2 #85895

cengiz-pz opened this issue Dec 7, 2023 · 9 comments

Comments

@cengiz-pz
Copy link

cengiz-pz commented Dec 7, 2023

Tested versions

4.2.stable

System information

Android 13 - Godot v4.2.stable - Mobile renderer

Issue description

After submitting my game via their web console, Google Play's automated tests reported the following issue with my game that I had exported to Android using Godot 4.2.stable:


Native crash of com.mygodot.game
backtrace:
  Unknown
  #01  pc 0x00000000029eeabc  /data/app/~~s36mj0iluBigFDq4rUezfg==/com.mygodot.game-RsdFbknBUtRayPyTuLnuRQ==/split_config.arm64_v8a.apk!libgodot_android.so
  #02  pc 0x0000000000d9ae14  /data/app/~~s36mj0iluBigFDq4rUezfg==/com.mygodot.game-RsdFbknBUtRayPyTuLnuRQ==/split_config.arm64_v8a.apk!libgodot_android.so
  #03  pc 0x0000000000d71a04  /data/app/~~s36mj0iluBigFDq4rUezfg==/com.mygodot.game-RsdFbknBUtRayPyTuLnuRQ==/split_config.arm64_v8a.apk!libgodot_android.so (Java_org_godotengine_godot_GodotLib_step+252)
  #04  pc 0x0000000000440554  /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148)
  #05  pc 0x0000000000209398  /apex/com.android.art/lib64/libart.so (nterp_helper+152)
  #06  pc 0x0000000000a1852c  /data/app/~~s36mj0iluBigFDq4rUezfg==/com.mygodot.game-RsdFbknBUtRayPyTuLnuRQ==/oat/arm64/base.vdex (org.godotengine.godot.vulkan.VkRenderer.onVkDrawFrame)
  #07  pc 0x000000000020a254  /apex/com.android.art/lib64/libart.so (nterp_helper+3924)
  #08  pc 0x0000000000a18dce  /data/app/~~s36mj0iluBigFDq4rUezfg==/com.mygodot.game-RsdFbknBUtRayPyTuLnuRQ==/oat/arm64/base.vdex (org.godotengine.godot.vulkan.VkThread.run+286)
  #09  pc 0x0000000000436b6c  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+556)
  #10  pc 0x0000000000468938  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+156)
  #11  pc 0x0000000000468620  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+388)
  #12  pc 0x0000000000618214  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1668)
  #13  pc 0x00000000000b63b0  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208)
  #14  pc 0x00000000000530b8  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

Detected on 1 device during testing

Device Google Pixel 2 (Arm) (virtual)

Screen size 1080x1920

Android version Android 13 (SDK 33)

ABI arm64-v8a


It seems to be Vulkan related.

Steps to reproduce

Submit Android export to Google Play with Godot 4.2 & Mobile renderer

Minimal reproduction project (MRP)

Google Play's logcat file for the test run:
googleplay-logcat.txt

@tayangur
Copy link

tayangur commented Dec 8, 2023

The 4.2 version seems to cause a lot of crashes on the Android side. After updating my game with version 4.2, I saw that the number of crashes increased significantly in the Play Console reports. I may go back to version 4.1.

Engine Information:
Version: Godot v4.2.stable
Rendering Method: gl-compatibility

An example of Play Console crash reports. I censored my package name. I can also send a link to the game to whoever is interested in the problem. This is the stack trace of a crash on a real player's device.

There are reports of more devices crashing. I can share each of them if it will help.

Device:
samsung a22x (Galaxy A22 5G)
Android 13 (SDK 33)

Stack trace:

pid: 0, tid: 8506 >>> my.unique.game.name <<<

backtrace:
  #00  pc 0x0000000001a94a88  /data/app/~~oTNXhyPRzqcU4El2eQIp4w==/my.unique.game.name-FH4PXt7P-SI9rbh41HeR5Q==/split_config.arm64_v8a.apk!libgodot_android.so
  #01  pc 0x00000000019287b8  /data/app/~~oTNXhyPRzqcU4El2eQIp4w==/my.unique.game.name-FH4PXt7P-SI9rbh41HeR5Q==/split_config.arm64_v8a.apk!libgodot_android.so
  #02  pc 0x0000000000f4ff04  /data/app/~~oTNXhyPRzqcU4El2eQIp4w==/my.unique.game.name-FH4PXt7P-SI9rbh41HeR5Q==/split_config.arm64_v8a.apk!libgodot_android.so
  #03  pc 0x0000000000ef25d0  /data/app/~~oTNXhyPRzqcU4El2eQIp4w==/my.unique.game.name-FH4PXt7P-SI9rbh41HeR5Q==/split_config.arm64_v8a.apk!libgodot_android.so
  #04  pc 0x00000000033b188c  /data/app/~~oTNXhyPRzqcU4El2eQIp4w==/my.unique.game.name-FH4PXt7P-SI9rbh41HeR5Q==/split_config.arm64_v8a.apk!libgodot_android.so
  #05  pc 0x00000000031000e0  /data/app/~~oTNXhyPRzqcU4El2eQIp4w==/my.unique.game.name-FH4PXt7P-SI9rbh41HeR5Q==/split_config.arm64_v8a.apk!libgodot_android.so
  #06  pc 0x0000000000f4fad4  /data/app/~~oTNXhyPRzqcU4El2eQIp4w==/my.unique.game.name-FH4PXt7P-SI9rbh41HeR5Q==/split_config.arm64_v8a.apk!libgodot_android.so
  #07  pc 0x0000000000ef25d0  /data/app/~~oTNXhyPRzqcU4El2eQIp4w==/my.unique.game.name-FH4PXt7P-SI9rbh41HeR5Q==/split_config.arm64_v8a.apk!libgodot_android.so
  #08  pc 0x00000000033b188c  /data/app/~~oTNXhyPRzqcU4El2eQIp4w==/my.unique.game.name-FH4PXt7P-SI9rbh41HeR5Q==/split_config.arm64_v8a.apk!libgodot_android.so
  #09  pc 0x00000000031000e0  /data/app/~~oTNXhyPRzqcU4El2eQIp4w==/my.unique.game.name-FH4PXt7P-SI9rbh41HeR5Q==/split_config.arm64_v8a.apk!libgodot_android.so
  #10  pc 0x0000000000f4fa8c  /data/app/~~oTNXhyPRzqcU4El2eQIp4w==/my.unique.game.name-FH4PXt7P-SI9rbh41HeR5Q==/split_config.arm64_v8a.apk!libgodot_android.so
  #11  pc 0x0000000000ef25d0  /data/app/~~oTNXhyPRzqcU4El2eQIp4w==/my.unique.game.name-FH4PXt7P-SI9rbh41HeR5Q==/split_config.arm64_v8a.apk!libgodot_android.so
  #12  pc 0x0000000001961218  /data/app/~~oTNXhyPRzqcU4El2eQIp4w==/my.unique.game.name-FH4PXt7P-SI9rbh41HeR5Q==/split_config.arm64_v8a.apk!libgodot_android.so
  #13  pc 0x0000000001983044  /data/app/~~oTNXhyPRzqcU4El2eQIp4w==/my.unique.game.name-FH4PXt7P-SI9rbh41HeR5Q==/split_config.arm64_v8a.apk!libgodot_android.so
  #14  pc 0x00000000019b0158  /data/app/~~oTNXhyPRzqcU4El2eQIp4w==/my.unique.game.name-FH4PXt7P-SI9rbh41HeR5Q==/split_config.arm64_v8a.apk!libgodot_android.so
  #15  pc 0x00000000019dfd88  /data/app/~~oTNXhyPRzqcU4El2eQIp4w==/my.unique.game.name-FH4PXt7P-SI9rbh41HeR5Q==/split_config.arm64_v8a.apk!libgodot_android.so
  #16  pc 0x00000000019fada0  /data/app/~~oTNXhyPRzqcU4El2eQIp4w==/my.unique.game.name-FH4PXt7P-SI9rbh41HeR5Q==/split_config.arm64_v8a.apk!libgodot_android.so
  #17  pc 0x00000000019fabb8  /data/app/~~oTNXhyPRzqcU4El2eQIp4w==/my.unique.game.name-FH4PXt7P-SI9rbh41HeR5Q==/split_config.arm64_v8a.apk!libgodot_android.so
  #18  pc 0x00000000030da718  /data/app/~~oTNXhyPRzqcU4El2eQIp4w==/my.unique.game.name-FH4PXt7P-SI9rbh41HeR5Q==/split_config.arm64_v8a.apk!libgodot_android.so
  #19  pc 0x0000000000d85494  /data/app/~~oTNXhyPRzqcU4El2eQIp4w==/my.unique.game.name-FH4PXt7P-SI9rbh41HeR5Q==/split_config.arm64_v8a.apk!libgodot_android.so
  #20  pc 0x0000000000d85610  /data/app/~~oTNXhyPRzqcU4El2eQIp4w==/my.unique.game.name-FH4PXt7P-SI9rbh41HeR5Q==/split_config.arm64_v8a.apk!libgodot_android.so
  #21  pc 0x000000000307d6d8  /data/app/~~oTNXhyPRzqcU4El2eQIp4w==/my.unique.game.name-FH4PXt7P-SI9rbh41HeR5Q==/split_config.arm64_v8a.apk!libgodot_android.so
  #22  pc 0x000000000307b70c  /data/app/~~oTNXhyPRzqcU4El2eQIp4w==/my.unique.game.name-FH4PXt7P-SI9rbh41HeR5Q==/split_config.arm64_v8a.apk!libgodot_android.so
  #23  pc 0x0000000000da25e8  /data/app/~~oTNXhyPRzqcU4El2eQIp4w==/my.unique.game.name-FH4PXt7P-SI9rbh41HeR5Q==/split_config.arm64_v8a.apk!libgodot_android.so
  #24  pc 0x0000000000d5cff8  /data/app/~~oTNXhyPRzqcU4El2eQIp4w==/my.unique.game.name-FH4PXt7P-SI9rbh41HeR5Q==/split_config.arm64_v8a.apk!libgodot_android.so
  #25  pc 0x0000000000d719d8  /data/app/~~oTNXhyPRzqcU4El2eQIp4w==/my.unique.game.name-FH4PXt7P-SI9rbh41HeR5Q==/split_config.arm64_v8a.apk!libgodot_android.so (Java_org_godotengine_godot_GodotLib_step+208)
  #26  pc 0x000000000034aa30  /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+144)
  #27  pc 0x0000000002007874  /memfd:jit-cache (org.godotengine.godot.gl.GodotRenderer.onDrawFrame+100)
  #28  pc 0x00000000005bdbd4  /apex/com.android.art/lib64/libart.so (nterp_helper+7636)
  #29  pc 0x0000000000bf4654  /data/app/~~oTNXhyPRzqcU4El2eQIp4w==/my.unique.game.name-FH4PXt7P-SI9rbh41HeR5Q==/oat/arm64/base.vdex (org.godotengine.godot.gl.GLSurfaceView$GLThread.guardedRun+896)
  #30  pc 0x00000000005bcd54  /apex/com.android.art/lib64/libart.so (nterp_helper+3924)
  #31  pc 0x0000000000bf4bb0  /data/app/~~oTNXhyPRzqcU4El2eQIp4w==/my.unique.game.name-FH4PXt7P-SI9rbh41HeR5Q==/oat/arm64/base.vdex (org.godotengine.godot.gl.GLSurfaceView$GLThread.run+52)
  #32  pc 0x0000000000333fa4  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612)
  #33  pc 0x000000000023e4d4  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+144)
  #34  pc 0x0000000000539a3c  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1600)
  #35  pc 0x00000000000fb6dc  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204)
  #36  pc 0x000000000008e3b0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)```


@cengiz-pz
Copy link
Author

Hi @tamduk, what is the reported ABI in the crash reports that you're getting?

@tayangur
Copy link

tayangur commented Dec 9, 2023

Hi @tamduk, what is the reported ABI in the crash reports that you're getting?

arm64_v8a

@Calinou
Copy link
Member

Calinou commented Dec 9, 2023

Is your project 2D or 3D? What rendering features does your project use (in particular, things like GPUParticles or skinned meshes)?

For now, I suggest using the Compatibility rendering method when targeting Android, as Vulkan Android drivers can be pretty broken on older devices like a Pixel 2. Make sure to change the .mobile override of the Rendering Method project setting as well, as the dropdown in the top-right corner won't change it.

PS: I'm also seeing a (virtual) at the end of the device name, which makes me think it may be someone running an Android emulator as opposed to a physical device. This can make the issue even worse as Vulkan support in Android emulators is barely tested.

@tamduk This is an unrelated issue, since you're not using the same rendering method and the issue is being reported by users as opposed to Google's automated testing. That said, these backtraces are unfortunately not that useful as they don't contain debug symbols for the Godot part (libgodot_android.so). See also #63060.
If you have a local device you can reproduce the crash on (or can pass the APK to a friend), you can compile a custom export template with the debug_symbols=yes SCons option.

@darksylinc
Copy link
Contributor

darksylinc commented Dec 9, 2023

This may be a Pixel 2 specific problem. Possibly virtual-device only bug.

I have the same problem on a non-godot game I uploaded. Google Play said the prelaunch report failed for that device.
I traced it down to a crash caused by (I didn't investigate further) either:

  1. vkEnumeratePhysicalDevices not returning VK_SUCCESS.
  2. vkEnumeratePhysicalDevices returning 0 devices when asked how many devices it supports.
  3. vkEnumeratePhysicalDevices not returning VK_SUCCESS when asked to return the device after querying for the number of supported devices.

At least for my case, it appears the Vulkan drivers are broken. There's nothing that can be done other than prompting Google to fix it.

Update

I didn't see the user uploaded the logcat. It matches my findings:

12-06 00:23:39.903: E/godot(10158): USER ERROR: vkEnumeratePhysicalDevices reported zero accessible devices.
12-06 00:23:39.903: E/godot(10158): Do you have a compatible Vulkan installable client driver (ICD) installed?
12-06 00:23:39.903: E/godot(10158): vkEnumeratePhysicalDevices Failure
12-06 00:23:39.903: E/godot(10158):    at: _create_physical_device (drivers/vulkan/vulkan_context.cpp:1186)
12-06 00:23:39.903: E/godot(10158): USER ERROR: Condition "err != OK" is true. Returning: ERR_CANT_CREATE
12-06 00:23:39.903: E/godot(10158):    at: _window_create (drivers/vulkan/vulkan_context.cpp:1837)
12-06 00:23:39.903: E/godot(10158): USER ERROR: Failed to create Vulkan window.
12-06 00:23:39.903: E/godot(10158):    at: DisplayServerAndroid (platform/android/display_server_android.cpp:573)
12-06 00:23:39.905: F/libc(10158): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 10194 (VkThread), pid 10158 (com.mygodot.game)
12-06 00:23:39.907: W/Parcel(10158): Expecting binder but got null!

@Alex2782
Copy link
Contributor

Alex2782 commented Dec 9, 2023

This may be a Pixel 2 specific problem. Possibly virtual-device only bug.

I can also confirm this. No OpenGL version can be determined on the Pixel 2 (virtual).


Bildschirmfoto 2023-12-10 um 00 16 36

@cengiz-pz
Copy link
Author

Is your project 2D or 3D? What rendering features does your project use (in particular, things like GPUParticles or skinned meshes)?

2D game with GPUParticles, no skinned meshes

@cengiz-pz
Copy link
Author

Using the compatibility renderer fixed this issue for me.

@Calinou, should I close this issue or do you want to keep it open?

@Calinou
Copy link
Member

Calinou commented Dec 12, 2023

Closing in favor of godotengine/godot-proposals#8006.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants