mirror of
https://github.com/jpochyla/psst.git
synced 2026-04-27 15:35:56 +03:00
[GH-ISSUE #420] Queue.fill() crash when switching playlists #270
Labels
No labels
api
bug
build
documentation
duplicate
enhancement
good first issue
help wanted
idea
invalid
linux
lowprio
macos
pull-request
upstream
windows
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/psst#270
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 @wjp on GitHub (May 18, 2023).
Original GitHub issue: https://github.com/jpochyla/psst/issues/420
Describe the bug
When switching from a short playlist to a long playlist by starting a track at the end of the long playlist, Queue.fill/compute_positions crashes:
To Reproduce
Start playing a relatively short playlist, then start the last track of a longer playlist.
Expected behavior
The new track starts playing.
Screenshots
N/A
Environment
f94af14aa9Additional context
I think adding a line
self.positions.clear()at the start of Queue.fill() (psst-core/src/player/queue.rs) should fix the issue. The problem seems to be that it sets self.position while compute_positions() is still assuming self.position points into the now-outdated self.positions vector.@cameronraw commented on GitHub (May 19, 2023):
I managed to recreate the bug following your instructions, and since making your suggested change haven't been able to reproduce it at all. If I can get assigned to the issue, I have a branch with the change.
This is my first contribution to OS so I'm presuming (as I've forked the repo already) I can simply push the branch to my own fork and then create a pull request, assuming I've been assigned the issue?
Many thanks
EDIT: having seen it doesn't appear to be necessary to be assigned to an issue, I've raised a PR anyway. I hope that's fine.
EDIT: ... just saw the contribution guidelines and replaced the previous PR with a new one. Sorry for the confusion.