Opened 2 years ago
Last modified 2 years ago
#6451 closed defect
Em-dash sprinf combination crash — at Initial Version
Reported by: | bb | Owned by: | |
---|---|---|---|
Priority: | Release Blocker | Milestone: | Alpha 26 |
Component: | Core engine | Keywords: | |
Cc: | Patch: |
Description
Currently when I select the en_GB language and open the replay menu, the game will hang, eat up all RAM and crash. This behaviour is confirmed by marder while not reproducible by Freagrach.
Trisecting the issue lead to the following string "%(min)s - %(max)s min"
in the durationFilters of the replayMenu. In en_GB this is translated as "%(min)s–%(max)s min"
. Notice the em_dash directly between two sprintf variables, both of which will be replaced by a number.
So after doing the sprintf, we will end up with a translated string like "30\u201345 min"
. Here \u2013
is the unicode for the em-dash and 30 and 45 are the numbers plugged into the string.
Our poor textRenderer fails miserably at interpreting 30\u201345
. Yielding the behaviour as described.
This issue can easily be fixed by changing the translation and adding some spaces around the em-dash, but that is nowhere near a permanent solution.
Seeing that Freagarach doesn't have this issue, this potentially is a platform depended bug. This might as well be a bug in a third party dependency.