View Issue Details

IDProjectCategoryView StatusLast Update
0028643RunnerHTML5Public2018-04-04 11:01
ReporterStewart BishopAssigned ToMike Dailly 
PriorityHighSeverityA - Crash/HangReproducibility100%
Status ClosedResolutionFixed 
Product Version 
Target Version2.1.4Fixed in Version2.1.4 
Summary0028643: HTML5: Runner crashes if you use draw_text_ext with string_width
DescriptionWithin the attached project the user is trying to create a typewriter effect using draw_text_ext and string_width. On Windows this will work as intended without crashing, within HTML5 when it reaches the first point where it should linebreak.
Steps To Reproduce1) Run the project on HTML5
Tags214
1.4 Found In1.4.1773
2.x Runtime Found In2.1.3.189
2.x Runtime Verified In2.1.4.200

Activities

Stewart Bishop

2018-01-08 14:40

Adminstrator  

Text_Issue_HTML5.gmz (339,340 bytes)

Mike Dailly

2018-01-22 09:22

Manager   ~0057417

Not actually a bug. GameMakerStudio 2 now uses "\n" as a newline rather than "#". However "\n" is character 10, not character 13. So this line...

Current_String += chr(13);

is wrong, and it should be...

Current_String += chr(10);

or...

Current_String += "\n";


Native versions have some 1.x code still in there, and does line splitting itself, so you "get away" with it in several places, this being one of them. Javascript however uses "lines = str.split('\n');" to split up text, and so this just doesn't work.
I'm loathed to change this into a manual loop as it would have a performance impact on all string rendering, so to fix the bug the user needs to change his code to use the correct newline character.

Mike Dailly

2018-01-22 10:36

Manager   ~0057421

After discussion... will try and make it more like Native so it's more compatible - even though Native is technically wrong.

Mike Dailly

2018-01-22 11:42

Manager   ~0057422

Now in line with NATIVE. But it should be noted that \n=0x0A, not 0x0d.

Sam Cumming

2018-04-04 11:01

Developer   ~0058583

Verified > rt 2.1.4.200 - Closing.