plietar / librespot

Open Source Spotify client library
MIT License
1.13k stars 187 forks source link

Crash on some songs #247

Open Glenn-1990 opened 6 years ago

Glenn-1990 commented 6 years ago

Librespot crashes on some songs, this is 100% reproducible (pi musicbox and libreelec). The song causing the crash is not working with chromecast either, so probably spotify doesn't allow to play this song externally. It would be nice if we could just skip this song instead of the assertion :-).

Sep 04 21:12:24 LE-glenn sh[2943]: thread 'main' panicked at 'assertion failed: (left == right) (left: 0, right: 16)', util/spotify_id.rs:44 Sep 04 21:12:24 LE-glenn sh[2943]: note: Run with RUST_BACKTRACE=1 for a backtrace. Sep 04 21:12:24 LE-glenn systemd[1]: service.librespot.service: Main process exited, code=exited, status=101/n/a Sep 04 21:12:24 LE-glenn systemd[1]: service.librespot.service: Unit entered failed state. Sep 04 21:12:24 LE-glenn systemd[1]: service.librespot.service: Failed with result 'exit-code'.

michaelherger commented 6 years ago

It would probably be helpful if you could give some track IDs causing this.

Glenn-1990 commented 6 years ago

@michaelherger How can I find these IDs as parsing fails?

michaelherger commented 6 years ago

In the Spotify applications there's a "..." menu item which allows you to copy the item's URI.

Glenn-1990 commented 6 years ago

Something strange is going on here, spotify doesn't have URLs for the crashing songs.

"Delen" = "Share" and allows me to get the URL.

Normal song: screenshot_20170919-192934

Crashing song: screenshot_20170919-192945

cortegedusage commented 6 years ago

It looks like the song in the playlist is refering to a song on an album that doesn't exists anymore on spotify

probably the spotify software searches for an alternative and librespot doesn't.

that's my five cents anyway...

cheers

2017-09-19 19:41 GMT+02:00 Glenn-1990 notifications@github.com:

Something strange is going on here, spotify doesn't have URLs for the crashing songs.

"Delen" = "Share" and allows me to get the URL.

Normal song: [image: screenshot_20170919-192934] https://user-images.githubusercontent.com/2036512/30606419-fa04cd7c-9d71-11e7-9e70-806cfd260d29.png

Crashing song: [image: screenshot_20170919-192945] https://user-images.githubusercontent.com/2036512/30606381-da5f73dc-9d71-11e7-947a-bdd54ca8f9bd.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/plietar/librespot/issues/247#issuecomment-330616389, or mute the thread https://github.com/notifications/unsubscribe-auth/AV69TZgYWAivU2k2Lw8xHNyyedUyRPLeks5sj_zHgaJpZM4PNXp- .

archi commented 6 years ago

I hit the same, seems a lot like what you suggested. Since librespot is not maintained anymore I suppose it's just tough luck :(

kingosticks commented 6 years ago

But it does look like it tries to: https://github.com/plietar/librespot/blob/ddfc28f99f283caa81951c63dd03fa913af1b8de/src/player.rs#L351

kingosticks commented 6 years ago

An example of a failing song would be helpful.

moses-palmer commented 6 years ago

To reproduce, you can create a playlist on Spotify desktop, add a local directory and then add a local song to the playlist. When librespot then tries to play that song, this assertion will fail since it does not correspond to a song available on Spotify.