Skip to content
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

Fix error "attempt to compare nil with number" #43

Merged
merged 1 commit into from
Nov 3, 2019

Conversation

ento
Copy link
Contributor

@ento ento commented Nov 3, 2019

This fixes an error that gets logged every time a video finishes playing:

...
[vd] Uninit decoder.
[client_osc]
[client_osc] stack traceback:
[client_osc]    mp.defaults:366: in function 'handler'
[client_osc]    mp.defaults:460: in function 'call_event_handlers'
[client_osc]    mp.defaults:494: in function 'dispatch_events'
[client_osc]    mp.defaults:453: in function <mp.defaults:452>
[client_osc]    [C]: at 0x5745da2c25d0
[client_osc]    [C]: at 0x5745da2c38d0
[client_osc] Lua error:
...jmrbar-mpv_thumbnail_script-0.4.2/scripts/client_osc.lua:1087:
attempt to compare nil with number
...

Tested on mpv version 0.29.0:

$ mpv --version
mpv 0.29.0-910-gd66eb93e5d Copyright © 2000-2019 mpv/MPlayer/mplayer2 projects
 built on Thu Oct 24 22:37:22 AKDT 2019
ffmpeg library versions:
   libavutil       56.35.101
   libavcodec      58.59.102
   libavformat     58.33.100
   libswscale      5.6.100
   libavfilter     7.65.100
   libswresample   3.6.100
ffmpeg version: N-95553-g155508c6e9

This fixes this error that gets logged every time a
video finishes playing:

```
...
[vd] Uninit decoder.
[client_osc]
[client_osc] stack traceback:
[client_osc]    mp.defaults:366: in function 'handler'
[client_osc]    mp.defaults:460: in function 'call_event_handlers'
[client_osc]    mp.defaults:494: in function 'dispatch_events'
[client_osc]    mp.defaults:453: in function <mp.defaults:452>
[client_osc]    [C]: at 0x5745da2c25d0
[client_osc]    [C]: at 0x5745da2c38d0
[client_osc] Lua error:
...jmrbar-mpv_thumbnail_script-0.4.2/scripts/client_osc.lua:1087:
attempt to compare nil with number
...
```
@w1kl4s
Copy link

w1kl4s commented Nov 3, 2019

Got broken for me with upgrade to mpv 0.30. This fixed the error.

➜  ~ mpv --version
mpv 0.30.0 Copyright © 2000-2019 mpv/MPlayer/mplayer2 projects
 built on UNKNOWN
ffmpeg library versions:
   libavutil       56.22.100
   libavcodec      58.35.100
   libavformat     58.20.100
   libswscale      5.3.100
   libavfilter     7.40.101
   libswresample   3.3.100
ffmpeg version: 4.1.4

@TheAMM
Copy link
Owner

TheAMM commented Nov 3, 2019

There's now been several PRs for fixing this and I've sort of ignored them because I was surely going to rewrite this entire thing, but now I have to admit it's a very unknown ETA, so hey Let's Get This Merged.

@TheAMM TheAMM merged commit e0225de into TheAMM:master Nov 3, 2019
@ento ento deleted the fix-compare-nil-with-number branch November 3, 2019 23:37
@ento
Copy link
Contributor Author

ento commented Nov 3, 2019

Oops, sorry for not looking at other PRs and thanks for the merge.

@garoto
Copy link

garoto commented Nov 4, 2019

so hey Let's Get This Merged.

I recognize that reverse acronym.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants