op / go-libspotify

Language bindings for libspotify in Go (Golang)
Apache License 2.0
64 stars 13 forks source link

Can't get gospshell to work #15

Open muesli opened 9 years ago

muesli commented 9 years ago

Crashes when trying it out:

libspotify 12.1.51.g86c92b43 Release Linux-x86_64 fatal error: unexpected signal during runtime execution [signal 0xb code=0x1 addr=0x230 pc=0x7f7fc737f3b9]

runtime stack: runtime.gothrow(0x5cb550, 0x2a) /usr/lib/go/src/runtime/panic.go:503 +0x8e runtime.sigpanic() /usr/lib/go/src/runtime/sigpanic_unix.go:14 +0x5e

goroutine 6 [syscall, locked to thread]: runtime.cgocall_errno(0x409e70, 0xc208019750, 0x0) /usr/lib/go/src/runtime/cgocall.go:130 +0xf5 fp=0xc208019730 sp=0xc208019708 github.com/op/go-libspotify/spotify._Cfunc_sp_session_create(0xc208082000, 0xc208082078, 0x0) /home/muesli/Sources/go/src/github.com/op/go-libspotify/spotify/:803 +0x43 fp=0xc208019750 sp=0xc208019730 github.com/op/go-libspotify/spotify.func·001() /home/muesli/Sources/go/src/github.com/op/go-libspotify/spotify/libspotify.go:238 +0x6f fp=0xc2080197e0 sp=0xc208019750 runtime.goexit() /usr/lib/go/src/runtime/asm_amd64.s:2232 +0x1 fp=0xc2080197e8 sp=0xc2080197e0 created by github.com/op/go-libspotify/spotify.NewSession /home/muesli/Sources/go/src/github.com/op/go-libspotify/spotify/libspotify.go:244 +0x819

goroutine 1 [chan receive]: github.com/op/go-libspotify/spotify.NewSession(0xc208010930, 0x7ffc949e57d5, 0x0, 0x0) /home/muesli/Sources/go/src/github.com/op/go-libspotify/spotify/libspotify.go:246 +0x860 main.main() /home/muesli/Sources/go/src/go-libspotify/examples/gospshell/gospshell.go:71 +0x310

goroutine 5 [syscall]: os/signal.loop() /usr/lib/go/src/os/signal/signal_unix.go:21 +0x1f created by os/signal.init·1 /usr/lib/go/src/os/signal/signal_unix.go:27 +0x35

goroutine 17 [syscall, locked to thread]: runtime.goexit() /usr/lib/go/src/runtime/asm_amd64.s:2232 +0x1

op commented 9 years ago

Weird, I'm running the same version of libspotify on Linux and same architecture. Long short but do you have premium? Would be awesome if there would be a way to reproduce this.

Will try to look into it when I get some time. Can't promise that will be anytime soon though.

muesli commented 9 years ago

Yeah, it's a premium account. Just wondering if I wrote the appkey correctly. Which format is it expected in?

op commented 9 years ago

They're in binary. You can get your keys from here: https://devaccount.spotify.com/my-account/keys/

muesli commented 8 years ago

Ok, Go 1.6 might shed some more light on this actually. It's apparently always been a bit unsafe:

panic: runtime error: cgo argument has Go pointer to Go pointer

goroutine 21 [running, locked to thread]: panic(0x597220, 0xc820070600) /usr/lib/go/src/runtime/panic.go:464 +0x3e6 github.com/op/go-libspotify/spotify.NewSession.func1(0xc8200aa000, 0xc82006e960) /home/muesli/Sources/go/src/github.com/op/go-libspotify/spotify/libspotify.go:238 +0x192 created by github.com/op/go-libspotify/spotify.NewSession /home/muesli/Sources/go/src/github.com/op/go-libspotify/spotify/libspotify.go:244 +0x6e4