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
Reproducible in 4.3.dev5, 4.2.1 stable
Not Reproducible in 4.1.1 and 4.0.2
System information
Windows 10
Issue description
Whenever I try removing a child from a GraphNode when the removing child is the only child, an error message is issued in the output:
scene/main/node.cpp:1614 - Index p_index = 0 is out of bounds ((int)data.children_cache.size() - data.internal_children_front_count_cache - data.internal_children_back_count_cache = 0).
I would expect this error not to appear when removing the only child.
This issue had been encountered and fixed before when it caused the editor to crash: #69284
Since then, it appears to have returned, but it fortunately does not crash the editor.
Hi, I'm a student and i managed to solve this issue by changing this check to (>1), because before it didnt take into account the HboxContainer Node. Will open a PR soon.
…aphNode
A previous commit added an internal node (HboxContainer) to the
GraphNode, so get_child_count() > 0 would always be true.
When deleting the last child, there would be an error message because
of this behavior.
The fix was to make get_child_count only count non-internal nodes in
function _notification.
Made a unit test describing the behavior expected of
deleting the last child from a GraphNode.
Tested versions
Reproducible in 4.3.dev5, 4.2.1 stable
Not Reproducible in 4.1.1 and 4.0.2
System information
Windows 10
Issue description
Whenever I try removing a child from a GraphNode when the removing child is the only child, an error message is issued in the output:
scene/main/node.cpp:1614 - Index p_index = 0 is out of bounds ((int)data.children_cache.size() - data.internal_children_front_count_cache - data.internal_children_back_count_cache = 0).
I would expect this error not to appear when removing the only child.
This issue had been encountered and fixed before when it caused the editor to crash: #69284
Since then, it appears to have returned, but it fortunately does not crash the editor.
Steps to reproduce
Minimal reproduction project (MRP)
min_repro_project.zip
The text was updated successfully, but these errors were encountered: