godot
godot copied to clipboard
print_orphan_nodes() in Tool Crashes the Editor
Godot version
4.0beta15
System information
Windows10, AMD Ryzen 9 3900XT, RTX3070, Vulkan
Issue description
When you run print_orphan_nodes() in a Tool in the editor, the editor prints
133378869456 - Stray Node: @@17558 (Type: ProgressDialog), then freezes/crashes.
Steps to reproduce
- Add the following script to a node:
@tool
extends Node
func _process(delta):
if Input.is_action_just_pressed("ui_accept"):
print_orphan_nodes()
reload the scene and then press space. The editor freezes and/or crashes.
Minimal reproduction project
also occurs in beta 14
Thanks!
@YuriSizov just tried again in 4.0.3rc1 mono in C#, same issue happens and prints the same orphan (133815077082 - Stray Node: (Type: ProgressDialog))
here's a reproduction project:
EditorPluginPrintOrphan.zip
This fix was not cherry-picked or backported to 4.0.x. It's fixed in master, i.e. in the upcoming 4.1. Please check with the 4.1 dev1 or dev2.
My bad, I checked and saw it works in dev2! Thanks.
However, it is printing loads and loads of nodes:
@CookieBadger That's probably correct, because in editor there are many places where we have a hidden node removed from the tree completely and stored as a reference. As long as this is handled properly by the destructor method, it should be fine.