mirror of
https://github.com/devgianlu/go-librespot.git
synced 2026-04-26 05:15:49 +03:00
[GH-ISSUE #79] nil pointer dereference in cmd/daemon/controls.go:42 #58
Labels
No labels
bug
enhancement
pull-request
spotify-side
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/go-librespot#58
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ius on GitHub (Sep 4, 2024).
Original GitHub issue: https://github.com/devgianlu/go-librespot/issues/79
Not entirely sure how I triggered it, but there's a nil pointer dereference path in:
github.com/devgianlu/go-librespot@b98dad6c89/cmd/daemon/controls.go (L40-L42)I suppose
p.secondaryStream.Mediais nil here?@devgianlu commented on GitHub (Sep 5, 2024):
Mediais only written upon initialization of the object and is surely non-nil at that time. I thinksecondaryStreambecame nil becauseprefetchNextruns in a goroutine and shouldn't access that stuff directly as the goroutine that handles command may be changing stuff (for example inloadCurrentTrack).It is not trivial to fix, but hopefully shouldn't happen very often.