View Issue Details

IDProjectCategoryView StatusLast Update
0000667madVRbugpublic2022-07-06 03:15
ReporterPhantomGamers Assigned To 
PrioritynormalSeveritycrashReproducibilityrandom
Status newResolutionopen 
Summary0000667: Random Video Hanging with SVP + Avisynth Filter
DescriptionHi, I've been working with the developer of Avisynth Filter on a recurring issue I've been having with videos hanging (video frame freezes, audio keeps playing).

The issue can be seen here: https://github.com/CrendKing/avisynth_filter/issues/41

I've been uploading dump files and the developer fixed some instances of hanging on their end but said the last dump I provided points to MadVR as the cause.

The dump file can be found here: https://mega.nz/file/RdhU3AiL#At4x6mW6E6Iokha_N-vv7_o58i5zXTk5HlEAHLBZKtY

If you have any questions or would like additional dumps let me know.
Steps To ReproduceCannot be reliably reproduced.
Additional InformationI selected "Software" under the Decoding option but I'm not actually sure what MPC Video Decoder uses, I assume it's software but it may be something else.
TagsNo tags attached.
madVR Version0.92.17
Media Player (with version info)MPC-BE x64 1.5.6
Splitter (with version info)N/A?
Decoder (with version info)MPC Video Decoder
DecodingSoftware
Deinterlacingauto mode
DXVA2 Scaling Activeno
Aero / Desktop CompositionOn
Problem occurs with modeall modes
GPU ManufacturerNVidia
GPU ModelRTX 3090
GPU Driver Version465.89

Activities

madshi

2021-04-10 13:36

administrator   ~0002796

When the problem occurs, can you please press Ctrl+Alt+Shift+Pause/Break, then wait a couple of seconds, then check if there's a "freeze report" on your desktop? If so, please post it here. Ideally, please try to get the debug symbols for the Avisynth Filter and copy them to the same folder where the Avisynth Filter's dll/ax files are located. That will help make the freeze report more useful.

PhantomGamers

2021-04-10 16:22

reporter   ~0002797

I will provide the freeze report when I hear back from CrendKing, the avisynth filter dev, about the debug symbols.

In the meantime I'd like to pass by this message he left on the issue over there:

"I managed to find a way to repro the hang you experienced. It is because unlike EVR, when being queried for media type change, madVR calls to source filter (most likely LAV Splitter) for its connection media type. This call tries to acquire LAV filter's lock, and consequently form a chain of dead lock.

Specifically,

Main thread: holds LAV m_csFilter, blocked on LAV m_csReceive
Streaming thread: holds LAV m_csReceive, blocked on avsf m_csReceive
avsf worker thread: holds avsf m_csReceive, blocked on LAV m_csFilter <- this is where the hang occurred

In contrast, EVR doesn't seem to make that call, thus no dead lock formed.

Now, I'm not saying this is a bug in madVR. They could do it for good reason. On my hand, I could change my logic to do output format change differently. It may take some time to try different approaches. So I might release a new version with this as a known issue."

madshi

2021-04-10 18:56

administrator   ~0002798

Seems he already figured it out. I'm not sure why madVR asks the source filter for its connection media type in that situation. There's probably a reason but I'd have to analyse my source code to find out.

EternalStudent07

2022-07-06 03:15

reporter   ~0002920

Think I'm seeing this too. Lots of video freezes lately with audio still playing. Happens with different files, and semi reproducible. Near the same timestamp it'll often pause again if I jump before the current one. Often pausing then playing will have the UI suddenly play the video quickly to get to where the audio is.

MPC-HC nightly 1.9.21.2 + external updated LAVFilters 0.76.1 ("CUVID (old)" hwdec) + AviSynthFilters 1.4.3 + SVP4 4.5.0.214 with their black bar detection zoom + NVIDIA 1080ti driver 516.59 + MadVR 0.92.17 (just reset MadVR settings yesterday, no improvement) + AVISynth 3.7.2 r3661 (upgrading from default 3.5.1 improved things, but not 100%...think it'd just hang before).

Guess I'll switch to EVR next to see if that helps.

I don't see anything obvious in logs I've looked through so far (SVP for instance).

Issue History

Date Modified Username Field Change
2021-04-10 01:47 PhantomGamers New Issue
2021-04-10 13:36 madshi Note Added: 0002796
2021-04-10 16:22 PhantomGamers Note Added: 0002797
2021-04-10 18:56 madshi Note Added: 0002798
2022-07-06 03:15 EternalStudent07 Note Added: 0002920