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

Vulkan: GPUParticles3D crash when duplicating 128 at once #70607

Closed
solek1312 opened this issue Dec 27, 2022 · 20 comments · Fixed by #79849
Closed

Vulkan: GPUParticles3D crash when duplicating 128 at once #70607

solek1312 opened this issue Dec 27, 2022 · 20 comments · Fixed by #79849

Comments

@solek1312
Copy link

Godot version

4.0 Beta 10

System information

Linux Mint 21, Vulkan, Intel Iris Xe (Intel i5-1135G7)

Issue description

Godot throws this pair of errors two times when "Z-Billboard" or "View Depth" flags are checked in GPUParticle3D properties, and when you switch to a scene that contains them:

E 0:03:11:0898   compute_list_bind_uniform_set: Condition "!uniform_set" is true.
  <C++ Source>   drivers/vulkan/rendering_device_vulkan.cpp:7807 @ compute_list_bind_uniform_set()
E 0:03:11:0898   compute_list_dispatch: Uniforms were never supplied for set (2) at the time of drawing, which are required by the pipeline
  <C++ Error>    Method/function failed.
  <C++ Source>   drivers/vulkan/rendering_device_vulkan.cpp:8006 @ compute_list_dispatch()

Also, whenever there's a big enough amount of such particle system nodes in the scene (in reproduction project it's between 128 and 256), Godot freezes, console showing errors:

ERROR: Only one draw/compute list can be active at the same time.
   at: compute_list_begin (drivers/vulkan/rendering_device_vulkan.cpp:7715)
ERROR: Only one draw/compute list can be active at the same time.
   at: compute_list_begin (drivers/vulkan/rendering_device_vulkan.cpp:7715)
ERROR: Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
   at: compute_list_bind_compute_pipeline (drivers/vulkan/rendering_device_vulkan.cpp:7728)
ERROR: Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
   at: compute_list_bind_compute_pipeline (drivers/vulkan/rendering_device_vulkan.cpp:7728)
ERROR: Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
   at: compute_list_bind_uniform_set (drivers/vulkan/rendering_device_vulkan.cpp:7792)
ERROR: Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
   at: compute_list_bind_uniform_set (drivers/vulkan/rendering_device_vulkan.cpp:7792)
ERROR: Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
   at: compute_list_bind_uniform_set (drivers/vulkan/rendering_device_vulkan.cpp:7792)
ERROR: Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
   at: compute_list_bind_uniform_set (drivers/vulkan/rendering_device_vulkan.cpp:7792)
ERROR: Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
   at: compute_list_set_push_constant (drivers/vulkan/rendering_device_vulkan.cpp:7946)
ERROR: Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
   at: compute_list_dispatch_threads (drivers/vulkan/rendering_device_vulkan.cpp:8026)
ERROR: Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
   at: compute_list_bind_uniform_set (drivers/vulkan/rendering_device_vulkan.cpp:7792)
ERROR: Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
   at: compute_list_bind_uniform_set (drivers/vulkan/rendering_device_vulkan.cpp:7792)
ERROR: Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
   at: compute_list_set_push_constant (drivers/vulkan/rendering_device_vulkan.cpp:7946)
ERROR: Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
   at: compute_list_dispatch_threads (drivers/vulkan/rendering_device_vulkan.cpp:8026)
ERROR: Condition "!compute_list" is true.
   at: compute_list_end (drivers/vulkan/rendering_device_vulkan.cpp:8117)

Could be related to #63315 as I'm also using Linux on an integrated Intel GPU.

Steps to reproduce

  1. Make any working particle system
  2. Check "View Depth" flag in draw order OR "Z-Billboard" flag in transform align
  3. Switch to scene with the particle system from any other scene to get "Uniforms were never supplied" error message
  4. Duplicate particled systems (whether instances or local) until there is ~128-256 of them to get the freeze

Minimal reproduction project

testdebug.zip

@Calinou Calinou changed the title GPUParticles3D errors with "Z-Billboard" or "View Depth" flag, freezes engine if there are too many Vulkan: GPUParticles3D errors with "Z-Billboard" or "View Depth" flag, freezes engine if there are too many Dec 27, 2022
@Calinou Calinou added this to the 4.0 milestone Dec 27, 2022
@lostminds
Copy link

Could this be related? #61516 Seems like it's the same error messages, but with some further clues and now a linked PR

@clayjohn
Copy link
Member

@lostminds I'm not sure if they are the same issue. #61516 is an issue with the Material attached to the GPUParticles' Mesh, while this Issue is related to a property of the GPUParticles itself.

@lostminds
Copy link

@lostminds I'm not sure if they are the same issue. #61516 is an issue with the Material attached to the GPUParticles' Mesh, while this Issue is related to a property of the GPUParticles itself.

Ok, well, I hope this issue can be resolved. As far as I can tell the billboarding still works as intended in this case, but I'd rather not use something that generates this kind of error each time an effect scene is loaded. I would try with CPUParticles3D instead, but it seems there is no billboarding option there anymore in 4.0beta14

@clayjohn
Copy link
Member

The first bug in this issue (the two error prints when changing scenes) is fixed by #71925

I debugged the second bug here and, as it turns out, the crash is caused by adding 128 GPUParticles to the scene at once rather than having 256 in the scene. I could reproduce the crash by doubling the the number of particles in the scene with ctrl+d (crashed when copying 128 particles and duplicating), but I could not reproduce the crash when duplicating only 64 at a time. I easily was able to have over 300 in the scene. Updating PR title and milestone accordingly

@clayjohn clayjohn changed the title Vulkan: GPUParticles3D errors with "Z-Billboard" or "View Depth" flag, freezes engine if there are too many Vulkan: GPUParticles3D crash when duplicating 128 at once Jan 23, 2023
@clayjohn clayjohn modified the milestones: 4.0, 4.x Jan 23, 2023
@Sarah-Duck
Copy link

We're ran into this issue for our project, instantiating particles using "Z-Billboard" would spam the logs and randomly crash the game. We have a system that instantiates a collection of various particles to be used globally, like a splash or puff of smoke, but we don't spawn 128 of any of them.

@clayjohn
Copy link
Member

@1029chris It sounds like you may have a different issue. This issue is pretty specific, it results in a hard crash when duplicating 128 particles or more at once. It doesn't spam the logs, it just crashes without printing anything.

You should open a new bug report and include all the requested info as well as a minimal reproduction project so others can try to reproduce and solve the issue that you face

@Sarah-Duck
Copy link

Sarah-Duck commented Apr 28, 2023

@clayjohn Perhaps, but the logs shown here for the freezing is very similar to what we got as well. The frame would hitch and inputs would be eaten. I have a hunch whatever fixes this issue will also fix ours. We ended up removing "Z-Billboard" from all our particles, and we're not crashing or getting log spam anymore. (I'm very thankful for this issue existing, I'm not sure we would have found the source of the crashes without it!)
image

@zicman666
Copy link

zicman666 commented May 8, 2023

@clayjohn Perhaps, but the logs shown here for the freezing is very similar to what we got as well. The frame would hitch and inputs would be eaten. I have a hunch whatever fixes this issue will also fix ours. We ended up removing "Z-Billboard" from all our particles, and we're not crashing or getting log spam anymore. (I'm very thankful for this issue existing, I'm not sure we would have found the source of the crashes without it!)

Hello, I dont find the "Z-Billboard", where can i find it ? Thx a lot
I have the same errors all the time in my game.
When I load a level, when i use particles, when i queue_free sprite_3D , when i have particle collision boxes ... i'm going to be crazy ...

@Calinou
Copy link
Member

Calinou commented May 8, 2023

I think they're referring to the billboard mode property set to Y-Billboard.

@zicman666
Copy link

zicman666 commented May 8, 2023

I think they're referring to the billboard mode property set to Y-Billboard.

Thank you ... unfortunatly i have already tried all the billboard setting.

@Travh98
Copy link

Travh98 commented Jun 10, 2023

I had this issue when running one big GPUParticles3D emitting 1000 particles alongside 100 smaller GPUParticles3D each emitting 3 particles. I had Billboard enabled in the ParticleProcess Material, and crashed with the "compute_list" errors.
I then disabled Billboard in the ParticleProcess material and instead enabled it in my Draw Pass 1 Mesh's material, and I haven't crashed since. - Godot 4.0.3-mono

@IvanIG3
Copy link

IvanIG3 commented Jun 20, 2023

I also found this bug. At a random time, Godot freezes and throws a bunch of errors. I'm using Godot 4.0.3.

godot_bug

@zicman666
Copy link

I also found this bug. At a random time, Godot freezes and throws a bunch of errors. I'm using Godot 4.0.3.
At Random time, like me. Impossible to understand why ... I gave up my project ...

@Calinou
Copy link
Member

Calinou commented Jun 20, 2023

@IvanIG3 @zicman666 If you aren't duplicating a lot of nodes, these are likely unrelated issues. Please open a separate issue with a minimal reproduction project attached, and describe what you were trying to achieve there.

@IvanIG3
Copy link

IvanIG3 commented Jun 25, 2023

@IvanIG3 @zicman666 If you aren't duplicating a lot of nodes, these are likely unrelated issues. Please open a separate issue with a minimal reproduction project attached, and describe what you were trying to achieve there.

I'd like to make a minimal reproduction project with this bug, but I don't know why is this happening and where the error comes from. I don't even know what the error message means, so I have no clue what I need to replicate the bug in a minimal reproduction project. Could someone bring some light? so I can understand what's going on and I'll try to isolate the bug from my project into a minimal reproduction project.
Thanks!

@zicman666
Copy link

zicman666 commented Jun 25, 2023

I have the same problem to find the origin on the errors ...
In my game sometimes i have these errors with Sprite3D, sometimes Particles, textures, 3d objets ... i have tried to change soooooooooo many settings during 2 months ... and finally as i said before I gave up my project ... (my game is on itchio but to avoid the bug i have deleted too many features).

@IvanIG3
Copy link

IvanIG3 commented Jul 3, 2023

Sometimes, when Godot crashes and throws all the COMPUTE_LIST errors to the console, at the end of it there are two more errors that seems related to #71929.

error

@IvanIG3
Copy link

IvanIG3 commented Jul 19, 2023

I've found a reliable way of triggering this bug in Godot 4.1.1 with only 4 GPUParticles3D. The thing is to fill a scene with a lot of Sprite3D (~1400 in my case), and configure the particles with View Depth.

I don't know what's going on, but maybe the View Depth is forcing the particles to z-test with each object in the scene, and that makes the Godot crash.

I attach a MRP. To trigger the bug, just run the project and click the button. What the button does is to change the Particles draw_order to View Depth. The console will fill with hundreds of errors until it freezes/crash.

bug_vk_compute_list.zip

@krazyjakee
Copy link

To confirm, the workaround is to set particle draw order from DRAW_ORDER_VIEW_DEPTH to DRAW_ORDER_INDEX (or any other setting).

Not ideal but it is a workaround.

@idchlife
Copy link

idchlife commented Aug 16, 2023

To confirm, the workaround is to set particle draw order from DRAW_ORDER_VIEW_DEPTH to DRAW_ORDER_INDEX (or any other setting).

Not ideal but it is a workaround.

Does not work for me.

I have thousands of errors in output when scene opened. Particles are set to DRAW_ORDER_INDEX.

Transform Align: Z-Billboard

 Only one draw/compute list can be active at the same time.
  drivers/vulkan/rendering_device_vulkan.cpp:7748 - Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
  drivers/vulkan/rendering_device_vulkan.cpp:7812 - Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
  drivers/vulkan/rendering_device_vulkan.cpp:7812 - Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
  drivers/vulkan/rendering_device_vulkan.cpp:7966 - Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
  drivers/vulkan/rendering_device_vulkan.cpp:8046 - Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
  drivers/vulkan/rendering_device_vulkan.cpp:8194 - Condition "!compute_list" is true.
  Only one draw/compute list can be active at the same time.
  drivers/vulkan/rendering_device_vulkan.cpp:7748 - Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
  drivers/vulkan/rendering_device_vulkan.cpp:7812 - Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
  drivers/vulkan/rendering_device_vulkan.cpp:7812 - Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
  drivers/vulkan/rendering_device_vulkan.cpp:7966 - Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
  drivers/vulkan/rendering_device_vulkan.cpp:8046 - Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
  drivers/vulkan/rendering_device_vulkan.cpp:8194 - Condition "!compute_list" is true.
  Only one draw/compute list can be active at the same time.
  drivers/vulkan/rendering_device_vulkan.cpp:7748 - Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
  drivers/vulkan/rendering_device_vulkan.cpp:7812 - Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
  drivers/vulkan/rendering_device_vulkan.cpp:7812 - Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
  drivers/vulkan/rendering_device_vulkan.cpp:7966 - Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
  drivers/vulkan/rendering_device_vulkan.cpp:8046 - Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
  drivers/vulkan/rendering_device_vulkan.cpp:8194 - Condition "!compute_list" is true.

This workaround from @Trahv98 works! Thanks!

I had this issue when running one big GPUParticles3D emitting 1000 particles alongside 100 smaller GPUParticles3D each emitting 3 particles. I had Billboard enabled in the ParticleProcess Material, and crashed with the "compute_list" errors. I then disabled Billboard in the ParticleProcess material and instead enabled it in my Draw Pass 1 Mesh's material, and I haven't crashed since. - Godot 4.0.3-mono

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

Successfully merging a pull request may close this issue.