shinchiro / mpv-winbuild-cmake

CMake-based MinGW-w64 Cross Toolchain
487 stars 91 forks source link

No longer able to play Twitch VOD #688

Closed CrendKing closed 1 week ago

CrendKing commented 2 weeks ago

The last build able to play Twitch VOD is from June 12. The one after immediately crashes. Applies to both clang and gcc builds.

The only change in this repo is change of the VapourSynth API v4 header. However it's not likely the cause because 1) crash happens even with --no-config; 2) the upstream builds works.

Test command line:

mpv --no-config https://www.twitch.tv/videos/2172858502
zhongfly commented 2 weeks ago

My latest build works fine https://github.com/zhongfly/mpv-winbuild/releases/tag/2024-06-15-6c90836

CrendKing commented 2 weeks ago

True. Thanks. Any idea why?

zhongfly commented 2 weeks ago

You can analyse the dump file in C:\Users\... \AppData\Local\CrashDumps\ .

I get following with https://github.com/zhongfly/mpv-winbuild/releases/tag/2024-06-15-ab0a508 :


CONTEXT:  (.ecxr)
rax=000001458c8e8480 rbx=0000000000000000 rcx=000001458aefac90
rdx=0000000000000005 rsi=00000145fa6b2bf0 rdi=00000009f1fff618
rip=00007ff6ce8f4864 rsp=00000009f1fff490 rbp=0000000000000000
 r8=0000000000000004  r9=0000000000000004 r10=0000000000000004
r11=000001458c8e6c78 r12=000001458addec80 r13=00000145e67e2650
r14=000001458c7f6080 r15=0000000000000000
iopl=0         nv up ei pl zr na po nc
cs=0033  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010246
mpv!demux_lavf_read_packet+0x264:
00007ff6`ce8f4864 807b2d00        cmp     byte ptr [rbx+2Dh],0 ds:00000000`0000002d=??
Resetting default scope

EXCEPTION_RECORD:  (.exr -1)
ExceptionAddress: 00007ff6ce8f4864 (mpv!demux_lavf_read_packet+0x0000000000000264)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 0000000000000000
   Parameter[1]: 000000000000002d
Attempt to read from address 000000000000002d

PROCESS_NAME:  mpv.exe

READ_ADDRESS:  000000000000002d 

ERROR_CODE: (NTSTATUS) 0xc0000005 - 0x%p            0x%p                    %s

EXCEPTION_CODE_STR:  c0000005

EXCEPTION_PARAMETER1:  0000000000000000

EXCEPTION_PARAMETER2:  000000000000002d

STACK_TEXT:  
00000009`f1fff490 00007ff6`ce8ea3f3     : 00000000`00000000 00007ff6`ce8d9938 00000000`00000020 00000000`000c42c0 : mpv!demux_lavf_read_packet+0x264
00000009`f1fff5d0 00007ff6`ce8e2011     : 00000000`00000000 00007ff8`3bbaeab7 00000145`e6caab20 00000145`e6caaac0 : mpv!read_packet+0x613
00000009`f1fff690 00007ff6`ce8e10e2     : 00000145`e6caab20 00007ff8`00000000 00000000`00000000 00000145`e6caaac0 : mpv!thread_work+0x261
00000009`f1fff6e0 00007ff8`3c389333     : 00000145`8cad92a0 00000000`00000000 00000000`00000000 00000000`00000000 : mpv!demux_thread+0x222
00000009`f1fff760 00007ff8`3d2e257d     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ucrtbase!thread_start<unsigned int (__cdecl*)(void *),1>+0x93
00000009`f1fff790 00007ff8`3e7caf28     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!BaseThreadInitThunk+0x1d
00000009`f1fff7c0 00000000`00000000     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x28

FAULTING_SOURCE_LINE:  /__w/mpv-winbuild/mpv-winbuild/mpv-winbuild-cmake/build64-v3/packages/mpv-prefix/src/mpv-build/../../../../../src_packages/mpv/demux/demux_lavf.c

FAULTING_SOURCE_FILE:  /__w/mpv-winbuild/mpv-winbuild/mpv-winbuild-cmake/build64-v3/packages/mpv-prefix/src/mpv-build/../../../../../src_packages/mpv/demux/demux_lavf.c

FAULTING_SOURCE_LINE_NUMBER:  1264

FAULTING_SOURCE_CODE:  
No source found for '/__w/mpv-winbuild/mpv-winbuild/mpv-winbuild-cmake/build64-v3/packages/mpv-prefix/src/mpv-build/../../../../../src_packages/mpv/demux/demux_lavf.c'

SYMBOL_NAME:  mpv!demux_lavf_read_packet+264

MODULE_NAME: mpv

IMAGE_NAME:  mpv.exe

STACK_COMMAND:  ~59s; .ecxr ; kb

FAILURE_BUCKET_ID:  NULL_CLASS_PTR_READ_c0000005_mpv.exe!demux_lavf_read_packet
Andarwinux commented 2 weeks ago

see https://github.com/mpv-player/mpv/commit/6c908363cd17cf14738b005d59668d1400cb2510

CrendKing commented 2 weeks ago

Thanks. I wonder if it is because Twitch VOD always miss first minute of video data, like being somewhat malformed, and mpv doesn't like it.

Obegg commented 2 weeks ago

You can analyse the dump file in C:\Users\... \AppData\Local\CrashDumps\ .

Sorry for the noob question - this folder doesn't exist on my machine, how were you able to get the crash log file from mpv? I guess it's not related to --log-file command...

CrendKing commented 2 weeks ago

I think zhongfly meant the crash dump, not log file. Crash dump can be generated by Windows Error Reporting (WER). You can follow this instruction: https://learn.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps

CrendKing commented 1 week ago

Seems fixed in the latest 20240623 build. Thanks!