Skip to content

Fix NaN envelope when oto preutter is zero - #2350

Merged
stakira merged 1 commit into
openutau:masterfrom
rokujyushi:fix/autoPreutter
Sep 3, 2026
Merged

Fix NaN envelope when oto preutter is zero#2350
stakira merged 1 commit into
openutau:masterfrom
rokujyushi:fix/autoPreutter

Conversation

@rokujyushi

Copy link
Copy Markdown
Contributor

Singers with dummy otos (VOICEVOX, ENUNU, DiffSinger, Vogen) and UTAU otos with a blank preutter leave autoPreutter at 0. When the previous phoneme is shorter than 5ms, maxPreutter goes negative and ValidateOverlap computes maxPreutter / autoPreutter = -Infinity, so autoOverlap becomes NaN. That NaN reaches the previous phoneme's envelope p3/p4 via tailIntrude/tailOverlap, and PhonemeCanvas.Render crashes feeding it to TimeAxis.MsPosToTickPos.

Scale autoOverlap only when there is a preutter to scale against.

Singers with dummy otos (VOICEVOX, ENUNU, DiffSinger, Vogen) and UTAU otos
with a blank preutter leave autoPreutter at 0. When the previous phoneme is
shorter than 5ms, maxPreutter goes negative and ValidateOverlap computes
maxPreutter / autoPreutter = -Infinity, so autoOverlap becomes NaN. That NaN
reaches the previous phoneme's envelope p3/p4 via tailIntrude/tailOverlap, and
PhonemeCanvas.Render crashes feeding it to TimeAxis.MsPosToTickPos.

Scale autoOverlap only when there is a preutter to scale against.
@stakira
stakira merged commit 47a7af0 into openutau:master Sep 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants