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

Open
#18,546 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
c

Research direction

Start at video/out/gpu/video.c:1419 and reproduce with the provided mpv command using ArtCNN_C4F32_DS.glsl, focusing on the copy_image assertion when the //!WHEN guard engages. Compare the failing ArtCNN pass structure with the clean CuNNy-4x16-DS case; done means the shader engages without an abort under the reported scaling conditions.

Written by the indexing model from the issue text.

Description

priority: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

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.

Dominant language
C
Stars
38.2k
Forks
3.7k
Avg merge
1d 13h
Merged PRs (30d)
76

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mpv-player/mpv

All issues in mpv-player/mpv

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.