You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stop the export from hanging forever when the hidden film stalls #33
The render loop in exportPreview() (public/demo.mjs:318-343) can wait forever. If the queue is empty and ended is false, it calls film.play() and sleeps 250 ms (demo.mjs:321-322), with no upper limit. Two cases leave the button on "Rendering 42%" and disabled until the page is reloaded:
film.onerror = reject (demo.mjs:294) only matters before loadeddata. A network or decode error later in the file is never seen, so the loop keeps polling.
If film.play() keeps rejecting (the .catch(() => {}) at lines 321/333 hides this), no frame or ended event ever arrives.
Expected: a stalled export ends in "Export failed" and re-enables Download (the existing finally already cleans up).
Fix direction: set film.onerror again after loading, so it records the error in failure and calls wake(). Track the time of the last captured frame. If none has arrived for about 15 s while document.visibilityState === 'visible', set failure. Don't count time while the tab is hidden, since hidden tabs pause requestVideoFrameCallback.
Done when throttling the network to "Offline" mid-export in DevTools ends in "Export failed" within about 15 s, and normal exports are unchanged.
Activity