[GH-ISSUE #165] SIGSEGV during alsa-player initialization #105

Closed
opened 2026-02-28 14:25:24 +03:00 by kerem · 1 comment
Owner

Originally created by @tooxo on GitHub (Jan 20, 2025).
Original GitHub issue: https://github.com/devgianlu/go-librespot/issues/165

The alsa player does not work currently, because of a debug print (?) during pcm setup. I don't have the time right now to diagnose the issue further, so I have no idea what the issue may be.

Jan 20 14:31:04 raspberrypi go-librespot-daemon[1195]: panic: runtime error: invalid memory address or nil pointer dereference
Jan 20 14:31:04 raspberrypi go-librespot-daemon[1195]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x8161cc]
Jan 20 14:31:04 raspberrypi go-librespot-daemon[1195]: goroutine 70 [running]:
Jan 20 14:31:04 raspberrypi go-librespot-daemon[1195]: github.com/devgianlu/go-librespot/output.(*alsaOutput).logParams(0x4000514540, 0x2d95f140)
Jan 20 14:31:04 raspberrypi go-librespot-daemon[1195]:         /home/pi/go-librespot/output/driver-alsa.go:238 +0x28c
Jan 20 14:31:04 raspberrypi go-librespot-daemon[1195]: github.com/devgianlu/go-librespot/output.(*alsaOutput).setupPcm(0x4000514540)
Jan 20 14:31:04 raspberrypi go-librespot-daemon[1195]:         /home/pi/go-librespot/output/driver-alsa.go:160 +0x1e4
Jan 20 14:31:04 raspberrypi go-librespot-daemon[1195]: github.com/devgianlu/go-librespot/output.(*alsaOutput).Resume(0x4000032f20?)
Jan 20 14:31:04 raspberrypi go-librespot-daemon[1195]:         /home/pi/go-librespot/output/driver-alsa.go:358 +0xf0
Jan 20 14:31:04 raspberrypi go-librespot-daemon[1195]: github.com/devgianlu/go-librespot/player.(*Player).manageLoop(0x400049dd50)
Jan 20 14:31:04 raspberrypi go-librespot-daemon[1195]:         /home/pi/go-librespot/player/player.go:212 +0x358
Jan 20 14:31:04 raspberrypi go-librespot-daemon[1195]: created by github.com/devgianlu/go-librespot/player.NewPlayer in goroutine 1
Jan 20 14:31:04 raspberrypi go-librespot-daemon[1195]:         /home/pi/go-librespot/player/player.go:162 +0x1a4
Jan 20 14:31:04 raspberrypi systemd[1]: golibrespot.service: Main process exited, code=exited, status=2/INVALIDARGUMENT

https://github.com/devgianlu/go-librespot/blob/master/output/driver-alsa.go#L238

Originally created by @tooxo on GitHub (Jan 20, 2025). Original GitHub issue: https://github.com/devgianlu/go-librespot/issues/165 The alsa player does not work currently, because of a debug print (?) during pcm setup. I don't have the time right now to diagnose the issue further, so I have no idea what the issue may be. ```log Jan 20 14:31:04 raspberrypi go-librespot-daemon[1195]: panic: runtime error: invalid memory address or nil pointer dereference Jan 20 14:31:04 raspberrypi go-librespot-daemon[1195]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x8161cc] Jan 20 14:31:04 raspberrypi go-librespot-daemon[1195]: goroutine 70 [running]: Jan 20 14:31:04 raspberrypi go-librespot-daemon[1195]: github.com/devgianlu/go-librespot/output.(*alsaOutput).logParams(0x4000514540, 0x2d95f140) Jan 20 14:31:04 raspberrypi go-librespot-daemon[1195]: /home/pi/go-librespot/output/driver-alsa.go:238 +0x28c Jan 20 14:31:04 raspberrypi go-librespot-daemon[1195]: github.com/devgianlu/go-librespot/output.(*alsaOutput).setupPcm(0x4000514540) Jan 20 14:31:04 raspberrypi go-librespot-daemon[1195]: /home/pi/go-librespot/output/driver-alsa.go:160 +0x1e4 Jan 20 14:31:04 raspberrypi go-librespot-daemon[1195]: github.com/devgianlu/go-librespot/output.(*alsaOutput).Resume(0x4000032f20?) Jan 20 14:31:04 raspberrypi go-librespot-daemon[1195]: /home/pi/go-librespot/output/driver-alsa.go:358 +0xf0 Jan 20 14:31:04 raspberrypi go-librespot-daemon[1195]: github.com/devgianlu/go-librespot/player.(*Player).manageLoop(0x400049dd50) Jan 20 14:31:04 raspberrypi go-librespot-daemon[1195]: /home/pi/go-librespot/player/player.go:212 +0x358 Jan 20 14:31:04 raspberrypi go-librespot-daemon[1195]: created by github.com/devgianlu/go-librespot/player.NewPlayer in goroutine 1 Jan 20 14:31:04 raspberrypi go-librespot-daemon[1195]: /home/pi/go-librespot/player/player.go:162 +0x1a4 Jan 20 14:31:04 raspberrypi systemd[1]: golibrespot.service: Main process exited, code=exited, status=2/INVALIDARGUMENT ``` https://github.com/devgianlu/go-librespot/blob/master/output/driver-alsa.go#L238
kerem 2026-02-28 14:25:24 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@devgianlu commented on GitHub (Jan 20, 2025):

Thank you for pointing this out

<!-- gh-comment-id:2603099902 --> @devgianlu commented on GitHub (Jan 20, 2025): Thank you for pointing this out
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/go-librespot#105
No description provided.