Description
Tested versions
v4.4.stable.official [4c311cb]
System information
Godot v4.4.stable - macOS Sequoia (15.3.2) - Multi-window, 2 monitors - Metal (Forward+) - integrated Apple M2 (Apple8) - Apple M2 (8 threads)
Issue description
I'm working on a portals plugin, where a @tool
script spawns other nodes while being set up.
When I toggle is_teleport
boolean to true in the inspector, the script creates an Area3D
node with a CollisionShape3D
child. Both are stored in exported property fields.
When I set the is_teleport
to false, I only call queue_free
only on the area, assuming the collider will get cleaned up too (it's the area's child). But it does not - it remains visible in the inspector exported field. When I try to save, the editor crashes.
My guess would be that it tries to serialize a freed node. When I manually clear the collider property, it saves fine.
Steps to reproduce
I've uploaded a MRP, so this is in relation to that.
- Cmd + A Add new "Portal" node (the script will get suggested)
- Toggle
is_teleport
to true, which spawns two nodes. These nodes are visible in the exported properties.
- Toggle
is_teleport
to false. Both nodes disappear from the scene tree, but the collision shape remains in one of the exported fields. - Try to save - Cmd + S
- The editor crashes
Minimal reproduction project (MRP)
This is all the code there is to it:
MRP:
mvp-crash.zip