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

ERROR: RID_Owner<struct RasterizerSceneGLES3::LightInstance>::getornull: Condition "!id_map.has(p_rid.get_data())" is true. Returned: 0 #71

Open
Zylann opened this issue Aug 18, 2020 · 2 comments
Labels
bug Engine bug Problem is in Godot Engine

Comments

@Zylann
Copy link
Owner

Zylann commented Aug 18, 2020

When using the rocket launcher to blow stuff up, causing explosions with an OmniLight in each of them, at some point, this error starts to spam:

ERROR: RID_Owner<struct RasterizerSceneGLES3::LightInstance>::getornull: Condition "!id_map.has(p_rid.get_data())" is true. Returned: 0

The rate at which it happens is random, I can be blowing stuff up for 10 seconds, 1 minute or 5 minutes until it starts happening.
The game continues to work fine, although I'm in a debug build, which means this could have caused a crash. It also causes a lot of lag due to the logspam.

In the engine, it happens in RasterizerSceneGLES3::_setup_light. From what I assume looking at the code, the renderer is trying to setup OmniLights and SpotLights affecting a mesh before drawing it. There is 1 light RID attached on the mesh, however the light cannot be found in id_map (explosions auto-destroy after 3 seconds). A possible cause would be the light got destroyed, without updating this list.
So the game ends up with meshes having dangling light RIDs attached to them, and never go away. When the camera looks at them, spamming occurs.

But I have zero clue as to how this happens in the first place. I tried reproducing in a small test scene, to no avail, of course. Trying to debug this is really difficult because the only reproduction case I have involves tons of objects in the scene...


[08:59:08] <lawnjelly> Zylann: That could possibly be due to the leak in octree, and the pairing. you could try naithar or my fixed versions.
[08:59:30] <lawnjelly> #41123
[08:59:31] <IssueBot> #41123: [WIP] Optimize octree and fix leak | https://git.io/JJ1Ip
[08:59:45] <lawnjelly> #41122
[08:59:45] <IssueBot> #41122: [3.2] Octree's octant invalidation/removing | https://git.io/JJ1Ib
[09:00:16] <lawnjelly> That's just a hunch though. Could be multiple possible references being dangled.
@PhilipWee
Copy link

Yo, we are having the same issue in our game, any ideas on how we might fix it?

@Zylann
Copy link
Owner Author

Zylann commented Jan 12, 2021

Take a look at godotengine/godot#41360

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Engine bug Problem is in Godot Engine
Projects
None yet
Development

No branches or pull requests

2 participants