#18546·mpv

SIGABRT in copy_image when ArtCNN GLSL user shader engages (video.c:1419 assertion) on 0.41.0 / NVIDIA / OpenGL

Author: jsprstnCreated Sep 30, 2026Updated Sep 30, 2026
Labelspriority:ignored-issue-template

Summary

mpv 0.41.0 aborts the moment the ArtCNN_C4F32_DS user shader engages (output ≥1.3× the video size, i.e. when its //!WHEN guard fires):

video/out/gpu/video.c:1419: copy_image: Assertion '*offset + count < sizeof(dst)' failed.

The shader compiles cleanly — this is a runtime abort, not a GLSL error. Windowed at 1.0× (guard not firing) playback idles cleanly; the abort happens exactly on engagement (2× window scale and on fullscreen 4K both reproduce).

Repro

bash
mpv --no-config --vo=gpu --gpu-api=opengl     --glsl-shaders=ArtCNN_C4F32_DS.glsl     --force-window=yes --window-scale=2.0 <any 640x360 test clip>

ArtCNN_C4F32_DS.glsl from https://github.com/Artoriuz/ArtCNN @ 7d69551 (with the #extension line hoisted to line 1 for NVIDIA compat — Artoriuz/ArtCNN#48).

Environment

  • mpv 0.41.0 (vo=gpu AND vo=gpu-next), --gpu-api=opengl
  • NVIDIA 595.84 and 595.91.07, RTX 3070
  • Ubuntu (kernel 6.x), GNOME/mutter wayland + XWayland
  • The abort reproduces identically headless (Xvfb, llvmpipe) — so it is not driver-specific rendering, it is the copy_image path's bounds assumption on the doubled texture

Notes

  • The sibling doubler CuNNy-4x16-DS engages and plays cleanly under identical conditions, so this is specific to ArtCNN's pass structure (it uses //!SAVE textures at 2× width / 4× height ratios).
  • A backtrace from the core shows the abort in copy_image during the second render pass after the WHEN guard engages.

Happy to provide the full log, the core backtrace, or test a patch.