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

Editor freeze when removing or renaming a node has very large scene tree #50267

Closed
volzhs opened this issue Jul 7, 2021 · 2 comments · Fixed by #50319
Closed

Editor freeze when removing or renaming a node has very large scene tree #50267

volzhs opened this issue Jul 7, 2021 · 2 comments · Fixed by #50319

Comments

@volzhs
Copy link
Contributor

volzhs commented Jul 7, 2021

Godot version

3.4.beta e5b32ed

System information

Kubuntu 21.04 / AMD Ryzen 7 3700X 8-Core / Memory: 16 GiB / Radeon RX 570

Issue description

Editor freeze when removing or renaming a node that has a very large hierarchy scene tree.

here's call stack after a few minutes wait.

SceneTreeDock::_update_node_path(const NodePath & p_root_path, NodePath & r_node_path, List<Pair<NodePath, NodePath>, DefaultAllocator> * p_renames) (./editor/scene_tree_dock.cpp:1428)
SceneTreeDock::_check_node_path_recursive(const NodePath & p_root_path, Variant & r_variant, List<Pair<NodePath, NodePath>, DefaultAllocator> * p_renames) (./editor/scene_tree_dock.cpp:1443)
SceneTreeDock::perform_node_renames(SceneTreeDock * const this, Node * p_base, List<Pair<NodePath, NodePath>, DefaultAllocator> * p_renames, Map<Ref<Animation>, Set<int, Comparator<int>, DefaultAllocator>, Comparator<Ref<Animation> >, DefaultAllocator> * r_rem_anims) (./editor/scene_tree_dock.cpp:1520)
SceneTreeDock::perform_node_renames(SceneTreeDock * const this, Node * p_base, List<Pair<NodePath, NodePath>, DefaultAllocator> * p_renames, Map<Ref<Animation>, Set<int, Comparator<int>, DefaultAllocator>, Comparator<Ref<Animation> >, DefaultAllocator> * r_rem_anims) (./editor/scene_tree_dock.cpp:1622)
SceneTreeDock::perform_node_renames(SceneTreeDock * const this, Node * p_base, List<Pair<NodePath, NodePath>, DefaultAllocator> * p_renames, Map<Ref<Animation>, Set<int, Comparator<int>, DefaultAllocator>, Comparator<Ref<Animation> >, DefaultAllocator> * r_rem_anims) (./editor/scene_tree_dock.cpp:1622)
SceneTreeDock::perform_node_renames(SceneTreeDock * const this, Node * p_base, List<Pair<NodePath, NodePath>, DefaultAllocator> * p_renames, Map<Ref<Animation>, Set<int, Comparator<int>, DefaultAllocator>, Comparator<Ref<Animation> >, DefaultAllocator> * r_rem_anims) (./editor/scene_tree_dock.cpp:1622)
SceneTreeDock::perform_node_renames(SceneTreeDock * const this, Node * p_base, List<Pair<NodePath, NodePath>, DefaultAllocator> * p_renames, Map<Ref<Animation>, Set<int, Comparator<int>, DefaultAllocator>, Comparator<Ref<Animation> >, DefaultAllocator> * r_rem_anims) (./editor/scene_tree_dock.cpp:1622)
SceneTreeDock::perform_node_renames(SceneTreeDock * const this, Node * p_base, List<Pair<NodePath, NodePath>, DefaultAllocator> * p_renames, Map<Ref<Animation>, Set<int, Comparator<int>, DefaultAllocator>, Comparator<Ref<Animation> >, DefaultAllocator> * r_rem_anims) (./editor/scene_tree_dock.cpp:1622)
SceneTreeDock::perform_node_renames(SceneTreeDock * const this, Node * p_base, List<Pair<NodePath, NodePath>, DefaultAllocator> * p_renames, Map<Ref<Animation>, Set<int, Comparator<int>, DefaultAllocator>, Comparator<Ref<Animation> >, DefaultAllocator> * r_rem_anims) (./editor/scene_tree_dock.cpp:1622)
SceneTreeDock::perform_node_renames(SceneTreeDock * const this, Node * p_base, List<Pair<NodePath, NodePath>, DefaultAllocator> * p_renames, Map<Ref<Animation>, Set<int, Comparator<int>, DefaultAllocator>, Comparator<Ref<Animation> >, DefaultAllocator> * r_rem_anims) (./editor/scene_tree_dock.cpp:1622)
SceneTreeDock::perform_node_renames(SceneTreeDock * const this, Node * p_base, List<Pair<NodePath, NodePath>, DefaultAllocator> * p_renames, Map<Ref<Animation>, Set<int, Comparator<int>, DefaultAllocator>, Comparator<Ref<Animation> >, DefaultAllocator> * r_rem_anims) (./editor/scene_tree_dock.cpp:1622)
SceneTreeDock::perform_node_renames(SceneTreeDock * const this, Node * p_base, List<Pair<NodePath, NodePath>, DefaultAllocator> * p_renames, Map<Ref<Animation>, Set<int, Comparator<int>, DefaultAllocator>, Comparator<Ref<Animation> >, DefaultAllocator> * r_rem_anims) (./editor/scene_tree_dock.cpp:1622)
SceneTreeDock::perform_node_renames(SceneTreeDock * const this, Node * p_base, List<Pair<NodePath, NodePath>, DefaultAllocator> * p_renames, Map<Ref<Animation>, Set<int, Comparator<int>, DefaultAllocator>, Comparator<Ref<Animation> >, DefaultAllocator> * r_rem_anims) (./editor/scene_tree_dock.cpp:1622)
SceneTreeDock::perform_node_renames(SceneTreeDock * const this, Node * p_base, List<Pair<NodePath, NodePath>, DefaultAllocator> * p_renames, Map<Ref<Animation>, Set<int, Comparator<int>, DefaultAllocator>, Comparator<Ref<Animation> >, DefaultAllocator> * r_rem_anims) (./editor/scene_tree_dock.cpp:1622)
SceneTreeDock::_node_prerenamed(SceneTreeDock * const this, Node * p_node, const String & p_new_name) (./editor/scene_tree_dock.cpp:1651)
MethodBind2<Node*, String const&>::call(MethodBind2<Node*, String const&> * const this, Object * p_object, const Variant ** p_args, int p_arg_count, Variant::CallError & r_error) (./core/method_bind.gen.inc:1523)
Object::call(Object * const this, const StringName & p_method, const Variant ** p_args, int p_argcount, Variant::CallError & r_error) (./core/object.cpp:918)
Object::emit_signal(Object * const this, const StringName & p_name, const Variant ** p_args, int p_argcount) (./core/object.cpp:1226)
Object::emit_signal(Object * const this, const StringName & p_name, const Variant & p_arg1, const Variant & p_arg2, const Variant & p_arg3, const Variant & p_arg4, const Variant & p_arg5) (./core/object.cpp:1281)
SceneTreeEditor::_renamed(SceneTreeEditor * const this) (./editor/scene_tree_editor.cpp:812)
MethodBind0::call(MethodBind0 * const this, Object * p_object, const Variant ** p_args, int p_arg_count, Variant::CallError & r_error) (./core/method_bind.gen.inc:59)
Object::call(Object * const this, const StringName & p_method, const Variant ** p_args, int p_argcount, Variant::CallError & r_error) (./core/object.cpp:918)
MessageQueue::_call_function(MessageQueue * const this, Object * p_target, const StringName & p_func, const Variant * p_args, int p_argcount, bool p_show_error) (./core/message_queue.cpp:241)
MessageQueue::flush(MessageQueue * const this) (./core/message_queue.cpp:284)
SceneTree::iteration(SceneTree * const this, float p_time) (./scene/main/scene_tree.cpp:484)
Main::iteration() (./main/main.cpp:2075)
OS_X11::run(OS_X11 * const this) (./platform/x11/os_x11.cpp:3638)
main(int argc, char ** argv) (./platform/x11/godot_x11.cpp:55)

Steps to reproduce

image

  1. Download and open attached MRP
  2. Delete or rename selected node as screenshot above

Minimal reproduction project

Delete node test.zip

@volzhs
Copy link
Contributor Author

volzhs commented Jul 7, 2021

seems regression from daa0977
cc @pouleyKetchoupp

@akien-mga akien-mga added this to the 3.4 milestone Jul 7, 2021
@pouleyKetchoupp
Copy link
Contributor

Ah yeah, each Control node now has 6 NodePath properties (focus neighbors) the editor tries to fixup when you move nodes (before it would break the paths when the nodes move).

I can do an easy fix to avoid doing this process for empty node path values, but first I'm going to spend more time to optimize the process so it's not too slow even in case the node path values are actually set.

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.

3 participants