eclispe / rydeplayer

Ryde Player provides a on screen interface and video player for Longmynd compatible tuners.
GNU General Public License v3.0
4 stars 6 forks source link

Crash when received Service Info contains high Unicode characters #66

Closed davecrump closed 1 year ago

davecrump commented 1 year ago

Python crashed out to the command line while receiving a station with the following service info:

state:{'state': 4, 'provider': 'IU4GAV', 'service': '\x15🍺Andrea🍺', 'modcode': 8, 'pids': {256: 36, 257: 15}}

The significant error message was:

UnicodeError: A Unicode character above '\uFFFF' was found; not supported

Sorry I did not catch the whole trace from the crash.

Dave

dl9sec commented 1 year ago

Hi Dave,

that sounds for me as the same issue I described at the Ryde forum (https://forum.batc.org.uk/viewtopic.php?f=130&t=7986&sid=f02f38d4f7603588129dd40836f4c319&start=10#p32181).

Where did you catch the error message, which log or output?

73, Thorsten

davecrump commented 1 year ago

Hi Thorsten

I think that there are 2 issues here - this was definitely a problem with with the Service info containing unsupported unicode characters (emojis). I captured the error message by running the Ryde in "Ryde Test" mode from the Utils menu on the SSH console menu. Dave

eclispe commented 1 year ago

This is a limitation of PyGame that is used for all the onscreen graphics, the version we are using only supports UCS-2 chars which are up to FFFF, (see https://www.pygame.org/docs/ref/font.html). PyGame versions newer than 2.0.3 don't have this issue, Debian isn't including a new enough version until the next release but Pi OS may include a newer version, does anybody have a pi running the newest Pi OS to check which version it comes with?

davecrump commented 1 year ago

I've just checked on a fully-updated RPi Bullseye release and sadly it's still Version: 1.9.4.post1 Is there a way to pull in a newer version?

eclispe commented 1 year ago

Theoretically we could pin it in from Bookworm but from doing that sort of thing for other packages in the past it can be a bit of a dependency nightmare. It is probably better if I look at some workaround options first.

dl9sec commented 1 year ago

I am currently running Ryde on Buster (lite), there is no PyGame installed...

davecrump commented 1 year ago

Hi Thorsten PyGame is installed and used by Ryde on Buster Lite. Try running "pip3 show pygame" and you will find it there. Dave