robbi5 / gomumblesoundboard

A Soundboard for the Mumble voice chat software written in Go.
17 stars 13 forks source link

panic: runtime error: invalid memory address or nil pointer dereference #1

Closed mjljr closed 7 years ago

mjljr commented 9 years ago

Getting the following when attempting to run gomumblesoundboard. The bot connects for a brief second before crashing.

GoMumbleSoundboard loaded (2 files) Connected to xxx.xxx.xxx.xxx:1234 Welcome message: Channel: General Chat panic: runtime error: invalid memory address or nil pointer dereference [signal 0xb code=0x1 addr=0x0 pc=0x496a6c]

goroutine 5 [running]: github.com/layeh/gumble/gumble.(_User).Move(0xc208070300, 0x0) /home/xxxxxxxxx/go/src/github.com/layeh/gumble/gumble/user.go:166 +0x17c main.func·005(0xc20826e760) /home/xxxxxxxxx/gomumblesoundboard/gomumblesoundboard.go:45 +0xaac github.com/layeh/gumble/gumbleutil.Listener.OnConnect(0xc20801a400, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) /home/xxxxxxxxx/go/src/github.com/layeh/gumble/gumbleutil/listener.go:28 +0x37 github.com/layeh/gumble/gumbleutil.(_Listener).OnConnect(0xc20803a370, 0xc20826e760)

:1 +0xaa github.com/layeh/gumble/gumble.eventMultiplexer.OnConnect(0xc208038e10, 0xc208038e40, 0xc20826e760) /home/xxxxxxxxx/go/src/github.com/layeh/gumble/gumble/eventmultiplexer.go:50 +0x57 github.com/layeh/gumble/gumble.handleServerSync(0xc208054000, 0xc208228000, 0x5a5, 0x5a5, 0x0, 0x0) /home/xxxxxxxxx/go/src/github.com/layeh/gumble/gumble/handlers.go:198 +0x23d github.com/layeh/gumble/gumble.(_Client).readRoutine(0xc208054000) /home/xxxxxxxxx/go/src/github.com/layeh/gumble/gumble/client.go:199 +0x613 created by github.com/layeh/gumble/gumble.(_Client).Connect /home/xxxxxxxxx/go/src/github.com/layeh/gumble/gumble/client.go:108 +0x434 goroutine 1 [chan receive]: github.com/layeh/gumble/gumbleutil.Main(0xc208275f28, 0x7f5292178ec8, 0xc20803a370) /home/xxxxxxxxx/go/src/github.com/layeh/gumble/gumbleutil/main.go:66 +0x80d main.main() /home/xxxxxxxxx/gomumblesoundboard/gomumblesoundboard.go:78 +0x258 goroutine 17 [syscall, locked to thread]: runtime.goexit() /usr/lib/go/src/runtime/asm_amd64.s:2232 +0x1 goroutine 6 [select]: github.com/layeh/gumble/gumble.(_Client).pingRoutine(0xc208054000) /home/xxxxxxxxx/go/src/github.com/layeh/gumble/gumble/client.go:158 +0x2dc created by github.com/layeh/gumble/gumble.(_Client).Connect /home/xxxxxxxxx/go/src/github.com/layeh/gumble/gumble/client.go:109 +0x451
mjljr commented 9 years ago

Hmmmmm. This may not be an issue with your addon. I built mumbledj before this and it looks like it's using this build of gumble: https://github.com/layeh/gumble/commit/8b9989d9c4090874546c45ceaa6ff21e95705bc4

Going to see if i can setup a different folder for this build.

mjljr commented 9 years ago

Attempted another build in a clean folder, still no luck:

GoMumbleSoundboard loaded (2 files) Connected to xxx.xxx.xxx.xxx:1234 Welcome message: xxxxxxxxx Channel: General Chat panic: runtime error: invalid memory address or nil pointer dereference [signal 0xb code=0x1 addr=0x0 pc=0x496a6c]

goroutine 5 [running]: github.com/layeh/gumble/gumble.(_User).Move(0xc208072300, 0x0) /home/xxxxxxxxx//go2/src/github.com/layeh/gumble/gumble/user.go:166 +0x17c main.func·005(0xc20826e960) /home/xxxxxxxxx//gomumblesoundboard/gomumblesoundboard.go:45 +0xaac github.com/layeh/gumble/gumbleutil.Listener.OnConnect(0xc20801a400, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) /home/xxxxxxxxx//go2/src/github.com/layeh/gumble/gumbleutil/listener.go:28 +0x37 github.com/layeh/gumble/gumbleutil.(_Listener).OnConnect(0xc20803a370, 0xc20826e960)

:1 +0xaa github.com/layeh/gumble/gumble.eventMultiplexer.OnConnect(0xc208038e10, 0xc208038e40, 0xc20826e960) /home/xxxxxxxxx//go2/src/github.com/layeh/gumble/gumble/eventmultiplexer.go:50 +0x57 github.com/layeh/gumble/gumble.handleServerSync(0xc208044000, 0xc208226000, 0x5a5, 0x5a5, 0x0, 0x0) /home/xxxxxxxxx//go2/src/github.com/layeh/gumble/gumble/handlers.go:198 +0x23d github.com/layeh/gumble/gumble.(_Client).readRoutine(0xc208044000) /home/xxxxxxxxx//go2/src/github.com/layeh/gumble/gumble/client.go:199 +0x613 created by github.com/layeh/gumble/gumble.(_Client).Connect /home/xxxxxxxxx//go2/src/github.com/layeh/gumble/gumble/client.go:108 +0x434 goroutine 1 [chan receive]: github.com/layeh/gumble/gumbleutil.Main(0xc208273f28, 0x7f875adfbec8, 0xc20803a370) /home/xxxxxxxxx//go2/src/github.com/layeh/gumble/gumbleutil/main.go:66 +0x80d main.main() /home/xxxxxxxxx//gomumblesoundboard/gomumblesoundboard.go:78 +0x258 goroutine 17 [syscall, locked to thread]: runtime.goexit() /usr/lib/go/src/runtime/asm_amd64.s:2232 +0x1 goroutine 6 [select]: github.com/layeh/gumble/gumble.(_Client).pingRoutine(0xc208044000) /home/xxxxxxxxx//go2/src/github.com/layeh/gumble/gumble/client.go:158 +0x2dc created by github.com/layeh/gumble/gumble.(_Client).Connect /home/xxxxxxxxx//go2/src/github.com/layeh/gumble/gumble/client.go:109 +0x451
Viomi commented 8 years ago

Same issue.

panic: runtime error: invalid memory address or nil pointer dereference [signal 0xb code=0x1 addr=0x0 pc=0x4b3fa7]

goroutine 18 [running]: panic(0x807ec0, 0xc820012130) /usr/lib/go/src/runtime/panic.go:481 +0x3e6 github.com/layeh/gumble/gumble.(_User).Move(0xc8200c0400, 0x0) /home/viomi/git/gomumblesoundboard/src/github.com/layeh/gumble/gumble/user.go:168 +0x187 main.main.func2(0xc8200bf300) /home/viomi/git/gomumblesoundboard/gomumblesoundboard.go:45 +0xad1 github.com/layeh/gumble/gumbleutil.Listener.OnConnect(0xc8200be740, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) /home/viomi/git/gomumblesoundboard/src/github.com/layeh/gumble/gumbleutil/listener.go:28 +0x30 github.com/layeh/gumble/gumbleutil.(_Listener).OnConnect(0xc82007c410, 0xc8200bf300)

:1 +0xa0 github.com/layeh/gumble/gumble.eventMultiplexer.OnConnect(0xc8200112c0, 0xc8200112f0, 0xc8200bf300) /home/viomi/git/gomumblesoundboard/src/github.com/layeh/gumble/gumble/eventmultiplexer.go:50 +0x50 github.com/layeh/gumble/gumble.handleServerSync(0xc820084d80, 0xc82012c400, 0x62, 0x400, 0x0, 0x0) /home/viomi/git/gomumblesoundboard/src/github.com/layeh/gumble/gumble/handlers.go:198 +0x245 github.com/layeh/gumble/gumble.(_Client).readRoutine(0xc820084d80) /home/viomi/git/gomumblesoundboard/src/github.com/layeh/gumble/gumble/client.go:199 +0x6a6 created by github.com/layeh/gumble/gumble.(_Client).Connect /home/viomi/git/gomumblesoundboard/src/github.com/layeh/gumble/gumble/client.go:108 +0x448
robbi5 commented 8 years ago

Sorry for the long wait. I've pushed an update to use go1.6s vendor/ folder support and tested it with OS X 10.11.5 and Ubuntu 14.04 LTS.

Can you try it again with the new version and add details about your used OS and mumble server version if it doesn't work? Thanks :)

robbi5 commented 7 years ago

It seems that the errors appeared when it couldn't find the given channel name. I've just pushed an update that errors nicely if that happens - and supports paths for sub channels.

Thanks for the bugreport 👍