View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0030132||Runner||General||Public||2018-10-24 11:55||2019-05-10 13:15|
|Reporter||Dan||Assigned To||David Clarke|
|Priority||Medium||Severity||A - Crash/Hang||Reproducibility||100%|
|Platform||-||OS||Windows 10||OS Version||Pro x64|
|Target Version||Fixed in Version|
|Summary||0030132: General: Emojis in strings cause runner crash when string is modified and then used again|
|Description||When a string contains (and most notably, ends with) a 4 byte character such as most unicode emojis (for example: �) and is modified by string_delete or seemingly any other string function that returns a modified string, the 4 byte character is deformed in an unknown way and partly replaced with other memory contents. This can occasionally cause a silent runner crash with no freeze or error depending on the contents of the memory.|
If the string is drawn in game, or read in the debugger the effect is very clear.
Generates this result:
|Steps To Reproduce||1. Run the attached sample.|
2. Observe game crashes after a couple of seconds.
Repro: 100% - IDE v22.214.171.1243 Runtime v126.96.36.1996
|Tags||No tags attached.|
|1.4 Found In|
|2.x Runtime Found In||188.8.131.521|
|2.x Runtime Verified In||184.108.40.2066|
EmojiCrash.png (66,716 bytes)
EmojiCrash.png (66,716 bytes)bugtest.yyz (16,896 bytes)
Actually a really big change. yywchar type inside the runner has to change from a ushort to a uint. This is a massive change, a massive number of functions are affected.
Functions like F_YoYo_SHA1Unicode() would need to detect larger characters and encode the SHA1 differently based on the string passed in, as 4 byte UTF-8's are now 21bits, not 16.
So deferring for now, until we have more time to test.
||Another issue with this is when emojis are typed in virtual keyboards - there's accordingly no way to test if an emoji has been typed. Added a sample from a ticket.|
GmEmojiTest.yyz (74,226 bytes)
Booted project with current runner in Red, ran the project and observed no crashing occurred with characters of any width. The windows 10 emoji picker even worked as an input method, allowing me to test those.
Resolved in Gitlab.