Construct-bugs icon indicating copy to clipboard operation
Construct-bugs copied to clipboard

BUG - Spritefont creation before layout switch sometimes prevents other spritefont from appearing visually after creation

Open Kashin-Ginn opened this issue 1 year ago • 1 comments

Problem description

If you create a spritefont just before you do a layout switch, this will prevent other spritefont from appearing visually (meaning if you create another spritefont in the next layout, it will stay blank)

Why am i creating an SF before a layout switch? Because I want to.., and in my game I need that SF creation. Yet in my game, the issue happens every time.

Attach a .c3p

bug_textCreated_endOfLayout_preventNextTextFromAppearing.zip

Steps to reproduce

  1. Open project file (single)
  2. Launch project
  3. Once loaded, spam on SPACE, then on C => SPACE will switch the layout and C will create a spritefont "100 COINS"
  4. If the SF price is created, then it's good, but RELOAD and repeat STEP 3
  5. Repeat and repeat (atleast 10-20 times reload) and observe the result

(Before the layout switch i create a spritefont though)

Observed result

After loading the game, then spamming SPACE to switch layout, then press C to create another spritefont (price) => sometimes, the SF price will be created and be visible showing "100 COINS"... but sometimes it is created but stays blank (and you can do nothing about it)

Expected result

It should display the SF price since it has been created It should NOT be blank

More details

Affected browsers/platforms: Chrome, Edge Pretty sure this will happen on others since this looks like a C3 bug

First affected release: r401, I don't have time to check others but probably this was there already since there were no updates on text recently

System details

View details

PASTE HERE

Kashin-Ginn avatar Aug 11 '24 11:08 Kashin-Ginn

This is the automated version. Check on debug. The spritefont "price" is created but is blank

bug_textCreated_endOfLayout_preventNextTextFromAppearing_Automated.zip

Funny thing is... add a sprite on Layout 2, the spritefont will now be displayed, if it detects a sprite on the layout. Weird

Kashin-Ginn avatar Aug 11 '24 13:08 Kashin-Ginn

I think from looking at the code involved this is a regression from fixing #7897. It should be fixed in the next beta.

AshleyScirra avatar Aug 23 '24 12:08 AshleyScirra