TheAMM / mpv_thumbnail_script

A Lua script to show preview thumbnails in mpv's OSC seekbar, sans external dependencies
GNU General Public License v3.0
679 stars 68 forks source link

Try to guard against nil properties. #46

Open tonycpsu opened 4 years ago

tonycpsu commented 4 years ago

There seems to be a race condition (see #19) when a file is loaded where some properties are set and then later read as nil. This attempts to fix this by saving non-nil properties to the global state and reading from that. Seems to eliminate the problem so far.

tonycpsu commented 4 years ago

Eh, I don't think this is a full fix just yet. The issues with video-dec-params and path have gone away, but I think it just pushes the race condition problem elsewhere in the code. Now I get things like: Lua error: ...nyc/.mpv/scripts/mpv_thumbnail_script_client_osc.lua:890: bad argument #1 to 'max' (number expected, got nil). Getting errors far less often, but still getting them. @TheAMM , do you have any pointers on where to look for the problem?

picarica commented 4 years ago

i have similar problem maybe related to this issue [mpv_thumbnail_script_client_osc] Lua error: .../.config/mpv/scriptsmpv_thumbnail_script_client_osc.lua:1080: attempt to compare nil with number more info mentioned here these are my logs is there some correlation ?

blankname commented 4 years ago

@tonycpsu Do all of the problems you encounter happen shortly after changing videos?

54 Should fix these issues.