Aleksoid1978 / MPC-BE

MPC-BE – универсальный проигрыватель аудио и видеофайлов для операционной системы Windows.
GNU General Public License v3.0
1.88k stars 83 forks source link

Crash when switching subtitles quickly, with MPC-VR and XYSubtitleFilter #452

Closed Chetan-Ullal closed 2 months ago

Chetan-Ullal commented 2 months ago

Repro Steps:

  1. Extract the clip from the attached zip.
  2. Using MPC-BE v1.7, set MPC-VR as the video renderer and XYSubtitleFilter as the subtitle renderer.
  3. Play the attached clip and while it's playing quickly switch between the two subtitle streams
  4. MPC-BE crashes.

Repro rate is fairly high, but you might have to do it a few times to get the crash.

TestClip.zip

v0lt commented 2 months ago

Windows 10 x64 22H2 MPC-BE x64 1.7.0.37 dev MPC Video Renderer 0.8.0.2228 XySubFilter v3.2.0.810 (20240123)

I started playing the file, then pressed the "S" key to switch subtitles as quickly as possible and nothing crashed.

Chetan-Ullal commented 2 months ago

Windows 10 x64 22H2 MPC-BE x64 1.7.0.37 dev MPC Video Renderer 0.8.0.2228 XySubFilter v3.2.0.810 (20240123)

I started playing the file, then pressed the "S" key to switch subtitles as quickly as possible and nothing crashed.

I'm using the 32 bit version, but don't think that makes a difference here. The XYSubtitleFilter matches, but how do I get the new MPC-VR version? The last released version is 0.7.3.2210.

v0lt commented 2 months ago

https://github.com/qwerttvv/Player/releases

Chetan-Ullal commented 2 months ago

I'm able to repro the crash with the 32 bit version of 1.7.0.37, and the 0.8 version of MPC-VR installed.

Windows 10 x64 22H2

MPC-BE 1.7.0.37 dev Filters currently loaded:

Please see attached video.

I've also synced to tip with the MPC-BE repo, and this is the crash stack from my local build:

mpc-be.exe!ATL::CComPtrBase<struct ID3D11Texture2D>::operator!(void) Line 209   Unknown
mpc-be.exe!CDX11SubPicAllocator::Render(struct MemPic_t const &,class CRect const &,class CRect const &,class CRect const &) Line 480   Unknown
mpc-be.exe!CDX11SubPic::AlphaBlt(struct tagRECT *,struct tagRECT *,struct SubPicDesc *) Line 285    Unknown
mpc-be.exe!CAllocatorPresenterImpl::AlphaBlt(class CRect const &,class CRect const &,struct ISubPic *,struct SubPicDesc *,int,int) Line 137 Unknown
mpc-be.exe!CAllocatorPresenterImpl::AlphaBltSubPic(class CRect const &,class CRect const &,int) Line 124    Unknown
mpc-be.exe!DSObjects::CMPCVRAllocatorPresenter::RenderEx3(__int64,__int64,__int64,struct tagRECT,struct tagRECT,struct tagRECT,double,int,unsigned long) Line 141   Unknown
mpc-be.exe!DSObjects::CMPCVRAllocatorPresenter::Render11(__int64,__int64,__int64,struct tagRECT,struct tagRECT,struct tagRECT,double,int,unsigned long) Line 199    Unknown
MpcVideoRenderer.ax!551c91e8()  Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for MpcVideoRenderer.ax]   
MpcVideoRenderer.ax!551c78b0()  Unknown
MpcVideoRenderer.ax!551c6980()  Unknown
MpcVideoRenderer.ax!551ecb3d()  Unknown
MpcVideoRenderer.ax!551f6205()  Unknown
MpcVideoRenderer.ax!551ecccb()  Unknown
MpcVideoRenderer.ax!551f6ce7()  Unknown
mpc-be.exe!CBaseOutputPin::Deliver(struct IMediaSample *) Line 2695 Unknown
mpc-be.exe!CD3D11Decoder::DeliverFrame(void) Line 769   Unknown
mpc-be.exe!CMPCVideoDecFilter::DecodeInternal(struct AVPacket *,__int64,__int64,int) Line 3646  Unknown
mpc-be.exe!CMPCVideoDecFilter::Decode(unsigned char const *,int,__int64,__int64,int,int) Line 3985  Unknown
mpc-be.exe!CMPCVideoDecFilter::Transform(struct IMediaSample *) Line 4098   Unknown
mpc-be.exe!CBaseVideoFilter::Receive(struct IMediaSample *) Line 96 Unknown
mpc-be.exe!CTransformInputPin::Receive(struct IMediaSample *) Line 763  Unknown
mpc-be.exe!CBaseOutputPin::Deliver(struct IMediaSample *) Line 2695 Unknown
mpc-be.exe!CBaseSplitterOutputPin::Deliver(struct IMediaSample *) Line 535  Unknown
mpc-be.exe!CBaseSplitterOutputPin::DeliverPacket(class std::unique_ptr<class CPacket,struct std::default_delete<class CPacket> >) Line 496  Unknown
mpc-be.exe!CBaseSplitterOutputPin::ThreadProc(void) Line 324    Unknown
mpc-be.exe!CAMThread::InitialThreadProc(void *) Line 124    Unknown
mpc-be.exe!thread_start<unsigned int (__stdcall*)(void *),1>(void * const parameter) Line 97    C++
kernel32.dll!@BaseThreadInitThunk@12()  Unknown
ntdll.dll!__RtlUserThreadStart()    Unknown
ntdll.dll!__RtlUserThreadStart@8()  Unknown

2024-04-27 08-55-37.zip

itagagaki commented 2 months ago

1.7.0 (x64) in the Releases simply crashes when I try to seek a long video file with a bar or jump with a key. 1.6.11 is fine.

Windows 10 Pro z64 22H2 19045.4355 RAM 32GB Intel Core i7 11700K 3.60GHz NVIDIA GeForce GTX 1060 3GB

Aleksoid1978 commented 2 months ago

Why use 32 bit version on "Windows 10 x64 22H2" ?

Chetan-Ullal commented 2 months ago

Why use 32 bit version on "Windows 10 x64 22H2" ?

I also use Zoom Player, which is 32 bit and shares the same DShow filters.

I was curious if the bug only existed in 32 bit version, so I also built the x64 version and see the same crash stack:

mpc-be64.exe!ATL::CComPtrBase<struct ID3D11Texture2D>::operator!(void) Line 209 Unknown
mpc-be64.exe!CDX11SubPicAllocator::Render(struct MemPic_t const &,class CRect const &,class CRect const &,class CRect const &) Line 480 Unknown
mpc-be64.exe!CDX11SubPic::AlphaBlt(struct tagRECT *,struct tagRECT *,struct SubPicDesc *) Line 285  Unknown
mpc-be64.exe!CAllocatorPresenterImpl::AlphaBlt(class CRect const &,class CRect const &,struct ISubPic *,struct SubPicDesc *,int,int) Line 137   Unknown
mpc-be64.exe!CAllocatorPresenterImpl::AlphaBltSubPic(class CRect const &,class CRect const &,int) Line 124  Unknown
mpc-be64.exe!DSObjects::CMPCVRAllocatorPresenter::RenderEx3(__int64,__int64,__int64,struct tagRECT,struct tagRECT,struct tagRECT,double,int,unsigned long) Line 141 Unknown
mpc-be64.exe!DSObjects::CMPCVRAllocatorPresenter::Render11(__int64,__int64,__int64,struct tagRECT,struct tagRECT,struct tagRECT,double,int,unsigned long) Line 200  Unknown
MpcVideoRenderer64.ax!00007ffe6983b71d()    Unknown
MpcVideoRenderer64.ax!00007ffe69839e8d()    Unknown
MpcVideoRenderer64.ax!00007ffe698390aa()    Unknown
MpcVideoRenderer64.ax!00007ffe698611c4()    Unknown
MpcVideoRenderer64.ax!00007ffe6986ac23()    Unknown
MpcVideoRenderer64.ax!00007ffe6986133f()    Unknown
MpcVideoRenderer64.ax!00007ffe6986b73c()    Unknown
mpc-be64.exe!CBaseOutputPin::Deliver(struct IMediaSample *) Line 2696   Unknown
mpc-be64.exe!CD3D11Decoder::DeliverFrame(void) Line 769 Unknown
mpc-be64.exe!CMPCVideoDecFilter::DecodeInternal(struct AVPacket *,__int64,__int64,int) Line 3646    Unknown
mpc-be64.exe!CMPCVideoDecFilter::Decode(unsigned char const *,int,__int64,__int64,int,int) Line 3985    Unknown
mpc-be64.exe!CMPCVideoDecFilter::Transform(struct IMediaSample *) Line 4098 Unknown
mpc-be64.exe!CBaseVideoFilter::Receive(struct IMediaSample *) Line 96   Unknown
mpc-be64.exe!CTransformInputPin::Receive(struct IMediaSample *) Line 763    Unknown
mpc-be64.exe!CBaseOutputPin::Deliver(struct IMediaSample *) Line 2696   Unknown
mpc-be64.exe!CBaseSplitterOutputPin::Deliver(struct IMediaSample *) Line 535    Unknown
mpc-be64.exe!CBaseSplitterOutputPin::DeliverPacket(class std::unique_ptr<class CPacket,struct std::default_delete<class CPacket> >) Line 496    Unknown
mpc-be64.exe!CBaseSplitterOutputPin::ThreadProc(void) Line 324  Unknown
mpc-be64.exe!CAMThread::InitialThreadProc(void *) Line 124  Unknown
mpc-be64.exe!thread_start<unsigned int (__cdecl*)(void *),1>(void * const parameter) Line 97    C++
kernel32.dll!BaseThreadInitThunk()  Unknown
ntdll.dll!RtlUserThreadStart()  Unknown
Aleksoid1978 commented 2 months ago

Confirm crash.

v0lt commented 2 months ago

What processor and video card do you have?

Aleksoid1978 commented 2 months ago

Fixed.

Chetan-Ullal commented 2 months ago

What processor and video card do you have?

Ryzen 7 2700, Nvidia 1660 Ti.

Chetan-Ullal commented 2 months ago

Fixed.

Fix verified. Thanks for the very quick turnaround.