CrendKing / avisynth_filter

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

Potplayer crashes at close when using filter while SVP is inactive #9

Closed chorong761 closed 3 years ago

chorong761 commented 3 years ago

Potplayer will crash when I close the player w/ filter v0.6.1 (avs+ 3.5, 3.6, 3.6.1 same issue) if SVP is inactive at the time of closing.

Downgrading to filter v0.6.0 seems to have solved the issue, possibly a bug?

CrendKing commented 3 years ago

What do you mean "if SVP is inactive at the time of closing" exactly? Having SVP disabled or conditionally not apply a profile? I need more detailed steps to reproduce the issue.

So far I tried

  1. Just using the filter in PotPlayer and load SVP plugins. Everything works.
  2. Let SVP take over the control in PotPlayer. Everything works.
chorong761 commented 3 years ago

what i mean is just adding the the avisynth filter in potplayer and setting it to perfer, then play a video with SVP off. Crashes with that error when I close the player. I have the same problem on 2 different computers

EDIT: it seems like the problem is with V0.7.0, I "assumed" that the one with SVP was 0.6.2 (my bad) since the newest one on here was 0.6.2.

Just tried 0.6.2 and it seems fine

CrendKing commented 3 years ago

OK, I managed to reproduce the crash. Question: do you use madVR? If yes, can you confirm you use madVR by selecting "Madish Video Renderer" in the "Video Renderer" dropdown? If yes again, try the following:

  1. Select a different renderer, e.g. EVR
  2. After 1, go to Settings, Filter Control, add madVR64.ax, set to prefer. Reopen the video, and confirm you are using madVR this way by going right click -> Filters (both "madVR" and "AviSynth Filter" should be there, and make sure it's not "Madish Video Renderer")

If again, in both cases there is no more crash, then we are on the same page. Let me know your result.

chorong761 commented 3 years ago

Yes, I do use madvr and it is selected via the video render list

  1. EVR doesnt crash
  2. did that, shows madvr and avs filter, doesnt crash

so yes we are on the same page!

CrendKing commented 3 years ago

Try avisynth_filter_64.zip

As to why this only happens to this specific setup, I think it has something to do with how PotPlayer loads and uses madVR. When exiting, it probably unloads modules too early too fast. I recall years ago when I use PotPlayer I notice weirdness with this setup. The workaround setup also has its own issues, so I do not recommend.

chorong761 commented 3 years ago

Just tried that one you attached and it works 👍

chainikdn commented 3 years ago

Again, PotPlayer sometimes crashes with 0.8.1, mostly when switching to another video in playlist and with LAV Video decoder in use. Last lines in the log:

T 6912 @ 33769: Frame handler start BeginFlush() T 6912 @ 33769: Frame handler cleanup after stop threads

I know it crashes on a t.join(); line but I can't provide full callstack cause I'm unable to attach debugger to the PotPlayer process for some reason oO

CrendKing commented 3 years ago

@chainikdn How does t.join() ever crash? You mean hang? Mind if creating a new issue to track?

unable to attach debugger to the PotPlayer process for some reason

I remember that too. PotPlayer is not friendly to open source stuff. I remember it's a hall-of-shame player right?

chainikdn commented 3 years ago

How does t.join() ever crash?

I just put a log line before and after join() call... this obviously doesn't mean that join() crashes, but the output thread crashes on termination

You mean hang?

https://www.upload.ee/image/12495364/2020-11-09_173042.jpg

CrendKing commented 3 years ago

Here's what I tried:

  1. Download fresh new PotPlayer64.
  2. Add LAV and AVSF to to. AVS script set to have SVP and prefetcher activated. FRC to 60fps.
  3. Add a bunch videos to playlist.
  4. Play and switch. Sometimes seek.

No crash at all. This is probably another hard-to-reproduce issue. You need to open an issue and detail all the info. Or try a few things (reset PotPlayer settings, minimal avs script, different videos, etc) yourself.

chorong761 commented 2 years ago

Try avisynth_filter_64.zip

As to why this only happens to this specific setup, I think it has something to do with how PotPlayer loads and uses madVR. When exiting, it probably unloads modules too early too fast. I recall years ago when I use PotPlayer I notice weirdness with this setup. The workaround setup also has its own issues, so I do not recommend.

Hi, sorry for bringing up this issue again. I reinstalled my potplayer and the this modified version of avisynth filter was in the directory + got removed. Now I am getting the same crash again with madvr and I can't download the filter from github (says its not found). Would it be possible for you to reupload it?

Thanks

CrendKing commented 2 years ago

It's not advised to use that old version, and I don't remember what change I made for that special upload.

I just tested the latest release with PotPlayer + madVR, and have no crash at all. You may want to file a new issue with details of how to reproduce the crash.