Fix use-after-free crash on second round start #83
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/fix-round-restart-crash"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
start_round()callsqueue_free()on old level children then immediatelyadd_child()the new level. Queue-freed nodes stay in their groups until end-of-frame, so newBallSystem._find_player()andWaveSpawner._ready()could pick up the old (about-to-be-freed) instances.is_queued_for_deletion()in both places.is_instance_valid(ball_system)guard inWaveSpawner._spawn_pending()as a safety net.Test plan