aome510 / spotify-player

A Spotify player in the terminal with full feature parity
MIT License
3.14k stars 137 forks source link

Crashing on startup on Linux Mint #424

Closed vitorcsantos closed 2 months ago

vitorcsantos commented 3 months ago

Hello, I have been using the application with no problems on my Windows machine, but when I tried running it on Linux just now, it encountered a problem and hangs on a blank terminal after launch. It launched "properly" once, with the message about setting up the Spotify connect properly, but it became unresponsive. I closed it and relaunched, and now it hangs/crashes 100% of the time. Looking into the logs, I found this excerpt on the backtrace (that Github doesn't let me upload so I'll copy and paste what I believe is the relevant part:

Got a panic: PanicInfo { payload: Any { .. }, message: Some( byte index 31 is not a char boundary; it is inside '殻' (bytes 30..33) ofGHOST IN THE SHELL Series -攻殻機動隊シリーズ- • Spotify, ), location: Location { file: "/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.26.2/src/text/line.rs", line: 477, col: 59, }, can_unwind: true, force_no_backtrace: false, }

From what it looks like, the japanese characters in one of my saved playlists caused it to break. Attached below is the log file from that same execution, hopefully it is helpful in finding the solution. spotify-player-24-04-22-09-06.log

aome510 commented 3 months ago

https://github.com/ratatui-org/ratatui/issues/1032

This issue seems to only happen for ratatui 0.26.2, which is recently upgraded. Does it work with spotify_player v0.17.2?

vitorcsantos commented 3 months ago

Yup, trying on v0.17.2 got it working correctly again, no issues in loading or playing that playlist. Now I noticed you updated 0.18 just yesterday, I think my Windows version might also be on 0.17.2 and didn't show that same error. I'm going to try downloading the latest and see if it also breaks there. Edit: yup, Windows version 0.18.0 also hangs on load, going to stick with version 0.17.2 for the time being.

aome510 commented 2 months ago

Should be fixed in v0.18.1

joshka commented 2 months ago

The Ratatui bug for this is https://github.com/ratatui-org/ratatui/issues/1032