Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Crash on exit with hwdec=d3d11va after b46eaa3 #3348
mpv version and platform
mpv git-77e1e8e Win 10
Open any h.264 video from command line with --hwdec=d3d11va option
No errors after mpv shut down
There is a message "mpv has stopped working"
From Administrative Events:
Btw I can repro this consistently now. For some reason, the error reporting dialog doesn't show when I launch mpv normally and then close it, but a werfault.exe process will appear briefly in the task manager. When I launch mpv in a debugger, play some video with hwdec=d3d11va and close it, it will almost always crash with an EXCEPTION_ACCESS_VIOLATION.
It always happens after d3d11.dll is unloaded. When decoding with hwdec_d3d11egl, only ANGLE has a reference to d3d11.dll, so d3d11.dll is unloaded when ANGLE calls FreeLibrary. It seems like a thread owned by the Nvidia driver (nvwgf2umx.dll) tries to call functions in d3d11.dll after it's unloaded (RIP is set to an address where d3d11.dll used to be.)
I have no idea why this is happening though. If hwdec uninit happens before vo uninit, ANGLE's reference to d3d11.dll should still be alive while any hwdec-related objects are alive. That said, we might be able to fix this by calling d3d_load_dlls() in all cases, even when only ANGLE has to call into d3d11.dll directly. That way, d3d11.dll will never be unloaded.