mpv icon indicating copy to clipboard operation
mpv copied to clipboard

stats.lua crashes on input cache stats page when both plot_vsync_* options are set to 'no'

Open rld243 opened this issue 6 years ago • 1 comments

Important Information

mpv 0.32.0-337-g7df9f81d22 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects built on Thu Apr 9 11:23:25 UTC 2020 FFmpeg library versions: libavutil 56.42.102 libavcodec 58.77.101 libavformat 58.42.100 libswscale 5.6.101 libavfilter 7.77.101 libswresample 3.6.100 FFmpeg version: N-97220-gcd04bb4afe

Windows 10, version 1909

Cross-compiled binary on msys2

Reproduction steps

  1. Open any video with --no-config --script-opts=stats-plot_vsync_ratio=no,stats-plot_vsync_jitter=no
  2. Open stats.lua interface (default is 'I')
  3. Switch to input cache stats page (default is '3')

Expected behavior

Input cache stats page should be displayed

Actual behavior

stats.lua crashes and dumps following crash info:

[stats]
[stats] stack traceback:
[stats]         @stats.lua:796: in function 'print_page'
[stats]         @stats.lua:811: in function 'fn'
[stats]         mp.defaults:225: in function 'fn'
[stats]         mp.defaults:60: in function 'handler'
[stats]         mp.defaults:365: in function 'handler'
[stats]         mp.defaults:495: in function 'call_event_handlers'
[stats]         mp.defaults:529: in function 'dispatch_events'
[stats]         mp.defaults:488: in function <mp.defaults:487>
[stats]         [C]: at 0x7ff7c9697250
[stats]         [C]: at 0x7ff7c9696a50
[stats] Lua error: @stats.lua:662: attempt to index upvalue 'cache_ahead_buf' (a nil value)

It doesn't crash if ether one of plot_vsync_* options is set to 'yes' (default) It crashes only when both 'plot_vsync_ratio' and 'plot_vsync_jitter' are set to 'no'

Log file

https://0x0.st/iSQt.log

rld243 avatar Apr 09 '20 12:04 rld243

@wm4 Thanks. It doesn't crash anymore, but I also noticed some inconsistent behaviour. These options imply there won't be any graphs:

plot_perfdata=no
plot_vsync_ratio=no
plot_vsync_jitter=no

If I press 'I' (uppercase) and then switch to the cache page there will be graphs, but if I press 'i' (lowercase) and switch there won't be any graphs.

rld243 avatar Apr 09 '20 13:04 rld243