mirror of
https://github.com/aome510/spotify-player.git
synced 2026-04-26 09:25:49 +03:00
[GH-ISSUE #273] Random hangs on Raspberry Pi #1077
Labels
No labels
bug
documentation
enhancement
good first issue
help wanted
pull-request
question
third-party
third-party
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-player#1077
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 @whiskyplausible on GitHub (Oct 21, 2023).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/273
Describe the bug
The app will randomly hang and become completely unresponsive within about 10 seconds of starting. This doesn't always happen - it will either load and run fine indefinitely, or crash within a short time. It continues to consume similar CPU resources to when it was running before the crash. I have some sense that it might be something to do with the console interaction, specifically the fact I'm running it on a relatively small console window.
To Reproduce
So far I haven't been able to reproduce this behaviour on app running on x64 Ubuntu, but continues to happen even after clearing cache and recompiling on the Raspberry Pi. It happens randomly when a song is playing, and doesn't seem to be triggered by any specific action.
Log and backtrace
Backtrace:
Environment
cargo install spotify_player@whiskyplausible commented on GitHub (Oct 21, 2023):
I've managed to fix the crash by adding a clamp to the ratio in render_playback_progress_bar, e.g.:
However, the source of the problem is that negative numbers are coming in from progress.num_seconds() (and possibly track.duration.num_seconds()), not sure why.
@aome510 commented on GitHub (Oct 21, 2023):
Hmm, interesting, can you make a PR for the change if it fixes your problem?
@whiskyplausible commented on GitHub (Oct 22, 2023):
I've created pull request.