display.newText broken in Public build 2017.3068

Hi,

There appears that a bug has been introduced into the latest public release with newText. For some reason trying to display the word BETA, the A gets dropped. If you rearrange the letters it works fine. Resizing the text field also makes no difference. Just paste the below two lines into a new main.lua file and you will see the problem. The first line only display BET and the second line displays ABET. 

The “width” parameter appears the be the culprit. removing that makes it display correctly. 

local beta = display.newText( {text=“BETA”, x=160, y=240, font=native.systemFontBold, fontSize=16, width = 200, align = “right”} )

local abet = display.newText( {text=“ABET”, x=160, y=272, font=native.systemFontBold, fontSize=16, width = 200, align = “right”} )

This became broken sometime after the public release from around sept 2016, which was what i had been using up until today with no problems. Obviously ive been forced to update to the new build due to Apples new XCode version requirements.

Image attached also showing the issue

Regards

Craig

I confirm this is definitely a bug when the string ends in “A” but not an “a”.  What is happening is “A” is being treated the same as “\n”.  I suggest you file a bug report.

As a hack for you for now this works (note the space before the B)

local beta = display.newText( {text=" BETA", x=160, y=240, font=native.systemFontBold, fontSize=16, width = 200, height = 50, align = "right"} )

Bug report has been submitted

Link the bug report to this thread.  Corona can then respond here so other devs will know about this

How do i get to the bug reports to find the link for it? All i got after submitting the bug report was the message “Thank you for your submission. We will do our best to evaluate your case and respond as quickly as possible.”

If you didn’t get a case number then it is still broken.  You will need to send an email and simple test case to suppot at coronalabs.com.

You will need to email the bug report to support AT coronalabs.com.  The Report a bug link isn’t working.

Rob

What version of macOS are you using?
Have you updated it since the last time it worked and now?

Have you gone back to 2992 and verified that the change  was with a Corona update or if it was the OS update.

Are you seeing this in the simulator?

Are you seeing this on a device? What Device/OS version?

Thanks

Rob

@Rob, I can confirm it happens on windows simulator using 3079.  I found a hack that fixes it but…

We still need all the information asked for. Is there a version that it doesn’t happen on?

I’ve had this code in my game for a while to deal with a similar issue - this predates 2992 it originally went in in 2049 I think.

if (system.getInfo("platformName") == "Android" or system.getInfo("platformName") == "Win") then str = " C I T Y " else str = "C I T Y" end local d4 = display.newText({parent = loadingImage, text = str, x = 1000, y = 22, width = 800, font = \_monserratBlack, fontSize = 120, align = "center"})

I can’t reproduce this issue on macOS 10.12.4 in CoronaSDK 3068 in either the macOS Simulator or on device when building for iOS 10.3 so there must be something else in the project besides the display.newText() statements that is making this happen.  Can you post a ZIP of the project you got the screenshot from above?  I’ve attached my working app and a screenshot.

Perry, if I run your project this is what I get and it is clearly broken in windows simulator (using 3079)…

The problem for me was in the Windows simulator, i haven’t tried it on the mac. I upgraded my mac to Sierra (10.12) so i could install the new corona sdk that was now required for any new apple submissions. I also upgraded my corona sdk on windows to match at the same time, and only noticed this problem on windows as i do all my dev in windows and only do final compiles on mac for the iOS build. So by the sounds of it, it may just be a windows simulator issue in the new version.

Can you drop back to the last build you were using on Windows and see if you can narrow down the build where this changed?

Rob

The bug should be fixed in daily build 2017.3101. Please try it and let know if something wrong. Thanks.

2 months to fix? :wink:  But thanks

I confirm this is definitely a bug when the string ends in “A” but not an “a”.  What is happening is “A” is being treated the same as “\n”.  I suggest you file a bug report.

As a hack for you for now this works (note the space before the B)

local beta = display.newText( {text=" BETA", x=160, y=240, font=native.systemFontBold, fontSize=16, width = 200, height = 50, align = "right"} )

Bug report has been submitted

Link the bug report to this thread.  Corona can then respond here so other devs will know about this