mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[GH-ISSUE #250] Panic from fetch.rs for a certain track and file format #169
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#169
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 @ashthespy on GitHub (Sep 18, 2018).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/250
The following track
spotify:track:4NYe98w8kYWN2BMhiUIuzqwith 320 bitrate (FileFormat::OGG_VORBIS_320--FileId("4310bb8d969082b6c2f64fb59de5d1871086a536")), leads to a panic fromfetch.rs.There seems to be some issue with the
assert!(new_index < self.shared.chunk_count);check for this particular track.FWIW - changing the
<to<=avoids this panic - but I haven't looked into detail behind the reasoning for the assertion - Any ideas?Added a few debug print statements, namely:
@ashthespy commented on GitHub (Sep 21, 2018):
On further investigation, this happens because
Seekis attempting to get a block past theEOF.This seems to occur specifically for this track and format because it's size (9699328) is an integer multiple of
CHUNK_SIZE.I added a check to ensure this doesn't happen - but am unsure if that is the right place to do it.