r190 Global Layer v Web Font Incompatibility

Bugs will be moved here once resolved.

Post » Thu Dec 04, 2014 12:31 pm

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
webfont v global layer.capx


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
You do not have the required permissions to view the files attached to this post.
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,188

Post » Thu Dec 04, 2014 5:28 pm

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
B
23
S
5
G
2
Posts: 30
Reputation: 1,618

Post » Thu Dec 04, 2014 7:03 pm

Whoa...just opening the project made C2 freeze and then turn black. :shock: 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. :?
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,187

Post » Thu Dec 04, 2014 7:33 pm

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 only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,188

Post » Fri Dec 05, 2014 2:48 pm

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.
Scirra Founder
B
387
S
230
G
87
Posts: 24,248
Reputation: 192,238

Post » Fri Dec 05, 2014 3:17 pm

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.
Scirra Founder
B
387
S
230
G
87
Posts: 24,248
Reputation: 192,238

Post » Fri Dec 05, 2014 3:48 pm

Awesome work, @Ashley! I'm glad I could help.
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,188

Post » Fri Dec 05, 2014 4:01 pm

So , this can resolve mi problem?

viewtopic.php?f=152&t=120227&p=860716#p860716
B
23
S
5
G
2
Posts: 30
Reputation: 1,618

Post » Fri Dec 05, 2014 5:48 pm

r191 beta is out, could you confirm the issue in the original project is resolved as well?
Scirra Founder
B
387
S
230
G
87
Posts: 24,248
Reputation: 192,238

Post » Sat Dec 06, 2014 11:27 am

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.
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,188

Next

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests