You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Godot version:
Godot 3.2.4 dev 279f4fb
Might happen too in Godot 4.0
OS/device including version:
Windows 10 64 bits
Issue description: SpatialEditor tries to modify grid instances that were not created. This is a problem occurring around the same area as #44642
Seems like it need a review.
It prints this in the console:
ERROR: RID_Owner<struct VisualServerScene::Instance>::get: Condition "!p_rid.is_valid()" is true. Returned: 0
At: C:\Projects\Godot\Engine\godot_fork\core/rid.h:149
ERROR: VisualServerScene::instance_set_visible: Condition "!instance" is true.
At: servers\visual\visual_server_scene.cpp:662
Steps to reproduce:
I opened a project, which opened its main scene. I created a new scene and the error showed up.
I don't have more precise steps, however I found this because I had a C++ debugger attached, and I told it to break each time an error got logged, initially to debug my own things.
So here is the crime scene:
The problem is straightforward to see: SpatialEditor::clear() is called, in which it tries to set every grid as visible, if it is enabled.
It should not get fixed by simply checking if it's null though, because something already went wrong before: grid_enable is true only for index 2 (the XZ grid), but only the RID at index 1 is assigned, the others are null. So here it tries to set visibility of a null RID, causing the error.
Having a null RID in a slot where grid_enable is true is an odd situation. EIther it's expected somehow, or was badly initialized.
There is a supposedly dangling RID in a slot where grid_enable is false. It should never have been assigned since grid XY is not enabled.
However as you can see, this can't be the origin of the problem. In worst case, you might just see a different error for the same reasons.
Note 2: in #44642 that was also the case: only the RID at index 1 was set.
Minimal reproduction project:
None, sorry.
The text was updated successfully, but these errors were encountered:
Zylann
changed the title
SpatialEditor tries to modify null RID when creating a new scene while the grid and axes are turned off
SpatialEditor tries to modify null RID when creating a new scene
Dec 26, 2020
Godot version:
Godot 3.2.4 dev 279f4fb
Might happen too in Godot 4.0
OS/device including version:
Windows 10 64 bits
Issue description:
SpatialEditor
tries to modify grid instances that were not created. This is a problem occurring around the same area as #44642Seems like it need a review.
It prints this in the console:
Steps to reproduce:
I opened a project, which opened its main scene. I created a new scene and the error showed up.
I don't have more precise steps, however I found this because I had a C++ debugger attached, and I told it to break each time an error got logged, initially to debug my own things.
So here is the crime scene:
The problem is straightforward to see:
SpatialEditor::clear()
is called, in which it tries to set every grid as visible, if it is enabled.It should not get fixed by simply checking if it's null though, because something already went wrong before:
grid_enable
istrue
only for index2
(the XZ grid), but only the RID at index1
is assigned, the others are null. So here it tries to set visibility of a null RID, causing the error.grid_enable
is true is an odd situation. EIther it's expected somehow, or was badly initialized.grid_enable
is false. It should never have been assigned since grid XY is not enabled.Note 1:
My build of Godot has this change inside:
However as you can see, this can't be the origin of the problem. In worst case, you might just see a different error for the same reasons.
Note 2: in #44642 that was also the case: only the RID at index
1
was set.Minimal reproduction project:
None, sorry.
The text was updated successfully, but these errors were encountered: