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: Flood of GI errors when queue_free()ing a .tscn containing a OmniLight3D when SDFGI is enabled (!light_storage->owns_light_instance(light_instance)) #57840

Closed
Tracked by #55327
macryc opened this issue Feb 9, 2022 · 14 comments · Fixed by #71584

Comments

@macryc
Copy link

macryc commented Feb 9, 2022


Bugsquad note: This issue has been confirmed several times already. No need to confirm it further.


Godot version

4.0 alpha 1

System information

Win10, GLES3, RTX 2070 mobile

Issue description

At runtime, when queue_free()'ing a tscn that contains a omnilight3D node, debugger gets spammed with this error:
pre_process_gi: Condition "!li" is true. Continuing. <C++ Source> servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp:1484 @ pre_process_gi().
The error doesn't show up when the light node is hidden right before it's freed.

Steps to reproduce

  1. start a 3d scene
  2. add a Omnilight3D node, leave it at default settings
  3. add a Environment node, turn on SDFGI, volumetric fog, and glow (all at default settings)
  4. attach a script to queue_free() the Omnilight3D node on keypress
  5. run the game, press the key to queue_free() the Omnilight3D
  6. watch above error flood the debug

Minimal reproduction project

not needed, just do the steps above

@Chaosus Chaosus added this to the 4.0 milestone Feb 9, 2022
@Calinou Calinou changed the title [4.0 alpha1] Flood of GI errors when queue_free()'ing a .tscn containing a omnilight3D when SDFGI is on Vulkan: Flood of GI errors when queue_free()ing a .tscn containing a OmniLight3D when SDFGI is enabled Feb 9, 2022
@cptfurball
Copy link

Hey there, thank you all for the hard work! <3

I just want to add that this issue is still happening in Godot 4.0 Alpha 7. Will this be fixed soon? :D

@Calinou
Copy link
Member

Calinou commented May 2, 2022

Will this be fixed soon? :D

There is no ETA for fixing this issue, as we don't know why it's occurring in the first place yet. The error is likely there for a reason, so I don't think we should just silence it.

@alex9099
Copy link

alex9099 commented May 15, 2022

I got this error but i don't use queue_free to remove any lights. Even hiding them (so they shouldn't be accounted to lighting?) continues giving this error. This on a "complex" project, so there must be something conflicting, it's not queue_free in my case

This error only seems to occur on the editor if the scene with the worldenviroment is open (and being shown), if the game is running and the scene with WE is not shown on the editor then this error does not show up

I'm on alpha8

@cridenour
Copy link
Contributor

On alpha9 this can happen when I call get_tree().quit() on a scene with a larger number of SpotLight3Ds (and SDFGI). Despite the game closing, the debugger hits around 100k errors and then stops.

@cptfurball
Copy link

I just want to mention that this only happens while trying to remove any light3D nodes with "bake mode" set to "dynamic".
The environment would still need to have SDFGI enabled to replicate this.

Not sure if this is related at all but I hope it sheds some light to the issue.

@Calinou
Copy link
Member

Calinou commented Jul 9, 2022

Quoting a workaround from #62852:

A workaround is to set the Node's visibility to false right before you call queue_free() on it.

@LordOdin
Copy link

LordOdin commented Aug 21, 2022

Getting this in 4 alpha 14 as well, pretty certain we are not freeing any lights, only objects
:edit:
Restarting godot fixed it 🤷‍♂️
image

@Chlipouni
Copy link

Not sure it's the same issue, but in my case using "queue_free()" when quitting my main scene generates a lot of errors.
I have a DirectionalLight in my scene, but the errors still happen if i hide it.

Here are the first ones :
queue_free_errors

This behaviour doesn't happen in Godot 3.5 RC1.

@Calinou
Copy link
Member

Calinou commented Sep 17, 2022

@Chlipouni This issue is unrelated, especially if you're not using SDFGI. This is also why it can't occur in 3.5, which doesn't have SDFGI 🙂

@SoapSpangledGames
Copy link

SoapSpangledGames commented Sep 28, 2022

I have also encountered this same problem with tens of thousands of gi errors with SDFGI enabled when queue_free()ing a scene that contains lights (spotlights in my case). They go away entirely if I disable SDFGI in the Environment node.

@viktor-ferenczi
Copy link
Contributor

MRP can be found in #67380

@Calinou Calinou changed the title Vulkan: Flood of GI errors when queue_free()ing a .tscn containing a OmniLight3D when SDFGI is enabled Vulkan: Flood of GI errors when queue_free()ing a .tscn containing a OmniLight3D when SDFGI is enabled (!light_storage->owns_light_instance(light_instance)) Oct 23, 2022
@Eman2022
Copy link

Ran into this error reloading current scene, said scene having omnilights. Setting them all not visible before reloading works. Using 4.0 Beta 4.

@Sarah-Duck
Copy link

Sarah-Duck commented Dec 23, 2022

We're also experiencing this issue on beta 9. Closing a scene with an omnilight in editor will spam this:
image

@michael-nischt
Copy link

We're also experiencing this issue on beta 9. Swapping to a scene with an omnilight in editor will spam this: image

We also have the issue when free'ing a scene either with queue_free() in the player or closing view in editor.
Tested with spot-lights and omni-lights. Scenes without lights all are fine.

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

Successfully merging a pull request may close this issue.