godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.9k stars 20.16k forks source link

Attempting to Delete an Internal Node in the Editor Blocks Further Node Creation/Deletion #95397

Closed PhantasmicDev closed 2 weeks ago

PhantasmicDev commented 1 month ago

Tested versions

System information

macOS 14.4.1 Godot Engine v4.3.rc3.official

Issue description

When creating a custom node class and adding child nodes with add_child(child_node, true, Node.INTERNAL_MODE_FRONT) and setting it's proper owner to see it in the Scene Dock, if I delete the internal node and get the error Trying to remove internal node, this is not supported. I'm not able to delete any nodes (not added as internal) in the Scene Dock or create new nodes.

Trying to create new nodes throws the error editor/editor_data.cpp:1214 - Condition "!p_node->is_inside_tree()" is true. but trying to delete a node just looks unresponsive with no errors in the console and the node not deleted

Only until I close an reopen Godot, can I create and delete other nodes.

Steps to reproduce

  1. Open the minimal reproduction project
  2. Open my_node.tscn scene
  3. Add the node MyNode (This will create a node of type MyNode and add an internal child)
  4. Try deleting MyNode's 'Node' chid to get the Trying to remove internal node, this is not supported. error message
  5. Try deleting or creating any other node and you will notice node creation and deletion is not possible

Minimal reproduction project (MRP)

MRP

matheusmdx commented 2 weeks ago

Bisecting points to #78816 as the culprit, @kleonc

image