matthieugrieger / mumbledj

A Mumble bot that plays audio fetched from various media sites.
MIT License
170 stars 59 forks source link

Bot crashes while changing to youtube playlist URL #14

Closed ghost closed 9 years ago

ghost commented 9 years ago

I was playing around a bit as tester, could then reproduce the following behaviour while playing one youtube URL and skipping then to a youtube-playlist URL, it seems only affect playlist URLs:

[19:02:01] An Music: !add https://www.youtube.com/watch?v=R8MWKsheHxk [19:02:02] MumbleDJ: raz0rsedge added "'The Journey' (2 Hour Drum & Bass Mix)" to the queue. [19:02:44] An Music: !add http://www.youtube.com/playlist?list=PL71A8OkKAS9QH1ervN6bpCKcnmGC0-MlO [19:02:45] MumbleDJ: raz0rsedge has added the playlist "" to the queue. ??? [19:03:47] An Music: !skip [19:03:47] MumbleDJ: raz0rsedge has voted to skip the current song. [19:03:47] MumbleDJ: The number of votes required for a skip has been met. Skipping song! [19:03:47] MumbleDJ left the server. ???

I could reproduce this with any playlist URL in 2.2.4 I hope I could help as proof tester

ghost commented 9 years ago

DEBUG LOG: Configuration successfully loaded! panic: runtime error: index out of range

goroutine 28 [running]: runtime.panic(0x7761a0, 0xbe7a1c) /usr/lib/golang/src/pkg/runtime/panic.c:279 +0xf5 main.(_SongQueue).PrepareAndPlayNextItem(0xc20803c440) /home/raz0r/gopath/mumbledj/songqueue.go:105 +0x3f2 main.(_SongQueue).OnItemFinished(0xc20803c440) /home/raz0r/gopath/mumbledj/songqueue.go:91 +0x668 main._SongQueue.OnItemFinished·fm() /home/raz0r/gopath/mumbledj/main.go:53 +0x26 github.com/layeh/gumble/gumble_ffmpeg.func·001() /home/raz0r/gopath/src/github.com/layeh/gumble/gumble_ffmpeg/gumble_ffmpeg.go:80 +0x7d github.com/layeh/gumble/gumble_ffmpeg.(_Stream).sourceRoutine(0xc20803f140) /home/raz0r/gopath/src/github.com/layeh/gumble/gumble_ffmpeg/gumble_ffmpeg.go:91 +0x182 created by github.com/layeh/gumble/gumble_ffmpeg.(*Stream).Play /home/raz0r/gopath/src/github.com/layeh/gumble/gumble_ffmpeg/gumble_ffmpeg.go:47 +0x2be

goroutine 16 [chan receive, 4 minutes]: main.main() /home/raz0r/gopath/mumbledj/main.go:128 +0x4c1

goroutine 19 [finalizer wait]: runtime.park(0x41daf0, 0xbff540, 0xbebae9) /usr/lib/golang/src/pkg/runtime/proc.c:1369 +0x89 runtime.parkunlock(0xbff540, 0xbebae9) /usr/lib/golang/src/pkg/runtime/proc.c:1385 +0x3b runfinq() /usr/lib/golang/src/pkg/runtime/mgc0.c:2644 +0xcf runtime.goexit() /usr/lib/golang/src/pkg/runtime/proc.c:1445

goroutine 17 [syscall, 5 minutes]: runtime.goexit() /usr/lib/golang/src/pkg/runtime/proc.c:1445

goroutine 20 [IO wait]: net.runtime_pollWait(0x7f84b0d78a90, 0x72, 0x0) /usr/lib/golang/src/pkg/runtime/netpoll.goc:146 +0x66 net.(_pollDesc).Wait(0xc208026300, 0x72, 0x0, 0x0) /usr/lib/golang/src/pkg/net/fd_poll_runtime.go:84 +0x46 net.(_pollDesc).WaitRead(0xc208026300, 0x0, 0x0) /usr/lib/golang/src/pkg/net/fd_poll_runtime.go:89 +0x42 net.(_netFD).Read(0xc2080262a0, 0xc20803ac00, 0x400, 0x400, 0x0, 0x7f84b0d77418, 0xb) /usr/lib/golang/src/pkg/net/fd_unix.go:242 +0x34c net.(_conn).Read(0xc208038028, 0xc20803ac00, 0x400, 0x400, 0x0, 0x0, 0x0) /usr/lib/golang/src/pkg/net/net.go:122 +0xe7 crypto/tls.(_block).readFromUntil(0xc208023680, 0x7f84b0d78b68, 0xc208038028, 0x5, 0x0, 0x0) /usr/lib/golang/src/pkg/crypto/tls/conn.go:451 +0xd9 crypto/tls.(_Conn).readRecord(0xc208080580, 0x17, 0x0, 0x0) /usr/lib/golang/src/pkg/crypto/tls/conn.go:536 +0x1ff crypto/tls.(_Conn).Read(0xc208080580, 0xc2081131a0, 0x2, 0x8, 0x0, 0x0, 0x0) /usr/lib/golang/src/pkg/crypto/tls/conn.go:901 +0x16a io.ReadAtLeast(0x7f84b0d79028, 0xc208080580, 0xc2081131a0, 0x2, 0x8, 0x2, 0x0, 0x0, 0x0) /usr/lib/golang/src/pkg/io/io.go:289 +0xf7 io.ReadFull(0x7f84b0d79028, 0xc208080580, 0xc2081131a0, 0x2, 0x8, 0x4, 0x0, 0x0) /usr/lib/golang/src/pkg/io/io.go:307 +0x71 encoding/binary.Read(0x7f84b0d79028, 0xc208080580, 0x7f84b0d78f40, 0x0, 0x6abcc0, 0xc208113198, 0x0, 0x0) /usr/lib/golang/src/pkg/encoding/binary/binary.go:147 +0x12b github.com/layeh/gumble/gumble.(_Client).readRoutine(0xc2080ec000) /home/raz0r/gopath/src/github.com/layeh/gumble/gumble/client.go:187 +0x23d created by github.com/layeh/gumble/gumble.(*Client).Connect /home/raz0r/gopath/src/github.com/layeh/gumble/gumble/client.go:108 +0x32d

goroutine 21 [select]: github.com/layeh/gumble/gumble.(_Client).pingRoutine(0xc2080ec000) /home/raz0r/gopath/src/github.com/layeh/gumble/gumble/client.go:163 +0x291 created by github.com/layeh/gumble/gumble.(_Client).Connect /home/raz0r/gopath/src/github.com/layeh/gumble/gumble/client.go:109 +0x348

goroutine 25 [IO wait, 3 minutes]: net.runtime_pollWait(0x7f84b0d789e0, 0x72, 0x0) /usr/lib/golang/src/pkg/runtime/netpoll.goc:146 +0x66 net.(_pollDesc).Wait(0xc20811c290, 0x72, 0x0, 0x0) /usr/lib/golang/src/pkg/net/fd_poll_runtime.go:84 +0x46 net.(_pollDesc).WaitRead(0xc20811c290, 0x0, 0x0) /usr/lib/golang/src/pkg/net/fd_poll_runtime.go:89 +0x42 net.(_netFD).Read(0xc20811c230, 0xc208126000, 0x1000, 0x1000, 0x0, 0x7f84b0d77418, 0xb) /usr/lib/golang/src/pkg/net/fd_unix.go:242 +0x34c net.(_conn).Read(0xc2080380f0, 0xc208126000, 0x1000, 0x1000, 0x0, 0x0, 0x0) /usr/lib/golang/src/pkg/net/net.go:122 +0xe7 net/http.noteEOFReader.Read(0x7f84b0d78b68, 0xc2080380f0, 0xc2080a0c08, 0xc208126000, 0x1000, 0x1000, 0xc11de0, 0x0, 0x0) /usr/lib/golang/src/pkg/net/http/transport.go:1203 +0x72 net/http.(_noteEOFReader).Read(0xc208114dc0, 0xc208126000, 0x1000, 0x1000, 0xc2081048c0, 0x0, 0x0)

:124 +0xca bufio.(_Reader).fill(0xc208116960) /usr/lib/golang/src/pkg/bufio/bufio.go:97 +0x1b3 bufio.(_Reader).Peek(0xc208116960, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0) /usr/lib/golang/src/pkg/bufio/bufio.go:132 +0x101 net/http.(_persistConn).readLoop(0xc2080a0bb0) /usr/lib/golang/src/pkg/net/http/transport.go:782 +0x95 created by net/http.(*Transport).dialConn /usr/lib/golang/src/pkg/net/http/transport.go:600 +0x93f goroutine 26 [select, 3 minutes]: net/http.(_persistConn).writeLoop(0xc2080a0bb0) /usr/lib/golang/src/pkg/net/http/transport.go:885 +0x38f created by net/http.(_Transport).dialConn /usr/lib/golang/src/pkg/net/http/transport.go:601 +0x957
matthieugrieger commented 9 years ago

Hi!

Thanks for the bug report. This looks like it might be an issue with parsing YouTube playlist URLs correctly. I will try to fix this as soon as I can.

ghost commented 9 years ago

Okay you're on the right way, it does not happen on playlist with underscore, only - Thx, I'll do further testing with the new version then ;)

Dunno if its the right way to say it here, we now have a !reset command, which is very useful afaik, so It might be nice if we had a !list command too. So anyone is able to look into the queue and sees what comes next?

I much appreciate your work, its a pleasure to test this piece of software! There are lots of bots out there that are able to play music in mumble now - but imho for a multiuser-system YOUR mumbledj is the best solution, because its easy to configure/install.

PS: If my english seems to be bad sometimes - sry for that, it's not my native language..

matthieugrieger commented 9 years ago

Good idea! This was something I was planning on adding.

I'm glad you find the bot easy to use. :)

matthieugrieger commented 9 years ago

@raz0rsdge: I just implemented the !list command you mentioned in your comment in this commit: https://github.com/matthieugrieger/mumbledj/commit/4376fe7394bdcbf555bb086074c9292cfffb7d45 (renamed to !nextsong).