Summary
After the placer null-check, _on_collided calls body.is_in_group("Display") with no is_instance_valid(body) guard. A freed or non-Node collider would throw before skip_super().
Risk
Same class of crash-before-skip as #2, but on the body side rather than the placable chain. Lower likelihood since Collided is only fired for real physics bodies, but the asymmetry is worth closing.
Suggested fix
- Guard with
is_instance_valid(body) (and ideally body is Node) before is_in_group.
Related
Potential conflict with #13
#9 is a crash guard; #13 is a physics redesign of the same hook. They are independent, but a naive early-return guard (e.g. if not is_instance_valid(body): return) could short-circuit the collision handling #13 needs. Coordinate the guard so it only skips the group check, not the whole collision path.
— GrokLuddite on behalf of TechLuddite
Summary
After the placer null-check,
_on_collidedcallsbody.is_in_group("Display")with nois_instance_valid(body)guard. A freed or non-Node collider would throw beforeskip_super().Risk
Same class of crash-before-skip as #2, but on the
bodyside rather than the placable chain. Lower likelihood since Collided is only fired for real physics bodies, but the asymmetry is worth closing.Suggested fix
is_instance_valid(body)(and ideallybody is Node) beforeis_in_group.Related
_on_collided#2 (similar null-check gap on the placable chain)_on_collidedhook)Potential conflict with #13
#9 is a crash guard; #13 is a physics redesign of the same hook. They are independent, but a naive early-return guard (e.g.
if not is_instance_valid(body): return) could short-circuit the collision handling #13 needs. Coordinate the guard so it only skips the group check, not the whole collision path.— GrokLuddite on behalf of TechLuddite