Skip to content
Bug reportDec 5, 2026· 0:36· 11 views

Motion 15.0.1: throw inside frame.read() permanently kills the entire frameloop

0:36 total

Comments · 0

Be the first to comment.

Bug reportby SceneRecap AI

highMotion frameloop scheduler (frame/batcher step processing for the read phase). An exception in a read callback seems to leave the loop stopped, so no further requestAnimationFrame ticks are scheduled. Wrapping each step callback in try/catch, or always rescheduling in a finally block, would stop one bad callback from halting all animations.
os: macOSdpr: 1locale: en-USbrowser: Chromium 151.0.7922.34library: motion@15.0.1 via cdn.jsdelivr.nettimezone: Europe/Berlinviewport: 1280x720related_issue: motiondivision/motion#4134

Repro steps

  1. 1.Open the test page 'motion@15.0.1, frame.read() throw stops frameloop'. Confirm the badge reads 'Frameloop running' and the onUpdate() counter climbs about 60 per second.
  2. 2.Wait for the frameloop to run steadily. The counter reaches 767 and the square keeps rotating.
  3. 3.Click the button 'Throw in frame.read() callback'.
  4. 4.Watch the onUpdate() counter and the rotating square for several seconds.

Expected

An error thrown inside one frame.read() callback is reported. It does not stop the scheduler. Other scheduled work and animations keep running, and the onUpdate() counter keeps going up at about 60 per second.

Actual

After the throw, a console error 'frame.read() throw test' is logged. The frameloop then stops for good. The onUpdate() counter freezes at 889 and the square stops rotating. The badge reads 'Frameloop DEAD, all animations frozen'. There is no recovery: the counter is still 889 at 31.0s, about 16s after the throw.

Evidence

visualBefore the throw the frameloop works: the badge reads 'Frameloop running' and the counter goes 49, 166, 286, 407, 526, 647, 767 at about 60 per second.
visualAt the moment of the click the counter shows 875, the badge still reads 'Frameloop running' and the square is still rotating.
consoleConsole error logged right after the click: 'frame.read() throw test'.
visualThe badge changes to 'Frameloop DEAD, all animations frozen'. The log reads 'counter before throw : 889', 'counter after +700ms: 889', 'FROZEN, throw in frame.read() killed the frameloop'. The throw button appears dimmed.
visualThe counter is still 889 and the square has the same rotation. The frameloop never recovered.
visualThe FPS label still shows '~60 fps' while the counter is frozen. The label is stale, a minor side effect of the frozen loop.
Issue markdown (copy-paste ready)
## Summary
In motion@15.0.1, one error thrown inside a `frame.read()` callback permanently stops the whole frameloop. Every animation and `onUpdate()` subscriber freezes and never recovers. Related: motiondivision/motion#4134.

## Environment
- Browser: Chromium 151.0.7922.34
- OS: macOS
- Viewport: 1280x720, DPR 1
- Library: motion@15.0.1 (cdn.jsdelivr.net)

## Steps to reproduce
1. Open the test page. The badge reads **Frameloop running** and the `onUpdate()` counter climbs about 60/s (49 at 1.0s, 767 at 13.0s).
2. Click **Throw in frame.read() callback** (14.859s).
3. Watch the counter and the rotating square.

## Expected
The error from the failing `frame.read()` callback is reported. The frameloop keeps ticking, so other animations and `onUpdate()` callbacks keep running.

## Actual
- Console error at 15.084s: `frame.read() throw test`.
- By 17.0s the badge reads **Frameloop DEAD, all animations frozen**.
- The log shows `counter before throw : 889` and `counter after +700ms: 889`.
- The counter is still 889 at 31.0s. The square stays frozen. The loop never recovers.
- Minor: the FPS label still shows `~60 fps` while the loop is dead.

## Evidence
| t (s) | Kind | Detail |
|---|---|---|
| 13.0 | visual | Loop works before the throw: counter 767, badge 'Frameloop running' |
| 14.9 | visual | Counter 875 at click time, still running |
| 15.084 | console | `frame.read() throw test` |
| 17.0 | visual | Badge 'Frameloop DEAD', counter frozen at 889 |
| 31.0 | visual | Counter still 889, no recovery |

## Suggested area
The frameloop scheduler's step processing. An exception in a read-phase callback appears to exit the loop before the next tick is scheduled. Isolate each callback (try/catch, or reschedule in `finally`) so one bad callback cannot halt every animation.

*Recorded with SceneRecap.*

This report was written by SceneRecap from a screen recording. Try SceneRecap free

Turn a screen recording into a bug report like this one.

Repro steps, expected vs actual and the console and network evidence, each with a timestamp. On every plan, Free included.

Try SceneRecap free →
Motion 15.0.1: throw inside frame.read() permanently kills the entire frameloop · SceneRecap