Skip to content

Fix Flowframes hang detection (watchdog never fired on frozen log) - #2

Open
NetsumaInfo wants to merge 1 commit into
AniScripts:mainfrom
NetsumaInfo:fix/flowframes-ffms2-and-pause-race
Open

Fix Flowframes hang detection (watchdog never fired on frozen log)#2
NetsumaInfo wants to merge 1 commit into
AniScripts:mainfrom
NetsumaInfo:fix/flowframes-ffms2-and-pause-race

Conversation

@NetsumaInfo

Copy link
Copy Markdown

Problem

Flowframes can stop responding mid-interpolation after some time: the process
stays alive but its session log stops growing. A 60s progress watchdog already
existed to catch this, but it never fired, so the job hung indefinitely until
manually paused.

Root cause

lastLogTime was refreshed on every poll tick whenever the session log file
merely read successfully, not only when new lines were written. A
frozen-but-readable log therefore kept resetting the timer, so
Date.now() - lastLogTime > 60000 was never true.

Fix

  • Only bump lastLogTime when new log lines actually appear
    (lines.length > lastLineCount).
  • Add a grace check so a quiet encode phase is not false-killed: if the newest
    output file is still growing, reset the timer instead of failing.

On a genuine hang the job now errors out after 60s and the queue moves on,
instead of hanging forever.

Scope

One file, AniSmooth/js/utils/flowframesHandler.js (+16/-1). No other changes.

Testing

  • node --check passes.
  • JS runs live in dev (no rebuild); reload the extension in AE.

Flowframes can stop responding mid-interpolation after some time: the
process stays alive but its session log stops growing. The 60s progress
watchdog was meant to catch this but never fired: lastLogTime was
refreshed on every poll tick whenever the log file simply read
successfully, so a frozen-but-readable log kept resetting the timer and
the job hung until it was manually paused.

Only bump lastLogTime when new lines actually appear
(lines.length > lastLineCount). Add a grace check so a quiet encode
phase is not killed: if the newest output file is still growing, reset
the timer instead of failing. On a genuine hang the job now errors out
after 60s and the queue moves on.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant