heronarts / LX

Core library for 3D LED lighting engines
https://chromatik.co/
Other
41 stars 25 forks source link

Bug in Accumulator modulator: goes infinite loop when velocity is zero #96

Closed jkbelcher closed 2 weeks ago

jkbelcher commented 1 year ago

If the velocity parameter in an Accumulator returns zero, the Accumulator should sit at current value and not increase. Instead it goes infinite loop and freezes the UI.

https://github.com/heronarts/LX/blob/dev/src/main/java/heronarts/lx/modulator/Accumulator.java#L74

mcslee commented 1 year ago

Gruesome! 🤮

Thx for catching.

mcslee commented 1 year ago

https://github.com/heronarts/LX/commit/d2d23e1f72e9035a3e0eca59c87040f40cf403bc

Not the most elegant fix, could still get stuck but at least won't hang the whole program.