-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Strange bug with 3 sprites, where one of them uses gdshader - Android 10 #79760
Comments
Since only a single device-type shows this problem, it might be hardware-related. That would make it difficult to fix this on the Godot-side. |
Can you help me with debugging? |
@marko995 i don't believe so, because without the specific device I can't replicate the problem. |
yeah, I know, but can you give me guidelines on how to debug the issue? I already tried to build godot editor from source with debugging symbols, but I got same error message :/ |
For questions regarding godot-compilation I suggest to join the contributors chat at https://chat.godotengine.org/ |
I experience a similar issue on Sony Xperia XZ1 Compact running Android 11. I narrowed down the problem to the |
The issue is present on |
3.x is not a Vulkan app, so it could be related to your device's Vulkan drivers, too |
Minimal reproduction project: https://github.com/marko995/CircleJumpGodot4 Some bugs have been fixed in the last few weeks, you might be able to test again soon with version 4.2.x or 4.3. |
it still crashes |
and v4.2.1?
This version contains the bug fixes that I meant. |
still crashing..kk |
@Alex2782 |
It doesn't mention specific instructions for enabling Vulkan validation layers on Android. I can find this from a quick search: https://developer.android.com/ndk/guides/graphics/validation-layer |
ok thanks, 2 days ago Github showed 404 error (not found), today it works again |
@Alex2782 crash happens because of this line: when I don't use it, works fine |
logcat: https://pastebin.com/Z8H5tDUQ but in the project I can't find any audio files that are played You could also try starting an empty 2D project (maybe with only 1 text label, no gdshader) via remote debugging and log everything without filters
|
ok on my Samsung Tab S7 no problems (newer Vulkan version) |
problem happens when I use if I use 2 sprites, everything works. Probably the problem is in vulkan driver, because when I use the newer phone, motorola g5, works fine. |
strange, and if only
|
@Alex2782 |
I just wanted to narrow down the error. I understood the rest.😄
without shader_type canvas_item;
uniform vec4 color : source_color;
void fragment() {
} |
doesn't work:
it works:
|
the idea is to manipulate colors through material parameter, which is not working. |
@Alex2782 is it possible to use |
@Alex2782
|
yup, problem is in word
|
Github: uniform + android 14 issues open. I still have an old Samsung tablet with Android 8, if I find time I'll try to test it with Godot. |
@Alex2782 Ok, but I think this won't be fixed soon :/ |
Unfortunately, I don't know much about shaders at all, after a short research I couldn't find any examples without "uniform". There are also https://docs.godotengine.org/en/stable/tutorials/shaders/compute_shaders.html # Create a uniform to assign the buffer to the rendering device
var uniform := RDUniform.new()
uniform.uniform_type = RenderingDevice.UNIFORM_TYPE_STORAGE_BUFFER |
Samsung Galaxy Tab A (2016) SM-T580, Android 8, armeabi-v7a: no problems with Vulkan and
https://vulkan.gpuinfo.org/ This comparison could perhaps be useful:
For example, Samsung has these 2 'extensions'. They are also queried by Godot (optional). If I find more time again, I'll try to experiment with the sources. |
@Alex2782 |
@marko995: if you find the time at some point, please try it out. Are the crashes reproducible? I need a project where I can debug the functions at the push of a button.
On my Samsung Galaxy Tab A (2016) SM-T580, there are no problems with the color shaders, but with the compute shader (output = input). |
@Alex2782 But when I pressed Add ShaderMaterial first (or after compute), app crashed instantly. |
@Alex2782 any luck? |
I will release a debug APK for it soon, last I checked OpenGL ES3. I found some debug settings in the Godot sources, I still have to try if this is also possible with Vulkan. |
Firebase - Test Lab has also I have tried with
|
Next week I'll try to add debug_callback. I can test 5 x per day for free at Firebase on real devices, there are also a lot of virtual ones, which are probably unsuitable because of software renderer. |
I'm looking for a shader-related crash and I'm not sure if this issue is about it, because nor the title nor the description explicitly mention a crash. The title says "strange bug". Then again in the description line:
The first and only mention of crash is when trying to fix it:
and in the label: crash I think it would be clearer to add the words crash in both the title and bug description instead of "strange bug" because it's not clear what the issue is without running the MRP (esp. if it only happens on a certain device). Anyway, I'll be following the other shader-related crash issues, so this is just to help other users find things more easily. |
maybe only Adreno 5xx affected by the
Test on Firebase (Mi A2 Lite)After a few seconds, a shader is dynamically attached to CanvasItem, after which the app crashes. web-build_20240328_nyxe_daisy_sprout-29-en_US-landscape_video.mp4 |
Is there any update on this crash? I am facing it on Godot version 4.2.1 also which is the latest stable version |
I gave up 3 weeks ago, it takes too much time to test on Firebase (cloud service). I only have Adreno 6xx and 4xx. On Adreno 4xx Godot Vulkan apps do not start at all, the official demo app from Google does, so I will prefer the Adreno 4xx problems first, as long as I don't have Adreno 5xx yet. |
This comment was marked as outdated.
This comment was marked as outdated.
no crash if all nodes have a Video: Firebase Test Labweb-build_20240522_ds2a_daisy_sprout-29-en_US-landscape_video.mp4It looks to me as if the commands have to be executed in the correct order (on Adreno 5xx): |
Godot version
4.0, 4.1, 4.1.1
System information
Godot v4.1.1.stable (bd6af8e) - Fedora Linux 37 (Workstation Edition) - Vulkan (Mobile) - integrated Intel(R) Graphics (ADL GT2) () - 12th Gen Intel(R) Core(TM) i5-12500H (16 Threads)
Issue description
Hi guys,
I am porting circle android jump game from kids can code tutorial using vulkan renderer.
I am using an old phone Xiaomi mi a2 (Android 10, it support vulkan 1.0 and gles3.2)
I found a strange bug, where I am rendering 3 sprites, two sprites use png, third use png with gdshader.
Tested situations:
When I hide one of them (nvm which one) everything is working. So, in this case, if there is one sprite with png, and a second with gdshader, everything is working.
When I remove gdshader from the sprite, everything is working.
When I remove gdshader, but add more sprites, everything is working.
I will send github repo to see details.
I did tests on other phones, like moto g5(android 12) and samsung a52(android 12), and on pc as well, and everything is working.
It's working in compatibility renderer!
logcat:
https://pastebin.com/Z8H5tDUQ
Currently, I am trying to build editor and export a template with debugging symbols to find the line where it's crashing, but I found nothing.
I am open to any suggestions to fix this error because it has very unpredictable behavior.
Steps to reproduce
Minimal reproduction project
I removed all unnecessary files.
https://github.com/marko995/CircleJumpGodot4
The text was updated successfully, but these errors were encountered: