Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vo=gpu-next: mpv crashes when resizing its window during video playback #15573

Open
6 tasks done
aniotaweeb opened this issue Dec 26, 2024 · 4 comments
Open
6 tasks done
Labels

Comments

@aniotaweeb
Copy link

aniotaweeb commented Dec 26, 2024

mpv Information

mpv v0.39.0-532-gd9eb9ed8 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
 built on Dec 26 2024 00:02:45
libplacebo version: v7.350.0 (v7.349.0-30-g056b852-dirty)
FFmpeg version: N-118166-g3778b1f6f
FFmpeg library versions:
   libavcodec      61.28.100
   libavdevice     61.4.100
   libavfilter     10.6.101
   libavformat     61.9.101
   libavutil       59.53.100
   libswresample   5.4.100
   libswscale      8.13.100

Other Information

- Windows version: Microsoft Windows [Version 10.0.26100.2605]
- GPU model, driver and version: Qualcomm(R) Adreno(TM) X1-85 GPU, DirectX 12 (FL 11.1) version 31.0.80.0
- Source of mpv: mpv-aarch64-20241226-git-d9eb9ed (https://github.com/shinchiro/mpv-winbuild-cmake/releases)
- Latest known working version: N/A
- Issue started after the following happened: Using the --vo=gpu-next video rendering backend

Reproduction Steps

The --vo=gpu-next backend driver causes mpv to crash when resizing its window during video playback on my Dell Inspiron 14 Plus 7441 featuring a Qualcomm(R) Adreno(TM) X1-85 GPU. This behaviour occurs during media playback and idle mode. However, this behaviour doesn't occur during the startup screen or when rendering content on other backends, like --vo=gpu and --vo=direct3d; it only occurs when the console parses the --vo=gpu-next parameter. Furthermore, the console doesn't print any error indicating why it crashes with the --vo=gpu-next backend driver enabled.

Incidentally, the console prints the following error messages when using --vo=gpu; however, these errors don't interfere with media playback.
[vo/gpu] Unrecognized/unavailable FORMAT name: 'rgba16f'!
[vo/gpu] Unrecognized command 'PARAM distance_coeff'!

Strangely enough, the console doesn't print these errors with the --vo=gpu-next video renderer enabled.

Expected Behavior

Seamless playback without crashing when resizing its associated window with the --vo=gpu-next parameter enabled.

Actual Behavior

mpv crashes when resizing its associated window with --vo=gpu-next enabled.

Log File

output.txt

The mpv.exe.14580.dmp dump file exceeded the 43 MB upload limit—since it's 44,192 KB—so I'll paste it below.

Dump Summary

Dump File: mpv.exe.14580.dmp : C:\Users\User\AppData\Local\CrashDumps\mpv.exe.14580.dmp
Last Write Time: 2024-12-25 10:16:13 PM
Process Name: C:\Program Files\mpv\mpv.exe C:\test
Process Architecture: ARM64
Exception Code: 0xc0000005
Exception Information: The thread tried to read from or write to a virtual address for which it does not have the appropriate access.
Heap Information: Not Present

System Information

OS Version: 10.0.26100
CLR Version(s):

Modules

Module Name Module Path Module Version


mpv.exe C:\Program Files\mpv\mpv.exe 2.0.0.0
ntdll.dll C:\Windows\System32\ntdll.dll 10.0.26100.2605
kernel32.dll C:\Windows\System32\kernel32.dll 10.0.26100.2605
KERNELBASE.dll C:\Windows\System32\KERNELBASE.dll 10.0.26100.2605
gdi32.dll C:\Windows\System32\gdi32.dll 10.0.26100.2033
win32u.dll C:\Windows\System32\win32u.dll 10.0.26100.2605
gdi32full.dll C:\Windows\System32\gdi32full.dll 10.0.26100.2605
msvcp_win.dll C:\Windows\System32\msvcp_win.dll 10.0.26100.1882
ucrtbase.dll C:\Windows\System32\ucrtbase.dll 10.0.26100.2033
user32.dll C:\Windows\System32\user32.dll 10.0.26100.2605
ole32.dll C:\Windows\System32\ole32.dll 10.0.26100.2605
combase.dll C:\Windows\System32\combase.dll 10.0.26100.2605
rpcrt4.dll C:\Windows\System32\rpcrt4.dll 10.0.26100.2033
advapi32.dll C:\Windows\System32\advapi32.dll 10.0.26100.2605
msvcrt.dll C:\Windows\System32\msvcrt.dll 7.0.26100.1882
sechost.dll C:\Windows\System32\sechost.dll 10.0.26100.2454
shell32.dll C:\Windows\System32\shell32.dll 10.0.26100.2605
version.dll C:\Windows\System32\version.dll 10.0.26100.1882
imm32.dll C:\Windows\System32\imm32.dll 10.0.26100.2033
SHCore.dll C:\Windows\System32\SHCore.dll 10.0.26100.2454
avrt.dll C:\Windows\System32\avrt.dll 10.0.26100.1882
oleaut32.dll C:\Windows\System32\oleaut32.dll 10.0.26100.2605
dwmapi.dll C:\Windows\System32\dwmapi.dll 10.0.26100.2454
shlwapi.dll C:\Windows\System32\shlwapi.dll 10.0.26100.2605
uxtheme.dll C:\Windows\System32\uxtheme.dll 10.0.26100.2454
ws2_32.dll C:\Windows\System32\ws2_32.dll 10.0.26100.1882
bcrypt.dll C:\Windows\System32\bcrypt.dll 10.0.26100.1882
setupapi.dll C:\Windows\System32\setupapi.dll 10.0.26100.2454
avicap32.dll C:\Windows\System32\avicap32.dll 10.0.26100.1882
winmm.dll C:\Windows\System32\winmm.dll 10.0.26100.2454
opengl32.dll C:\Windows\System32\opengl32.dll 10.0.26100.2033
cfgmgr32.dll C:\Windows\System32\cfgmgr32.dll 10.0.26100.2454
IPHLPAPI.DLL C:\Windows\System32\IPHLPAPI.DLL 10.0.26100.2454
DWrite.dll C:\Windows\System32\DWrite.dll 10.0.26100.2605
d2d1.dll C:\Windows\System32\d2d1.dll 10.0.26100.2605
crypt32.dll C:\Windows\System32\crypt32.dll 10.0.26100.2605
msvfw32.dll C:\Windows\System32\msvfw32.dll 10.0.26100.1882
glu32.dll C:\Windows\System32\glu32.dll 10.0.26100.1882
comctl32.dll C:\Windows\WinSxS\arm64_microsoft.windows.common-controls_6595b64144ccf1df_5.82.26100.2454_none_87ef93257a2c3ed9\comctl32.dll 5.82.26100.2454
DXCore.dll C:\Windows\System32\DXCore.dll 10.0.26100.2454
bcryptPrimitives.dll C:\Windows\System32\bcryptPrimitives.dll 10.0.26100.2454
windows.storage.dll C:\Windows\System32\windows.storage.dll 10.0.26100.2605
profapi.dll C:\Windows\System32\profapi.dll 10.0.26100.2454
dxgi.dll C:\Windows\System32\dxgi.dll 10.0.26100.2605
directxdatabasehelper.dll C:\Windows\System32\directxdatabasehelper.dll 10.0.26100.2454
kernel.appcore.dll C:\Windows\System32\kernel.appcore.dll 10.0.26100.2033
windows.staterepositorycore.dll C:\Windows\System32\windows.staterepositorycore.dll 10.0.26100.1882
vulkan_dzn.dll C:\Program Files\WindowsApps\Microsoft.D3DMappingLayers_1.2409.2.0_arm64__8wekyb3d8bbwe\arm64\vulkan_dzn.dll 0.0.0.0
qcvkarm64xum.dll C:\Windows\System32\DriverStore\FileRepository\qcdx8380.inf_arm64_d5ac62ca761216df\qcvkarm64xum.dll 31.0.14.0
D3D12.dll C:\Windows\System32\D3D12.dll 10.0.26100.2454
adreno_utils.dll C:\Windows\System32\DriverStore\FileRepository\qcdx8380.inf_arm64_d5ac62ca761216df\adreno_utils.dll 31.0.14.0
libgsluser.dll C:\Windows\System32\DriverStore\FileRepository\qcdx8380.inf_arm64_d5ac62ca761216df\libgsluser.dll 31.0.14.0
dxil.dll C:\Program Files\WindowsApps\Microsoft.D3DMappingLayers_1.2409.2.0_arm64__8wekyb3d8bbwe\arm64\dxil.dll 101.8.2403.18
D3D12Core.dll C:\Program Files\WindowsApps\Microsoft.D3DMappingLayers_1.2409.2.0_arm64__8wekyb3d8bbwe\arm64\D3D12Core.dll 1.614.1.0
D3D12Core.dll C:\Windows\System32\D3D12Core.dll 10.0.26100.2605
qcgpuarm64xcompilercore.dll C:\Windows\System32\DriverStore\FileRepository\qcdx8380.inf_arm64_d5ac62ca761216df\qcgpuarm64xcompilercore.dll 31.0.80.0
CRYPTBASE.DLL C:\Windows\System32\CRYPTBASE.DLL 10.0.26100.1882
D3DSCache.dll C:\Windows\System32\D3DSCache.dll 10.0.26100.2454
userenv.dll C:\Windows\System32\userenv.dll 10.0.26100.2454
twinapi.appcore.dll C:\Windows\System32\twinapi.appcore.dll 10.0.26100.2605
qcdx12arm64xum.dll C:\Windows\System32\DriverStore\FileRepository\qcdx8380.inf_arm64_d5ac62ca761216df\qcdx12arm64xum.dll 31.0.80.0
dxilconv.dll C:\Windows\System32\dxilconv.dll 101.7.2308.24
qcvkarm64xcompiler.dll C:\Windows\System32\DriverStore\FileRepository\qcdx8380.inf_arm64_d5ac62ca761216df\qcvkarm64xcompiler.dll 31.0.80.0
dcomp.dll C:\Windows\System32\dcomp.dll 10.0.26100.2605
Microsoft.Internal.WarpPal.dll C:\Windows\System32\Microsoft.Internal.WarpPal.dll 0.0.0.0
d3d10warp.dll C:\Windows\System32\d3d10warp.dll 10.0.26100.2454
d3d11.dll C:\Windows\System32\d3d11.dll 10.0.26100.2605
msctf.dll C:\Windows\System32\msctf.dll 10.0.26100.2605
clbcatq.dll C:\Windows\System32\clbcatq.dll 2001.12.10941.16384
Windows.Media.MediaControl.dll C:\Windows\System32\Windows.Media.MediaControl.dll 10.0.26100.2454
WinTypes.dll C:\Windows\System32\WinTypes.dll 10.0.26100.1882
MMDevAPI.dll C:\Windows\System32\MMDevAPI.dll 10.0.26100.1882
explorerframe.dll C:\Windows\System32\explorerframe.dll 10.0.26100.2605
apphelp.dll C:\Windows\System32\apphelp.dll 10.0.26100.2454
OneCoreUAPCommonProxyStub.dll C:\Windows\System32\OneCoreUAPCommonProxyStub.dll 10.0.26100.2605
propsys.dll C:\Windows\System32\propsys.dll 7.0.26100.2454
qcdx11arm64xum.dll C:\Windows\System32\DriverStore\FileRepository\qcdx8380.inf_arm64_d5ac62ca761216df\qcdx11arm64xum.dll 31.0.80.0
d3dcompiler_47.dll C:\Windows\System32\d3dcompiler_47.dll 10.0.26100.2605
cryptsp.dll C:\Windows\System32\cryptsp.dll 10.0.26100.2454
dataexchange.dll C:\Windows\System32\dataexchange.dll 10.0.26100.1882
mscms.dll C:\Windows\System32\mscms.dll 10.0.26100.2454
icm32.dll C:\Windows\System32\icm32.dll 10.0.26100.2314
d3d9.dll C:\Windows\System32\d3d9.dll 10.0.26100.2605
dxva2.dll C:\Windows\System32\dxva2.dll 10.0.26100.2454
devobj.dll C:\Windows\System32\devobj.dll 10.0.26100.1882
sspicli.dll C:\Windows\System32\sspicli.dll 10.0.26100.2454
AudioSes.dll C:\Windows\System32\AudioSes.dll 10.0.26100.2454
resourcepolicyclient.dll C:\Windows\System32\resourcepolicyclient.dll 10.0.26100.1882
StructuredQuery.dll C:\Windows\System32\StructuredQuery.dll 7.0.26100.2605
icu.dll C:\Windows\System32\icu.dll 72.1.0.2
powrprof.dll C:\Windows\System32\powrprof.dll 10.0.26100.1882
umpdc.dll C:\Windows\System32\umpdc.dll 10.0.26100.1882
Windows.StateRepositoryPS.dll C:\Windows\System32\Windows.StateRepositoryPS.dll 10.0.26100.1882
Windows.FileExplorer.Common.dll C:\Windows\System32\Windows.FileExplorer.Common.dll 10.0.26100.2454
windows.staterepositoryclient.dll C:\Windows\System32\windows.staterepositoryclient.dll 10.0.26100.2605
Windows.Storage.Search.dll C:\Windows\System32\Windows.Storage.Search.dll 10.0.26100.2454
cldapi.dll C:\Windows\System32\cldapi.dll 10.0.26100.2314
edputil.dll C:\Windows\System32\edputil.dll 10.0.26100.1882
Windows.UI.dll C:\Windows\System32\Windows.UI.dll 10.0.26100.2605
thumbcache.dll C:\Windows\System32\thumbcache.dll 10.0.26100.1882
windowscodecs.dll C:\Windows\System32\windowscodecs.dll 10.0.26100.2605
PhotoMetadataHandler.dll C:\Windows\System32\PhotoMetadataHandler.dll 10.0.26100.2454
textinputframework.dll C:\Windows\System32\textinputframework.dll 10.0.26100.2605
CoreMessaging.dll C:\Windows\System32\CoreMessaging.dll 10.0.26100.1882
CoreUIComponents.dll C:\Windows\System32\CoreUIComponents.dll 10.0.26100.2605
oleacc.dll C:\Windows\System32\oleacc.dll 7.2.26100.2454
TextShaping.dll C:\Windows\System32\TextShaping.dll 10.0.26100.2454

Sample Files

No response

I carefully read all instruction and confirm that I did the following:

  • I tested with the latest mpv version to validate that the issue is not already fixed.
  • I provided all required information including system and mpv version.
  • I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of --log-file=output.txt.
  • I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
  • I attached the full, untruncated log file.
  • I attached the backtrace in the case of a crash.
@aniotaweeb aniotaweeb changed the title mpv crashes when resizing window with vo=gpu-next option enabled mpv crashes when resizing its window with the vo=gpu-next option enabled Dec 26, 2024
@Andarwinux
Copy link
Contributor

Does gpu-context=winvk crash as well?
You need windbg and pdb to get meaningful crash backtrace.

@llyyr
Copy link
Contributor

llyyr commented Dec 26, 2024

mpv cleanly exits in your logfile, I don't see any crashes.

@aniotaweeb
Copy link
Author

aniotaweeb commented Dec 26, 2024

Does gpu-context=winvk crash as well? You need windbg and pdb to get meaningful crash backtrace.

profile=gpu-hq
vo=gpu
priority=realtime
hwdec=d3d11va-copy
gpu-api=d3d11
gpu-context=winvk
vulkan-device=43510000-0600-0000-12c5-6000140012c5
vulkan-swap-mode=auto

No, --gpu-context=winvk doesn't make mpv crash with --hwdec=d3d11va-copy and --gpu-api=d3d11 enabled; its demuxer can play audio from media files, but it can't render any video footage.

pwsh output:
[vo/gpu] Failed initializing any suitable GPU context!
Error opening/initializing the selected video_out (--vo) device.

However, mpv refuses to execute when using --hwdec=vulkan-copy, --gpu-api=vulkan, and --gpu-context=winvk simultaneously.

profile=gpu-hq
vo=gpu
priority=realtime
hwdec=vulkan-copy
gpu-api=vulkan
gpu-context=winvk
vulkan-device=43510000-0600-0000-12c5-6000140012c5
vulkan-swap-mode=auto

vulkan windbg.txt

Incidentally, here's a windbg file for the following conf with --vo=gpu-next enabled:

profile=gpu-hq
vo=gpu-next
priority=realtime
hwdec=d3d11va-copy
gpu-api=d3d11
gpu-context=d3d11
d3d11-adapter=Qualcomm(R) Adreno(TM) X1-85 GPU

windbg.txt

The following instruction shown at line 515 always appears before mpv crashes with --vo=gpu-next enabled. Line 512 shows that mpv crashes when the Access violation - code c0000005 (first chance) invalid memory address exception error message appears after adjusting the size of its window during video playback.

qcgpuarm64xcompilercore!LoadLLC+0x6d0e24:
00007ffb`2bbca3a4 39402268 ldrb w8,[x19,#8]

※Note: there's eight blank spaces between "ldrb" and "w8,[x19,#8]" for some reason. I've also tried installing shinchiro's x86_64 mpv executable instead of the native aarch64 one, but this behaviour persists.
image

@aniotaweeb
Copy link
Author

aniotaweeb commented Dec 26, 2024

mpv cleanly exits in your logfile, I don't see any crashes.

Yes, mpv cleanly exited after generating my logfile, but an Access violation - code c0000005 (first chance) invalid memory address exception error message appears whenever I adjust the size of its window during video playback when using --vo=gpu-next. When mpv's window becomes too big or small, its associated process freezes, crashes, and generates a dump file in the %LOCALAPPDATA%\mpv directory. My reply to Andarwinux's comment contains the relevant details regarding mpv's behaviour with --vo=gpu-next enabled during video playback.

I suspect that a graphics driver for my laptop's Qualcomm Adreno X1-85 GPU might be attributable to this behaviour. I've upgraded to the latest driver, Qualcomm-Adreno-X1-85-Graphics-Driver_PGKYF_WINARM64_31.0.80.0_A05.EXE (31.0.80.0, A05), which Dell released on December 16, 2024, but to no avail https://www.dell.com/support/home/en-ca/drivers/driversdetails?driverid=pgkyf&oscode=w11a6&productcode=inspiron-14-7441-laptop.

@aniotaweeb aniotaweeb changed the title mpv crashes when resizing its window with the vo=gpu-next option enabled vo=gpu-next: mpv crashes when resizing its window during video playback Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants