r190 Global Layer v Web Font Incompatibility

0 favourites
  • 15 posts
From the Asset Store
Globals 2.0
$3.99 USD
Globals 2.0 stores and group variables. You can also load and save data (variables) from/to JSON files.
  • Problem Description

    When web fonts are placed on global layers a preview compilation can cause the web fonts to be incorrectly rendered and the editor to crash.

    Attach a Capx

    [attachment=0:2zxfj1n8][/attachment:2zxfj1n8]

    Description of Capx

    The capx contains 7 layouts, each with 7 layers. Layers 0 to 3 are set global in Layout 1. Layout 1 contains a very large number of copies of a single text object (the only way I could force the crash to occur consistently), with lots of copies of the text object on each of the global layers.

    Steps to Reproduce Bug

    • Run one of the layouts (not layout 1)
    • Observe the result
    • If the compilation doesn't render incorrectly (with default font showing in the browser) and the editor doesn't crash, try selecting a different layout - this seems to be exacerbated if you switch between these layouts before running (? maybe just me)

    Observed Result

    The web fonts are not rendered correctly and the editor crashes.

    Expected Result

    The web fonts should render correctly, and the editor should not crash.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    W8.1 x64

    Construct 2 Version ID

    r190

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I noticed that the error is reproduced in the release 149 onward,in the down versions i dont have problems, may be the "new" HUD canvas method

  • Whoa...just opening the project made C2 freeze and then turn black. Thought it had crashed, but it finally came back up.

    ...and, after a bit more testing, it finally lagged up/crashed. Took about 3 previews, each slower than the last. C2's interface slowed down and finally froze and corrupted.

    Never seen anything like this.

  • I'm just glad I found a way to reproduce it in a simple capx, TiAm; hopefully Ashley will be able to work his magic and fix it without too much pain.

  • I can still reproduce a problem even without any global layers or web fonts, so I think it's just to do with large numbers of text objects in the editor. I've already improved the opening time and I'm still investigating the hang after a few previews.

  • Aha - think I finally got to the bottom of this. It turns out there was a small memory leak for every 'Text' object in the project every time you previewed. Your example uses nearly 1000 text objects so shows this pretty quickly, but it would in fact affect all projects using Text objects - it would just take longer. So it's a pretty serious bug! Thanks for managing to get it narrowed down to such a simple .capx, it helped a great deal in figuring out what was wrong. This should help everyone using C2 with large projects or using it for very long sessions.

    As it happens the fix also improves the editor performance when opening layouts and previewing, so in particular the example you provided should open and run a lot faster too.

  • Awesome work, Ashley! I'm glad I could help.

  • So , this can resolve mi problem?

    viewtopic.php?f=152&t=120227&p=860716#p860716

  • r191 beta is out, could you confirm the issue in the original project is resolved as well?

  • Looking good so far after a brief test - this has certainly fixed the bug I reported. It's the LD31 this weekend, so I'll give r191 a good work out on Mon/Tue with my other project and see if that is ok too.

  • Hi Ashley, just for your info as this might be a bug with r191... I have been messing around with LD31 using r191 and I have found that my web fonts were not consistently loading / triggering the on-created set web font command. They seem to miss being loaded about 5% of the time and I have no idea why... So, I tried to roll back to r190 to see if the problem lies with r191 rather than some files I might be using and I received the following warning, so I cannot test to see if this is just something else I've made a mistake with or whether it's a problem with the beta editor.

    [attachment=0:328ogkm2][/attachment:328ogkm2]

  • Rolling back to an older version after saving your project is never officially supported. If you are editing the project files directly to allow C2 to open it, then you are risking exactly this kind of issue. Condition 18 in the Browser object is the new 'Supports requesting fullscreen' condition, so presumably you added it in r191, saved, then tried to open in r190 where the condition does not exist. This is nothing to do with this bug report here.

  • OK, thanks ASHLEY. I suspect that the problem was that sometimes the web fonts take a long time to load rather than it being a failure to load them. This version of the editor is far more stable - no crashes or evident slow downs at all.

  • Awesome. Closing as fixed.

  • Nope, i have the same problem

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)