Skip to content

bug: strict TypedArray validation crashes during unparented node deletion #621

Description

@gk98s

When a registered rollback-aware or synchronized node is deleted after being unparented, it bypasses Netfox's automatic cleanup, resulting in repeating TypedArray validation errors and crashes.

Why it happens:
A node is unparented (e.g., remove_child()). This triggers the rb synchroniser's _exit_tree().

Because the node is only being unparented (not deleted), root.is_queued_for_deletion() evaluates to false (which Netfox uses to preserve history during reparenting), so cleanup is bypassed.

The node is subsequently freed (queue_free()). Since the rb synchroniser is out of the tree, its tree_exit cleanup never executes again.

The freed reference remains as an orphaned key in internal dictionaries across RollbackSimulationServer, PropertyPool, and PerObjectHistory.

On the next network tick, Godot 4's strict container validation fails when attempting to assign these dictionaries' keys into a typed array (Array[Object]), crashing/spamming the console indefinitely.

Reproduction Project(fixed version): https://github.com/gk98s/netfox-test

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions