Skip to content

v0.9.8 — Fix: crash on NaN frequency comparison

Choose a tag to compare

@Mattbusel Mattbusel released this 14 Mar 09:17
· 193 commits to master since this release

v0.9.8

Crash fix

Harmonic gravity caused a panic when any voice frequency was zero or non-finite.

Root cause: the harmonic pull code computed ratio = freqs[1] / freqs[0]. If either frequency was zero (e.g. during a system transition or with certain attractor states), ratio became NaN. partial_cmp() on NaN returns None, and .unwrap() panicked.

Fix: guard ratio with is_finite(), use .unwrap_or(Ordering::Equal) as a safe fallback, and guard the log computation with a is_finite() check before applying the pull.