Deferred transport resume threads ignore pause intent and stack across rapid skips
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- rust
- Ambito
- audio-video-rtc, cli
Direzione di ricerca
Start in src/core/app/transport.rs and trace previous_track, force_previous_track, next_track, pause_native_playback, and the native playback generation and pause-intent state. Reproduce the skip-then-pause case, then check how rapid skips affect delayed commands; the force path needs guards before both delayed prev() and play(). Done means deferred commands run only when their skip remains current and pause intent has not changed, verified with the full cargo run build and a manual smoke test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
The three native skip paths (previous_track, force_previous_track, next_track in src/core/app/transport.rs) spawn a detached thread that sleeps 300-500 ms and then issues activate()/play() (plus prev() in the force path) against the streaming player, to work around librespot occasionally landing paused after a skip. No thread checks native_is_playing, pause intent, or a generation value before firing, so:
- Skip, then pause within the delay window:
pause_native_playbackrecords paused intent and pauses the player, and the thread then resumes playback anyway. - Rapid repeated skips stack multiple pending
play()/prev()commands against a track that has already changed.
Surfaced by CodeRabbit on PR #446 (thread: https://github.com/LargeModGames/spotatui/pull/446#discussion_r3770140111). Deferred there because PR #446 is pure code movement and this touches the most regression-prone area of the codebase.
To Reproduce
- Play natively (spotatui as the Connect device)
- Press next-track, then pause within ~300 ms
- Playback resumes on its own when the deferred thread fires
Expected behavior
A deferred resume only lands if the skip it belongs to is still the current intent. Capture native_playback_generation (or introduce a dedicated counter) plus the pause intent before spawning, and have the thread re-check both before issuing commands. The force path needs the guard on both the delayed prev() and the delayed play().
Constraint from CLAUDE.md: native playback changes must be verified with the full cargo run build and a manual smoke test, not only the slim gate.
Desktop (please complete the following information):
- OS: any
- Terminal: any
- Version: main (post PR #446)
- Lingua principale
- Rust
- Stelle
- 1.4k
- Fork
- 238
- Merge medio
- 10h 34m
- PR unite (30g)
- 194
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di LargeModGames/spotatui
-
libportaudio not installed via curlForse già presa @LargeModGames l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
LargeModGames/spotatui#890 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
LargeModGames/spotatui#872 · 16 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
LargeModGames/spotatui#829 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Text Emphasis off still bolds the selected row in every list and tableForse già presa @jaopdc11 l’ha presa 6 giorni fa. Apertabug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
LargeModGames/spotatui#822 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
AI DJ prompt: the caret stays at the end of the text when moving the cursor back to editForse già presa @JosephAnderson234 l’ha presa 1 giorno fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
LargeModGames/spotatui#945 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di LargeModGames/spotatui
Issue simili
-
build.yml: macOS arm64 DMG fails, cargo missing on the macos-26 runner imageForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
getopenscreen/openscreen#1423 ·
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue python
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
bug: remove the "not stable yet" warning from DataReplacement commitsForse già presa @lance-gatefixer l’ha presa oggi. Apertabug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
lance-format/lance#10433 ·
I maintainer di solito rispondono entro 3 giorni
-
vorbis: Inverse coupling runs in wrong orderForse già presa @computerfan l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100