New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'osc: add right-click behavior to playlist and chapter buttons' show error #3691

Closed
IAMJ opened this Issue Oct 20, 2016 · 5 comments

Comments

Projects
None yet
2 participants
@IAMJ

IAMJ commented Oct 20, 2016

mpv version: 0.21.0
OS: macOS 10.12

[osc] stack traceback:
[osc]   @osc.lua:677: in function 'limited_list'
[osc]   @osc.lua:685: in function 'get_playlist'
[osc]   @osc.lua:1486: in function '?'
[osc]   @osc.lua:2010: in function 'process_event'
[osc]   @osc.lua:2166: in function 'cb'
[osc]   mp.defaults:107: in function 'fn'
[osc]   mp.defaults:60: in function 'handler'
[osc]   mp.defaults:339: in function 'handler'
[osc]   mp.defaults:448: in function 'call_event_handlers'
[osc]   mp.defaults:485: in function 'dispatch_events'
[osc]   mp.defaults:441: in function <mp.defaults:440>
[osc]   [C]: in ?
[osc]   [C]: in ?
[osc] Lua error: @osc.lua:677: attempt to index local 'item' (a nil value)

output.txt

@wiiaboo

This comment has been minimized.

Member

wiiaboo commented Oct 20, 2016

I'm going to need an example command line to repeat this.

@IAMJ

This comment has been minimized.

IAMJ commented Oct 20, 2016

@wiiaboo

J$ mpv /Volumes/Two/Downloads/流金岁月/EP33.mkv 
Playing: /Volumes/Two/Downloads/流金岁月/EP33.mkv
[autoload] Prepending EP32.mkv 
[autoload] Prepending EP31.mkv 
[autoload] Prepending EP30.mkv 
[autoload] Prepending EP29.mkv 
[autoload] Prepending EP28.mkv 
[autoload] Prepending EP27.mkv 
[autoload] Prepending EP26.mkv 
[autoload] Prepending EP25.mkv 
[autoload] Prepending EP24.mkv 
[autoload] Prepending EP23.mkv 
[autoload] Prepending EP22.mkv 
[autoload] Prepending EP21.mkv 
[autoload] Prepending EP20.mkv 
[autoload] Prepending EP19.mkv 
[autoload] Prepending EP18.mkv 
[autoload] Prepending EP17.mkv 
[autoload] Prepending EP16.mkv 
[autoload] Prepending EP15.mkv 
[autoload] Prepending EP14.mkv 
[autoload] Prepending EP13.mkv 
[autoload] Prepending EP12.mkv 
[autoload] Prepending EP11.mkv 
[autoload] Prepending EP10.mkv 
[autoload] Prepending EP09.mkv 
[autoload] Prepending EP08.mkv 
[autoload] Prepending EP07.mkv 
[autoload] Prepending EP06.mkv 
[autoload] Prepending EP05.mkv 
[autoload] Prepending EP04.mkv 
[autoload] Prepending EP03.mkv 
[autoload] Prepending EP02.mkv 
[autoload] Prepending EP01.mkv 
[autoload] Adding EP34.mkv 
[autoload] Adding EP35.mkv 
[autoload] Adding EP36.mkv 
[autoload] Adding EP37.mkv 
[autoload] Adding EP38.mkv 
[autoload] Adding EP39.mkv 
[autoload] Adding EP40.mkv 
[autoload] Adding EP41.mkv 
[autoload] Adding EP42.mkv 
[autoload] Adding EP43.mkv 
[autoload] Adding EP44.mkv 
[autoload] Adding EP45.mkv 
 (+) Video --vid=1 (*) (h264)
 (+) Audio --aid=1 --alang=chi (*) '粤語' (aac)
     Audio --aid=2 --alang=chi '国语' (aac)
 (+) Subs  --sid=1 --slang=chi (*) (dvd_subtitle)
AO: [coreaudio] 48000Hz stereo 2ch floatp
Using hardware decoding (videotoolbox).
VO: [opengl] 720x540 videotoolbox
AV: 00:00:03 / 00:43:39 (0%) A-V:  0.000
[osc] 
[osc] stack traceback:
[osc]   @osc.lua:677: in function 'limited_list'
[osc]   @osc.lua:685: in function 'get_playlist'
[osc]   @osc.lua:1501: in function '?'
[osc]   @osc.lua:2010: in function 'process_event'
[osc]   @osc.lua:2166: in function 'cb'
[osc]   mp.defaults:107: in function 'fn'
[osc]   mp.defaults:60: in function 'handler'
[osc]   mp.defaults:339: in function 'handler'
[osc]   mp.defaults:448: in function 'call_event_handlers'
[osc]   mp.defaults:485: in function 'dispatch_events'
[osc]   mp.defaults:441: in function <mp.defaults:440>
[osc]   [C]: in ?
[osc]   [C]: in ?
[osc] Lua error: @osc.lua:677: attempt to index local 'item' (a nil value)
AV: 00:00:14 / 00:43:39 (0%) A-V:  0.000
@wiiaboo

This comment has been minimized.

Member

wiiaboo commented Oct 20, 2016

Save this as osc.lua in your scripts directory and try again with
mpv --no-osc --msg-level=osc=v /Volumes/Two/Downloads/流金岁月/EP33.mkv and paste the log again, please.

@IAMJ

This comment has been minimized.

IAMJ commented Oct 20, 2016

@wiiaboo

J$ mpv --no-osc --msg-level=osc=v /Volumes/Two/Downloads/流金岁月/EP33.mkv
[osc] Loading script /Users/J/.config/mpv/scripts/osc.lua...
[osc] loading mp.defaults
[osc] loading file /Users/J/.config/mpv/scripts/osc.lua
Playing: /Volumes/Two/Downloads/流金岁月/EP33.mkv
[autoload] Prepending EP32.mkv 
[autoload] Prepending EP31.mkv 
[autoload] Prepending EP30.mkv 
[autoload] Prepending EP29.mkv 
[autoload] Prepending EP28.mkv 
[autoload] Prepending EP27.mkv 
[autoload] Prepending EP26.mkv 
[autoload] Prepending EP25.mkv 
[autoload] Prepending EP24.mkv 
[autoload] Prepending EP23.mkv 
[autoload] Prepending EP22.mkv 
[autoload] Prepending EP21.mkv 
[autoload] Prepending EP20.mkv 
[autoload] Prepending EP19.mkv 
[autoload] Prepending EP18.mkv 
[autoload] Prepending EP17.mkv 
[autoload] Prepending EP16.mkv 
[autoload] Prepending EP15.mkv 
[autoload] Prepending EP14.mkv 
[autoload] Prepending EP13.mkv 
[autoload] Prepending EP12.mkv 
[autoload] Prepending EP11.mkv 
[autoload] Prepending EP10.mkv 
[autoload] Prepending EP09.mkv 
[autoload] Prepending EP08.mkv 
[autoload] Prepending EP07.mkv 
[autoload] Prepending EP06.mkv 
[autoload] Prepending EP05.mkv 
[autoload] Prepending EP04.mkv 
[autoload] Prepending EP03.mkv 
[autoload] Prepending EP02.mkv 
[autoload] Prepending EP01.mkv 
[autoload] Adding EP34.mkv 
[autoload] Adding EP35.mkv 
[autoload] Adding EP36.mkv 
[autoload] Adding EP37.mkv 
[autoload] Adding EP38.mkv 
[autoload] Adding EP39.mkv 
[autoload] Adding EP40.mkv 
[autoload] Adding EP41.mkv 
[autoload] Adding EP42.mkv 
[autoload] Adding EP43.mkv 
[autoload] Adding EP44.mkv 
[autoload] Adding EP45.mkv 
 (+) Video --vid=1 (*) (h264)
 (+) Audio --aid=1 --alang=chi (*) '粤語' (aac)
     Audio --aid=2 --alang=chi '国语' (aac)
 (+) Subs  --sid=1 --slang=chi (*) (dvd_subtitle)
AO: [coreaudio] 48000Hz stereo 2ch floatp
Using hardware decoding (videotoolbox).
VO: [opengl] 720x540 videotoolbox
AV: 00:00:01 / 00:43:39 (0%) A-V:  0.000
[osc] min: 18 max: 46 count: 45 max_items: 30 
[osc] 
[osc] stack traceback:
[osc]   /Users/J/.config/mpv/scripts/osc.lua:677: in function 'limited_list'
[osc]   /Users/J/.config/mpv/scripts/osc.lua:685: in function 'get_playlist'
[osc]   /Users/J/.config/mpv/scripts/osc.lua:1501: in function '?'
[osc]   /Users/J/.config/mpv/scripts/osc.lua:2010: in function 'process_event'
[osc]   /Users/J/.config/mpv/scripts/osc.lua:2166: in function 'cb'
[osc]   mp.defaults:107: in function 'fn'
[osc]   mp.defaults:60: in function 'handler'
[osc]   mp.defaults:339: in function 'handler'
[osc]   mp.defaults:448: in function 'call_event_handlers'
[osc]   mp.defaults:485: in function 'dispatch_events'
[osc]   mp.defaults:441: in function <mp.defaults:440>
[osc]   [C]: in ?
[osc]   [C]: in ?
[osc] Lua error: /Users/J/.config/mpv/scripts/osc.lua:677: attempt to index local 'item' (a nil value)
[osc] Exiting...
AV: 00:00:46 / 00:43:39 (1%) A-V:  0.000

wiiaboo added a commit to wiiaboo/mpv that referenced this issue Oct 20, 2016

osc: fix crash in script when reaching a certain position in limited …
…list

Don't try to display more items than there are in the chapter/playlist.
Fixes mpv-player#3691
@IAMJ

This comment has been minimized.

IAMJ commented Oct 20, 2016

@wiiaboo Thanks! fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment