Open nguillaumin opened 7 months ago
I was able to narrow down the issue I think, and it seems to be due to specific tracks streamed by LMS! For example:
Sep 14 15:19:01 htpc squeezelite[32292]: [15:19:01.712922] decode_flush:244 decode flush
Sep 14 15:19:01 htpc squeezelite[32292]: [15:19:01.712947] output_flush:439 flush output buffer (full)
Sep 14 15:19:01 htpc squeezelite[32292]: [15:19:01.792645] codec_open:278 codec open: 'o'
Sep 14 15:19:01 htpc squeezelite[32292]: [15:19:01.792726] connect_socket:237 connecting to 192.168.1.8:9000
Sep 14 15:19:01 htpc squeezelite[32292]: [15:19:01.792997] stream_sock:923 header: GET /stream.mp3?player=04:d4:c4:4f:32:ec HTTP/1.0
Sep 14 15:19:01 htpc squeezelite[32292]:
Sep 14 15:19:01 htpc squeezelite[32292]: [15:19:01.898695] stream_thread:630 headers: len: 491
Sep 14 15:19:01 htpc squeezelite[32292]: HTTP/1.1 200 OK
Sep 14 15:19:01 htpc squeezelite[32292]: Server: Logitech Media Server (8.4.0 - 1704454098)
Sep 14 15:19:01 htpc squeezelite[32292]: Connection: close
Sep 14 15:19:01 htpc squeezelite[32292]: Content-Type: audio/ogg
Sep 14 15:19:01 htpc squeezelite[32292]: Set-Cookie: Squeezebox-albumView=2; path=/
Sep 14 15:19:01 htpc squeezelite[32292]: Set-Cookie: Squeezebox-expandPlayerControl=true; path=/
Sep 14 15:19:01 htpc squeezelite[32292]: Set-Cookie: Squeezebox-expanded-MY_MUSIC=1; path=/
Sep 14 15:19:01 htpc squeezelite[32292]: Set-Cookie: Squeezebox-expanded-FAVORITES=1; path=/
Sep 14 15:19:01 htpc squeezelite[32292]: Set-Cookie: Squeezebox-expanded-PLUGINS=1; path=/
Sep 14 15:19:01 htpc squeezelite[32292]: Set-Cookie: Squeezebox-expanded-PLUGIN_MY_APPS_MODULE_NAME=1; path=/
Sep 14 15:19:01 htpc squeezelite[32292]: Set-Cookie: Squeezebox-expanded-RADIO=1; path=/
Sep 14 15:19:01 htpc squeezelite[32292]:
Sep 14 15:19:01 htpc squeezelite[32292]: [15:19:01.898965] stream_ogg:410 metadata: ALBUM=Voyage, Voyage: Greatest Hits
Track attached: Desireless - Voyage, voyage.zip
Playing this track immediately crashes Squeezelite.
I could narrow it down further to the reading of the Ogg metadata. Around here: https://github.com/ralph-irving/squeezelite/blob/master/stream.c#L399 . Somehow len
at some point gets corrupted.
I realized the file I attached above has completely messed up metadata, but it should not cause a crash ideally.
I did the OggMetadata changes in squeezelite, especially to support chained streams and feedback metadata to LMS as before only real SB could.
I don't have computer access for now but depending what you mean by "messed up metadata" I think that if they have a totally wrong encoding, the yes it might happen that the parser crashes.
It might a debate with polarized opinions, but as somebody coding for free open source, I can't take the time and don't want to bloat code for handling all sort of improbable input-related errors. If it's human inputs, yes, but when it is a file that is supposed to be spit out by an encoder, then the encoder must be fixed.
As a general opinion, I think we destroy standards and code quality when we decide to accept all and any non-compliant protocols and files. UPnP is as very good example of that.
It should be a Darwinian process: your apps is not compatible, it should be selected out...
Thanks for your reply.
In this case the file is still valid and not corrupted, it's just that the metadata is weird, big and very repetitive (due to: https://github.com/beetbox/beets/issues/4528 )
DISCID=F30ECC10
ACOUSTID_FINGERPRINT=
ACOUSTID_ID=
ALBUM=Voyage, Voyage: Greatest Hits
ALBUMARTIST_CREDIT=Desireless
ALBUMARTISTSORT=Desireless
MUSICBRAINZ_ALBUMCOMMENT=
RELEASESTATUS=Official
MUSICBRAINZ_ALBUMSTATUS=Official
RELEASETYPE=[
RELEASETYPE='
RELEASETYPE=[
RELEASETYPE='
RELEASETYPE=,
RELEASETYPE=
[...] about 230'000 lines like this
RELEASETYPE=,
RELEASETYPE=
RELEASETYPE='
RELEASETYPE=]
RELEASETYPE='
RELEASETYPE=]
MUSICBRAINZ_ALBUMTYPE=[
MUSICBRAINZ_ALBUMTYPE='
MUSICBRAINZ_ALBUMTYPE=[
MUSICBRAINZ_ALBUMTYPE='
MUSICBRAINZ_ALBUMTYPE=,
[...] another 230'000 or so lines
MUSICBRAINZ_ALBUMTYPE=
MUSICBRAINZ_ALBUMTYPE='
MUSICBRAINZ_ALBUMTYPE=]
MUSICBRAINZ_ALBUMTYPE='
MUSICBRAINZ_ALBUMTYPE=]
ARRANGER=
ARTIST=Desireless
ARTIST_CREDIT=Desireless
ARTISTSORT=Desireless
ASIN=B0000A0I6Z
BPM=0
Metadata attached: vorbiscomment.txt
So without entering the debate too much :wink: , still a valid file I think (passes oggz-validate
and vorbiscomment
) that ideally shouldn't cause a crash.
So the weird/big/repetitive issue is caused by a beet bug (now apparently fixed)? While I agree that a parsing crash in SL is less than optimal, seems that the right approach would be to address the weird/big/repetitive metadata issue first. Just my opinion, not trying to wade into an argument. BL
The Beet bug is fixed indeed, and I fixed the metadata in my files. So for me, it's good as it is. However I suspect it reveals a weakness in the metadata parser that might be worth looking into...
Hi, I am experiencing crashes on Arch Linux, I think following an update of my system that replaced PulseAudio with PIpewire. Unfortunately I'm not too sure how to troubleshoot this.
For example, everything worked fine for a couple of hours then it crashed suddenly. In the system logs:
Attached dumped core:
core.squeezelite.967.745223802fc8470a98e5e231d7c14080.448.1714310452000000.zst.gz
Then after that it fails to restart:
It looks like it cannot access the audio device somehow? When I try using
aplay
I get a similar error:I'm not sure where to go from there unfortunately...