CrendKing / avisynth_filter

DirectShow filters that put AviSynth and VapourSynth into video playing
MIT License
108 stars 8 forks source link

[PotPlayer, MPC-HC] crash at start #19

Closed chainikdn closed 3 years ago

chainikdn commented 3 years ago

... w/o SVP, w/o custom script, AVS 3.5.1 Only one user reporting this, I can't reproduce the crash on my laptop. more (?) details there log (1).txt

Nuihc88 commented 3 years ago

Try asking them if they still get the crashes with only YV12 colorspace enabled. It could be connected to a problem i have been investigating, but i'm not sure.

CrendKing commented 3 years ago

I can reproduce. It crashed the exactly same way as what you reported at https://github.com/CrendKing/avisynth_filter/issues/6#issuecomment-717959824. Except I don't even need to switch track.

    AviSynth.dll!Antialiaser::GetAlphaRect() Line 857   C++
    AviSynth.dll!Antialiaser::ApplyYV12(unsigned char * buf, int pitch, int pitchUV, unsigned char * bufU, unsigned char * bufV) Line 232   C++
    AviSynth.dll!Antialiaser::Apply(const VideoInfo & vi, PVideoFrame * frame, int pitch) Line 201  C++
    AviSynth.dll!Subtitle::GetFrame(int n, IScriptEnvironment * env) Line 1496  C++
    AviSynth.dll!MTGuard::GetFrame(int n, IScriptEnvironment * env) Line 120    C++
    AviSynth.dll!Cache::GetFrame(int n, IScriptEnvironment * env) Line 189  C++
    avisynth_filter_64.ax!AvsFilter::FrameHandler::ProcessOutputSamples() Line 333  C++

The video is H.264 and all formats enabled, so basically NV12. If I disable NV12 and YV12, LAV will convert to YUY2 and feed me. The crash will then come from ApplyYUY2().

MPC-BE crashes the same way.

It seems to link to the input format setting in a strange way. If I disable all formats but leave NV12 and YUY2 on, there is no crash. If I disable any of them, even though it eventually only uses NV12, it crashes. I have no idea why allowing YUY2 would fix the problem.

With AviSynthPlus 3.6, there is no crash regardless of input format settings (well, SVSmoothFps() crashes with YUY2, but you can always ConvertToYV12()).

So it might be a bug in AVS+ 3.5 that will never be fixed.

chainikdn commented 3 years ago

Maybe I missed something... 1st: https://github.com/CrendKing/avisynth_filter/issues/6#issuecomment-717959824 is not about a crash at all, and here we're talking about crash. 2nd: I'm pretty sure the user (TayyabKhalid) have all the filter options set to defaults, i.e. all formats enabled.

Nuihc88 commented 3 years ago

There seems to be a lot of inconsistency in how the Input Colorspaces work with different system configurations.

I was getting silent crashes when i first started experimenting with AviSynth Filter v0.6.0 or so, but got rid of the problem by disabling all input colorspaces apart from YV12. At the time i assumed it was a script problem and planned to get to troubleshooting it later. Now that i've looked into it, it turns out that the issue persists even while using any variation of the script below:

AvsFilterSource()

ConvertBits(bits=8,dither=-1)

ConvertToYV12()

I tried only enabling one colorspace at a time and for me silent crashing happens consistently when loading Input Formats NV12, P010 & P016.

It seems to link to the input format setting in a strange way. If I disable all formats but leave NV12 and YUY2 on, there is no crash. If I disable any of them, even though it eventually only uses NV12, it crashes. I have no idea why allowing YUY2 would fix the problem.

I tested this and got silent crashes with MPC-HC & MPC-BE; Using EVR & MadVR. PotPlayer loads fine, but AviSynth Filter reports that it's actually using YUY2.

Enabling different colorspace combinations seems to sometimes produce different effects from when only one colorspace is selected, some of which might be player/decoder/renderer-combo specific, but only happen with AviSynth Filter enabled. Some combinations have color distortion issues, while some others crash silently or with Access violation errors pointing to either avisynth.dll or avisynthfilter**.ax. I have ruled out LAV Filters hardware acceleration as a potential cause.

I have mostly been testing with the newest test build of AviSynth+ & AviSynth Filter; Players used: PotPlayer 200908(1.7.21295), MPC-HC (1.9.8) & MPC-BE (1.5.5.5433), both 32bit & 64bit; OS: Win7 x64.

CrendKing commented 3 years ago

Try the second one in https://github.com/CrendKing/avisynth_filter/issues/18#issuecomment-719144423

@chainikdn If you can confirm working, or any improve over the avs 3.5 issue, I'll release a new version for it.

CrendKing commented 3 years ago

No activity, closing.

chainikdn commented 3 years ago

No activity during holidays doesn't mean it stopped to crash. And I'm personally on a vacations right now...

CrendKing commented 3 years ago

Feel free to reopen. I didn't mean to won't fix.

chainikdn commented 3 years ago

https://github.com/CrendKing/avisynth_filter/files/5468000/AviSynthFilter.zip

Nice, it's working now. <...> Sadly it crashes after a few seeks. Somtimes it dosen't even go past one before crashing. I attached the latest log just in case you ask about it later. https://www49.zippyshare.com/v/XsgoO2sI/file.html

CrendKing commented 3 years ago

What about https://github.com/CrendKing/avisynth_filter/files/5476051/AviSynthFilter.zip?

Kayizoku commented 3 years ago

Hi. I am the person who is experiencing this issue. TayyabKhalid is my username at SVP Forum.

I thought it was faster to reply here over going at the forum and going through that tedious process over again. I just tried out the new version. Right now it crashes much faster. I barley get in a seek or two. If I let it be the video continues to play normally but crash is instantaneously when I start seeking. I attached the latest log files.

avsf.log

CrendKing commented 3 years ago

@Tensai-Otaku Try AviSynthFilter.zip

Kayizoku commented 3 years ago

@CrendKing I tested the new version. No crashes so far at all. I tried to really seek as much as possible but no crashes or slow down occured. The video simply played normally till the end. This is the first version that has worked without crashing one bit whatsoever. Thank you for not giving up and finding a solution for me. I greatly appreciate it ^^

CrendKing commented 3 years ago

You are welcome. I'll release new version for the fix.

Closing the ticket. If you notice new problem, create a new ticket.