Closed pranza closed 3 years ago
This is due to a bug in the escaping function. Can you identify it as being triggered by a particular file? (for instance with malformed utf-8 tags ?...)
hi Samuel! hmm, the only difference the failing radio compared to the working ones has is the use of m3u playlists they seem to be utf8 and go like this:
F:\speedgarage\Equal People - (1996) We All The Same - Jam\1.02. equal people - we all the same (the dub).flac
regards, p
-----Original Message----- From: Samuel Mimram Date: 2021 m. spalio 8 d. 14:33 To: savonet/liquidsoap Cc: pranza ; Author Subject: Re: [savonet/liquidsoap] unclear error with v2.0.0 win64 (#2010)
This is due to a bug in the escaping function. Can you identify it as being triggered by a particular file? (for instance with malformed utf-8 tags ?...)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
Thanks for this report! It looks like you are using string.escape
somewhere in your code with a string that is not encoded in utf8. I have added a more legible runtime error message now when this happens:
Error while escaping utf8 string. If you are not sure about the string's encoding, you should use
"ascii"
as this encoding never fails.
This will be out with v2.0.1
for which you should be able to find a windows build here: https://github.com/savonet/liquidsoap/actions/runs/1334829064
Also, did you mean to use string.quote
instead of string.escape
? string.escape
is the high-level function, which can be use to implement many usual escaping. In particular it does not return a string surrounded by quote such as "quoted string"
.
string.quote
is "simply" a quoting function, adding quotes around the string, and does not fail if the string is not utf8 but simply falls back to ascii
escaping.
hi Romain and thanks for looking into this! i don't have the word "string" anywhere in my config, and refrernces to utf are only in radio outputs, but if i delete them it doesn't help:
out4 = output.icecast(format="application/ogg", %ffmpeg(format="ogg", %audio(codec="libvorbis", b = "192k")), host = "localhost", port = 8000, password = "", mount = "ogg", name = "radio.audiomastering.lt", description = "savonet", genre = "3", url = "http://radio.audiomastering.lt", fallible = true, encoding = "UTF-8", radio )
i can see "liquidsoap-v2.0.1-win64 41.9 MB" under "artifacts" in that link, but they are not clickable...
cheers, p
Error while escaping utf8 string. If you are not sure about the string's encoding, you should use "ascii" as this encoding never fails. This will be out with v2.0.1 for which you should be able to find a windows build here: https://github.com/savonet/liquidsoap/actions/runs/1334829064
Also, did you mean to use string.quote instead of string.escape? string.escape is the high-level function, which can be use to implement many usual escaping while string.quote is "simply" a escaping function and string.quote does not fail if the string is not utf8 but simply falls back to ascii escaping.
Björk vas the culprit.
the 2.0.1 liquidsoap build Romain has made for me - I've managed to download
it - must have been logged in to github to access that build - presented me
with an error message that made much more sense now:
line 19 char 115, at muilas.liq, line 19, char 114:
Error 14: Uncaught runtime error:
type: string,
message: "Error while escaping utf8 string. If you are not sure about the
string's encoding, you should use \"ascii\"
as this encoding never fails."
somehow the playlist m3u file (which was referenced on that line in my script) was considered an utf8, but the "ö" was "ö" only if it was treated as ascii. in utf8 mode which the file actually was, even the emeditor would complain that it contains a messed up symbol and even showed where it was. I've exchanged that messed up symbol with brand new "ö" encoded in utf, re-saved the playlist and liquidsoap wouldn't halt anymore. cool!
running 2.0.1 now. so far everything seems to be cool. the radio which has harbors exposed to wylde internet (accepts from 0.0.0.0) is bloating ram as usual - lame bots are trying to connect to it. maybe you could set up some testing ground for the harbors? i think even the legit connections induce memory leaks, it's the weak spot there... just run the LS and keep on connecting, be it harbor or even telnet. RAM usage should start ticking up... it's an old issue now but as time went i noticed it's not trigered if the LS protected from incoming connections... so it's the harbor and telnet thing 1000%
regards, Pranas
-----Original Message----- From: Romain Beauxis Date: 2021 m. spalio 12 d. 23:56 To: savonet/liquidsoap Cc: pranza ; Author Subject: Re: [savonet/liquidsoap] unclear error with v2.0.0 win64 (#2010)
Closed #2010.
who can tell what's happening? two out of three radios work, and one doesn't want to start. it was all good with beta3, and with later versions became like this: