435.21 and later: mpv crashes on process exit

When mpv process exits after playing some video, it crashes while executing global destructors in libGLX_nvidia.so.0 and libnvidia-glcore.so.435.21. This only started happening with Nvidia driver 435.21 and doesn’t happen with 430.40.

Steps to reproduce:

  1. Run “mpv <video_file>”. Video starts playing.
  2. Press Q. mpv starts to exit and crashes.

I’m running Kubuntu 19.04, mpv 0.29.1-1ubuntu1 from Ubuntu repository.

I’m attaching nvidia-bug-report.sh output, mpv config (should be decompressed as ~/.config/mpv/mpv.conf) and crash backtrace.

nvidia-bug-report.log.gz (1.11 MB)
mpv.conf.gz (616 Bytes)
mpv_atexit_crash.txt (2.2 KB)

BTW, the video I tested with is, as reported by ffprobe: h264 (High), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)

The same problem exists with 435.24.02.

Still reproduces with 440.26. Please, fix.

Still crashes with 440.36. Nvidia, any feedback?