Skip to content

Export intermittently freezes ~3/4 of the canvas on a stale frame; node capture unaffected #24

Description

@doruk-kavcioglu

Summary

dapi node render intermittently produces a video where roughly three quarters of the canvas is frozen on a single stale frame for the entire export, while a strip on the right advances correctly through the timeline. The boundary lands at exactly ¾ of the width in every occurrence — 1440 of 1920, and 2880 of 3840 at 4K.

dapi node capture on the same scene at the same timestamps is always correct, so the composition itself is fine — this is isolated to the export path.

Expected vs actual

Expected: the exported video matches what node capture renders at each timestamp.

Actual: the left ¾ of every frame shows one frame from elsewhere in the timeline, unchanging for all 1500 frames of a 60 s export. Only the right ¼ advances.

Reproduction

A minimal scene is enough — a single <video> in a <sequence>, no shader, no reactive props:

export default function () {
  return (
    <rect scene="repro" name="Repro" width={1920} height={1080} fill="black">
      <sequence name="A-roll">
        <video name="clip" src="<asset>" start={0}
               width={1920} height={1080} objectFit="cover" />
      </sequence>
    </rect>
  );
}
dapi asset add clip.mp4
dapi mount repro.jsx
dapi node render <id> -o out.mp4

Source: 1920×1080, 25 fps, H.264 + AAC, 60 s, ~9.5 Mbps, real-world footage.

It is intermittent

This is the main obstacle to pinning it down. The same scene, same asset, same session rendered correctly and then broken minutes apart, with no changes in between. Roughly half the exports in this session were affected.

Ruled out

Each tested with its own render:

Suspect Test Result
Output resolution 2160p vs 1080p both affected
<shaderPaint> plain <video>, no shader still affected
Reactive uniforms useTicker-driven vs static both affected
Codec AV1 (av01+opus) vs H.264 (avc1+aac) both affected
Trim sourceIn into a 799 s source vs a pre-trimmed 60 s clip from t=0 both affected
Window visibility dapi open --background vs foreground both affected

One negative worth noting: a synthetic ffmpeg testsrc2 clip (same container, resolution, fps, no audio) did not reproduce across repeated renders. That points at decoder throughput rather than anything in the scene graph.

Possibly related log signals

During affected exports:

A VideoSample was garbage collected without first being closed.
Encoded frames at 418.48FPS

The encoder runs far ahead of realtime while video samples go undisposed, which is consistent with the encoder consuming frames faster than the decoder supplies them and the compositor reusing a stale texture. The exact-¾ boundary suggests a partial texture upload.

Environment

  • App: Diffusion v0.132.1 (per the exported file's comment tag)
  • dapi: 0.131.0
  • macOS 26.5.1 (25F80), Apple M4 Max, Metal 4

Screenshots

(attached below)

  1. Same scene rendered twice — one correct, one broken, minutes apart with no changes in between.
  2. The ¾ boundary on a broken frame.
  3. The frozen region across the whole 60 s timeline — the left ¾ is identical in every thumbnail.

Repro

dapi asset add clip.mp4
dapi mount repro.jsx
dapi node render <id> -o out.mp4

Environment

dapi 0.131.0
platform darwin 25.5.0 (arm64)
node v24.14.1
app running

App logs

16:26:37.420 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
16:26:43.980 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
16:27:08.377 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
16:27:12.882 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
16:30:02.136 [info] Encoded frames at 115.42FPS  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
16:30:02.136 [info] Finalizing file  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
16:30:02.538 [info] Export complete  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
17:43:10.736 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
17:43:22.610 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
17:43:34.412 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
17:43:58.748 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
17:44:45.395 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
17:45:14.338 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
17:48:34.465 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
17:48:53.087 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
17:49:04.780 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
17:49:08.869 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
17:50:52.603 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
17:50:57.855 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
17:53:31.630 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
17:53:38.042 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
17:54:12.010 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
17:54:19.210 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:26:38.725 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:26:47.050 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:27:08.334 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:27:17.187 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:35:03.359 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:35:29.727 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:35:38.596 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:36:15.797 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:39:28.723 [info] Encoded frames at 110.15FPS  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:39:28.724 [info] Finalizing file  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:39:29.227 [info] Export complete  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:45:08.208 [info] Encoded frames at 430.36FPS  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:45:08.209 [info] Finalizing file  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:45:08.271 [info] Export complete  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:46:19.056 [info] Encoded frames at 415.44FPS  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:46:19.057 [info] Finalizing file  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:46:19.127 [info] Export complete  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:46:23.547 [info] Encoded frames at 419.17FPS  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:46:23.548 [info] Finalizing file  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:46:23.612 [info] Export complete  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:47:43.087 [info] Encoded frames at 408.53FPS  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:47:43.088 [info] Finalizing file  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:47:43.145 [info] Export complete  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:50:19.174 [info] Encoded frames at 430.69FPS  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:50:19.175 [info] Finalizing file  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:50:19.234 [info] Export complete  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:53:15.201 [info] Encoded frames at 436.40FPS  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:53:15.201 [info] Finalizing file  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:53:15.261 [info] Export complete  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:54:10.158 [info] Encoded frames at 418.48FPS  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:54:10.158 [info] Finalizing file  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:54:10.216 [info] Export complete  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:54:14.502 [info] Encoded frames at 433.18FPS  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:54:14.503 [info] Finalizing file  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:54:14.564 [info] Export complete  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:55:31.540 [info] Encoded frames at 416.08FPS  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:55:31.541 [info] Finalizing file  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:55:31.597 [info] Export complete  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:58:35.274 [info] Encoded frames at 109.38FPS  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:58:35.275 [info] Finalizing file  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:58:35.906 [info] Export complete  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:59:27.083 [info] Encoded frames at 111.16FPS  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:59:27.084 [info] Finalizing file  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
18:59:27.487 [info] Export complete  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
19:00:54.691 [info] Encoded frames at 429.45FPS  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
19:00:54.692 [info] Finalizing file  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
19:00:54.868 [info] Export complete  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
19:10:21.952 [info] Encoded frames at 385.34FPS  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
19:10:21.953 [info] Finalizing file  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
19:10:22.010 [info] Export complete  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
19:10:22.504 [error] A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them.  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
19:11:00.541 [info] Encoded frames at 394.69FPS  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
19:11:00.543 [info] Finalizing file  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
19:11:00.601 [info] Export complete  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
19:12:03.873 [info] Encoded frames at 435.95FPS  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
19:12:03.874 [info] Finalizing file  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)
19:12:03.937 [info] Export complete  (file:///Applications/Diffusion%20Studio.app/Contents/Resources/app/web/assets/index-iE2_-hhx.js:15)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions