musicbot
musicbot copied to clipboard
Crash on current and tracks|list when playing internet radio
I'm listening to lainchan radio and musicbot crashes when I try to get the current track. Both the current
command and the tracks
/list
commands crash the program. This is the only song in the playlist if it makes a difference. Here is the output of musicbot. I'd give it a whack myself but I've never touched go before. Thanks for the project though. Even if I can only play from spotify it's pretty cool.
panic: runtime error: index out of range
goroutine 22 [running]:
github.com/sosedoff/musicbot/mopidy.Track.String(0x10814b88, 0x5, 0x0, 0x0, 0x1081c960, 0x21, 0x0, 0x0, 0x0, 0x0, ...)
/home/pi/go/src/github.com/sosedoff/musicbot/mopidy/objects.go:43 +0xc4
github.com/sosedoff/musicbot/bot.CurrentTrack(0x10646300, 0x1080c420)
/home/pi/go/src/github.com/sosedoff/musicbot/bot/handlers.go:56 +0xb0
created by github.com/sosedoff/musicbot/bot.(*Bot).handleMessage
/home/pi/go/src/github.com/sosedoff/musicbot/bot/bot.go:96 +0x12c
goroutine 1 [chan receive]:
main.handleSignals()
/home/pi/go/src/github.com/sosedoff/musicbot/main.go:48 +0x100
main.main()
/home/pi/go/src/github.com/sosedoff/musicbot/main.go:60 +0x11c
goroutine 5 [syscall, 1 minutes]:
os/signal.loop()
/usr/lib/go/src/os/signal/signal_unix.go:21 +0x1c
created by os/signal.init·1
/usr/lib/go/src/os/signal/signal_unix.go:27 +0x40
goroutine 17 [syscall, 1 minutes, locked to thread]:
runtime.goexit()
/usr/lib/go/src/runtime/asm_arm.s:1322 +0x4
goroutine 12 [chan receive]:
github.com/sosedoff/musicbot/bot.(*Bot).handleSlackEvents(0x10646300)
/home/pi/go/src/github.com/sosedoff/musicbot/bot/bot.go:62 +0x44
created by github.com/sosedoff/musicbot/bot.(*Bot).Run
/home/pi/go/src/github.com/sosedoff/musicbot/bot/bot.go:125 +0x1c4
goroutine 10 [IO wait]:
net.(*pollDesc).Wait(0x10646578, 0x72, 0x0, 0x0)
/usr/lib/go/src/net/fd_poll_runtime.go:84 +0x3c
net.(*pollDesc).WaitRead(0x10646578, 0x0, 0x0)
/usr/lib/go/src/net/fd_poll_runtime.go:89 +0x38
net.(*netFD).Read(0x10646540, 0x106e0000, 0x2000, 0x2000, 0x0, 0xb6df4a88, 0x106fd258)
/usr/lib/go/src/net/fd_unix.go:242 +0x390
net.(*conn).Read(0x1061c388, 0x106e0000, 0x2000, 0x2000, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/net.go:121 +0xc8
crypto/tls.(*block).readFromUntil(0x1060aa40, 0xb6df5cd8, 0x1061c388, 0x5, 0x0, 0x0)
/usr/lib/go/src/crypto/tls/conn.go:454 +0xe8
crypto/tls.(*Conn).readRecord(0x10642000, 0x17, 0x0, 0x0)
/usr/lib/go/src/crypto/tls/conn.go:539 +0x248
crypto/tls.(*Conn).Read(0x10642000, 0x106de000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/lib/go/src/crypto/tls/conn.go:904 +0x160
net/http.noteEOFReader.Read(0xb6df6310, 0x10642000, 0x1064020c, 0x106de000, 0x1000, 0x1000, 0x275960, 0x0, 0x0)
/usr/lib/go/src/net/http/transport.go:1270 +0x78
net/http.(*noteEOFReader).Read(0x106fcf70, 0x106de000, 0x1000, 0x1000, 0x10612000, 0x0, 0x0)
<autogenerated>:125 +0xec
bufio.(*Reader).fill(0x10710b10)
/usr/lib/go/src/bufio/bufio.go:97 +0x1d8
bufio.(*Reader).Peek(0x10710b10, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/lib/go/src/bufio/bufio.go:132 +0xd4
net/http.(*persistConn).readLoop(0x106401e0)
/usr/lib/go/src/net/http/transport.go:842 +0x88
created by net/http.(*Transport).dialConn
/usr/lib/go/src/net/http/transport.go:645 +0xba0
goroutine 11 [select]:
net/http.(*persistConn).writeLoop(0x106401e0)
/usr/lib/go/src/net/http/transport.go:945 +0x320
created by net/http.(*Transport).dialConn
/usr/lib/go/src/net/http/transport.go:645 +0xbc8
goroutine 13 [chan receive]:
github.com/sosedoff/musicbot/bot.(*Bot).handleMopidyEvents(0x10646300)
/home/pi/go/src/github.com/sosedoff/musicbot/bot/bot.go:73 +0x58
created by github.com/sosedoff/musicbot/bot.(*Bot).Run
/home/pi/go/src/github.com/sosedoff/musicbot/bot/bot.go:126 +0x1ec
goroutine 14 [IO wait]:
net.(*pollDesc).Wait(0x106463f8, 0x72, 0x0, 0x0)
/usr/lib/go/src/net/fd_poll_runtime.go:84 +0x3c
net.(*pollDesc).WaitRead(0x106463f8, 0x0, 0x0)
/usr/lib/go/src/net/fd_poll_runtime.go:89 +0x38
net.(*netFD).Read(0x106463c0, 0x1063e400, 0x400, 0x400, 0x0, 0xb6df4a88, 0x108140d0)
/usr/lib/go/src/net/fd_unix.go:242 +0x390
net.(*conn).Read(0x1061c498, 0x1063e400, 0x400, 0x400, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/net.go:121 +0xc8
bufio.(*Reader).fill(0x10634270)
/usr/lib/go/src/bufio/bufio.go:97 +0x1d8
bufio.(*Reader).Read(0x10634270, 0x10814098, 0x2, 0x8, 0x10612000, 0x0, 0x0)
/usr/lib/go/src/bufio/bufio.go:174 +0x238
github.com/gorilla/websocket.(*Conn).readFull(0x10632480, 0x10814098, 0x2, 0x8, 0x0, 0x0)
/home/pi/go/src/github.com/gorilla/websocket/conn.go:542 +0xcc
github.com/gorilla/websocket.(*Conn).advanceFrame(0x10632480, 0xb6de99c8, 0x0, 0x0)
/home/pi/go/src/github.com/gorilla/websocket/conn.go:566 +0x148
github.com/gorilla/websocket.(*Conn).NextReader(0x10632480, 0x1060aa00, 0x0, 0x0, 0x0, 0x0)
/home/pi/go/src/github.com/gorilla/websocket/conn.go:706 +0x74
github.com/gorilla/websocket.(*Conn).ReadJSON(0x10632480, 0x2938d0, 0x108140c0, 0x0, 0x0)
/home/pi/go/src/github.com/gorilla/websocket/json.go:45 +0x30
github.com/sosedoff/musicbot/mopidy.(*Client).Run(0x1060ab00, 0x10646480)
/home/pi/go/src/github.com/sosedoff/musicbot/mopidy/client.go:136 +0x9c
created by github.com/sosedoff/musicbot/bot.(*Bot).Run
/home/pi/go/src/github.com/sosedoff/musicbot/bot/bot.go:128 +0x220
goroutine 15 [IO wait]:
net.(*pollDesc).Wait(0x10647478, 0x72, 0x0, 0x0)
/usr/lib/go/src/net/fd_poll_runtime.go:84 +0x3c
net.(*pollDesc).WaitRead(0x10647478, 0x0, 0x0)
/usr/lib/go/src/net/fd_poll_runtime.go:89 +0x38
net.(*netFD).Read(0x10647440, 0x107ec000, 0x1000, 0x1000, 0x0, 0xb6df4a88, 0x10814908)
/usr/lib/go/src/net/fd_unix.go:242 +0x390
net.(*conn).Read(0x106fe088, 0x107ec000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/net.go:121 +0xc8
crypto/tls.(*block).readFromUntil(0x107bf2c0, 0xb6df5cd8, 0x106fe088, 0x5, 0x0, 0x0)
/usr/lib/go/src/crypto/tls/conn.go:454 +0xe8
crypto/tls.(*Conn).readRecord(0x10642340, 0x17, 0x0, 0x0)
/usr/lib/go/src/crypto/tls/conn.go:539 +0x248
crypto/tls.(*Conn).Read(0x10642340, 0x10774c00, 0x400, 0x400, 0x0, 0x0, 0x0)
/usr/lib/go/src/crypto/tls/conn.go:904 +0x160
bufio.(*Reader).fill(0x107fca80)
/usr/lib/go/src/bufio/bufio.go:97 +0x1d8
bufio.(*Reader).Read(0x107fca80, 0x10814900, 0x2, 0x8, 0x1b738, 0x0, 0x0)
/usr/lib/go/src/bufio/bufio.go:174 +0x238
github.com/gorilla/websocket.(*Conn).readFull(0x106337a0, 0x10814900, 0x2, 0x8, 0x0, 0x0)
/home/pi/go/src/github.com/gorilla/websocket/conn.go:542 +0xcc
github.com/gorilla/websocket.(*Conn).advanceFrame(0x106337a0, 0x108148f0, 0x0, 0x0)
/home/pi/go/src/github.com/gorilla/websocket/conn.go:566 +0x148
github.com/gorilla/websocket.(*Conn).NextReader(0x106337a0, 0x2938d0, 0x0, 0x0, 0x0, 0x0)
/home/pi/go/src/github.com/gorilla/websocket/conn.go:706 +0x74
github.com/gorilla/websocket.(*Conn).ReadJSON(0x106337a0, 0x2938d0, 0x108148f0, 0x0, 0x0)
/home/pi/go/src/github.com/gorilla/websocket/json.go:45 +0x30
github.com/sosedoff/musicbot/slack.(*Client).Run(0x1060ae80, 0x10647ac0)
/home/pi/go/src/github.com/sosedoff/musicbot/slack/client.go:89 +0x9c
created by github.com/sosedoff/musicbot/bot.(*Bot).Run
/home/pi/go/src/github.com/sosedoff/musicbot/bot/bot.go:129 +0x254
goroutine 20 [IO wait]:
net.(*pollDesc).Wait(0x1080fd38, 0x72, 0x0, 0x0)
/usr/lib/go/src/net/fd_poll_runtime.go:84 +0x3c
net.(*pollDesc).WaitRead(0x1080fd38, 0x0, 0x0)
/usr/lib/go/src/net/fd_poll_runtime.go:89 +0x38
net.(*netFD).Read(0x1080fd00, 0x107ed000, 0x1000, 0x1000, 0x0, 0xb6df4a88, 0x10814af8)
/usr/lib/go/src/net/fd_unix.go:242 +0x390
net.(*conn).Read(0x106ff220, 0x107ed000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/net.go:121 +0xc8
net/http.noteEOFReader.Read(0xb6df5cd8, 0x106ff220, 0x107e9b2c, 0x107ed000, 0x1000, 0x1000, 0x275960, 0x0, 0x0)
/usr/lib/go/src/net/http/transport.go:1270 +0x78
net/http.(*noteEOFReader).Read(0x108155d0, 0x107ed000, 0x1000, 0x1000, 0x10612000, 0x0, 0x0)
<autogenerated>:125 +0xec
bufio.(*Reader).fill(0x1081c690)
/usr/lib/go/src/bufio/bufio.go:97 +0x1d8
bufio.(*Reader).Peek(0x1081c690, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/lib/go/src/bufio/bufio.go:132 +0xd4
net/http.(*persistConn).readLoop(0x107e9b00)
/usr/lib/go/src/net/http/transport.go:842 +0x88
created by net/http.(*Transport).dialConn
/usr/lib/go/src/net/http/transport.go:645 +0xba0
goroutine 21 [select]:
net/http.(*persistConn).writeLoop(0x107e9b00)
/usr/lib/go/src/net/http/transport.go:945 +0x320
created by net/http.(*Transport).dialConn
/usr/lib/go/src/net/http/transport.go:645 +0xbc8
Thanks for the bug report, i will look into it.