mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-14 19:27:05 -04:00
Problem: spatial keys with huge coordinates (the Position field accepts any finite number) overflow the motion path's arc length to NaN. SpatialSeg::at_length only returned early for len <= 0.0, so NaN reached s.clamp(0.0, len), which panics. The viewer's motion-path overlay evaluates on the UI thread, so moving the current time over such keys crashed the app. Fix: at_length returns the segment start unless the length is positive and finite. A seeded fuzz of evaluate/velocity/spatial tangents with NaN, infinite and +-1.7e308 values (200k tracks) found no other panic or hang. Co-Authored-By: Claude Opus 5.5 <[email protected]>