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

GPUParticles3D crash with Z-Billboard after creating certain number of instances #78498

Closed
matmas opened this issue Jun 21, 2023 · 1 comment · Fixed by #79849
Closed

GPUParticles3D crash with Z-Billboard after creating certain number of instances #78498

matmas opened this issue Jun 21, 2023 · 1 comment · Fixed by #79849

Comments

@matmas
Copy link
Contributor

matmas commented Jun 21, 2023

Godot version

v4.0.3.stable.official [5222a99]

System information

Godot v4.0.3 - EndeavourOS #1 SMP PREEMPT_DYNAMIC Wed, 14 Jun 2023 20:10:31 +0000 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2070 SUPER (nvidia; 530.41.03) - Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz (8 Threads)

Issue description

Game crashes with the following errors:

E 0:00:03:0788   compute_list_begin: Only one draw/compute list can be active at the same time.
  <C++ Error>    Condition "compute_list != nullptr" is true. Returning: INVALID_ID
  <C++ Source>   drivers/vulkan/rendering_device_vulkan.cpp:7716 @ compute_list_begin()
E 0:00:03:0788   compute_list_bind_compute_pipeline: Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
  <C++ Source>   drivers/vulkan/rendering_device_vulkan.cpp:7729 @ compute_list_bind_compute_pipeline()
E 0:00:03:0788   compute_list_bind_uniform_set: Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
  <C++ Source>   drivers/vulkan/rendering_device_vulkan.cpp:7793 @ compute_list_bind_uniform_set()
E 0:00:03:0788   compute_list_bind_uniform_set: Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
  <C++ Source>   drivers/vulkan/rendering_device_vulkan.cpp:7793 @ compute_list_bind_uniform_set()
E 0:00:03:0788   compute_list_set_push_constant: Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
  <C++ Source>   drivers/vulkan/rendering_device_vulkan.cpp:7947 @ compute_list_set_push_constant()
E 0:00:03:0788   compute_list_dispatch_threads: Condition "p_list != ID_TYPE_COMPUTE_LIST" is true.
  <C++ Source>   drivers/vulkan/rendering_device_vulkan.cpp:8027 @ compute_list_dispatch_threads()
E 0:00:03:0788   compute_list_end: Condition "!compute_list" is true.
  <C++ Source>   drivers/vulkan/rendering_device_vulkan.cpp:8175 @ compute_list_end()

The total number of errors is a multiple of 7 as the whole set repeats itself some random number of times.

I was able to reproduce the issue with Forward+, Mobile and Compatibility renderer. With Compatibility the game also crashes but without errors.
I was unable to reproduce the issue on machines with Intel iGPUs:

  • Godot v4.0.3 - NixOS 22.11 (Raccoon) - Vulkan (Forward+) - integrated Intel(R) HD Graphics 620 (KBL GT2) () - Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz (4 Threads)
  • Godot v4.0.3 - macOS 11.7.7 - Vulkan (Forward+) - integrated Intel Iris Graphics - Intel(R) Core(TM) i5-4308U CPU @ 2.80GHz (4 Threads)

Maybe related to #70607.

Steps to reproduce

I am creating a new instance of Node3D every frame with two GPUParticles3D children: Emitting and NotEmitting. Only the first one has emitting set to true.

When the number of Node3D instances reaches 500 or a bit more (can be 500, 503, 505, 514, etc.), the game either freezes or crashes with and sometimes without errors in the Errors tab.

I have also observed that the crashes/freezes don't occur in the reproduction project when any of the following is true:

  • NotEmitting's visibility is set to false
  • Emitting's lifetime is below 0.17. Above 0.19 it crashes. Around 0.18 it sometimes crashes and sometimes doesn't.
  • Emitting's transform_align is not set to "Z-Billboard" nor "Z-Billboard + Y to Velocity"

Also when Emitting's one_shot is set to false the game only crashes/freezes and there are no errors in the Errors tab.

In my other project (which I extracted the minimal reproduction project from), the issue occurs regardless of NotEmitting's visibility and Emitting's lifetime values. The only workaround there seems to be setting Emitting's transform_align to a value without "Z-Billboard" in it.

Minimal reproduction project

gpuparticles3d_crash.zip

@matmas matmas changed the title Vulkan: GPUParticles3D crash with Z-Billboard, specific lifetime and number of instances GPUParticles3D crash with Z-Billboard, specific lifetime and number of instances Jun 21, 2023
@matmas matmas changed the title GPUParticles3D crash with Z-Billboard, specific lifetime and number of instances GPUParticles3D crash with Z-Billboard after creating certain number of instances Jun 21, 2023
@clayjohn clayjohn added this to the 4.x milestone Jun 21, 2023
@Tsevion
Copy link

Tsevion commented Jul 16, 2023

Seeing the same thing on Godot 4.1.1-RC1 both on my PC (Windows, Geforce GTX 1070) and Android device (OnePlus NE2215). I've got particle emitters attached to my creatures, and when I hit right around 500. Changing billboarding seems to increase the number to like 700, but inconsistently.

I've played with some of the other settings, like lifetime, one-shot, interpolation. None of them seem to make a significant difference.

Also, in my case, only a small fraction (less than 10%) of the emitters are even active, since they're all generally one-shot, and only enabled by in-game events.

Interestingly... if none of them are visible, the error doesn't occur, and with only a single visible particle system it won't occur, but oddly if you've got 2 visible particle system, at around 1000 invisible particle systems it will reliably occur.

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.

4 participants