New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 736861 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 1
Type: Bug



Sign in to add a comment

Overly long load times while rendering sprites in Construct 3 editor (directed here by Scirra)

Reported by acejes...@gmail.com, Jun 26 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.109 Safari/537.36

Steps to reproduce the problem:
(This requires a .CAPX)
1. Go to https://editor.construct.net/
2. Click Open (on page) >  Open from file
3. Open CAPX
4. Open layout with multiple images

What is the expected behavior?
For the file to load, and images to render in a timely manner, without memory issues or crashes.

What went wrong?
In Chrome (59), it's very slow while loading a project from file, very slow to render sprites, and runs out of memory during layout preview. It's the same story with Chrome Canary (both regular and incognito), except that Canary does not run out of memory when doing a layout preview, it just takes 5+ minutes.

In Chrome (v. 59) Incognito, Project loads perfectly, sprites render fast, but runs out of memory during layout preview.

It's so odd that incognito in v59 works (aside from the memory issue), but in Canary incognito it goes back to being slow again.

Attached is a log I was able to make while a layout was taking a a long time rendering the sprites. this was done in Chrome Canary (for context this same action is done at about 2:30 of the video linked below).

As I may be doing poorly explaining what I am seeing, I created a short video showing how I experience the problem. https://www.youtube.com/watch?v=Mb2y--3NfC0

Did this work before? N/A 

Chrome version: 61.0.3141.3  Channel: n/a
OS Version: 10.0
Flash Version: 

I was directed here by Ashley from Scirra, and largely copied my problem from that thread to this one.

https://github.com/Scirra/Construct-3-bugs/issues/552
 
Canary_Loading_Layout.zip
6.9 MB Download
Cc: hpayer@chromium.org
Components: Blink>JavaScript>GC
Per the GitHub thread this looks like it might be a GC issue... Hannes can you take a look?
Cc: u...@chromium.org mlippautz@chromium.org
Adding more GC folks since hannes has temporarily joined parental leave corp
Cc: -u...@chromium.org
Owner: u...@chromium.org
Assigning to memory sheriff: https://rotation.googleplex.com/index.html#rotation?id=4838401396178944

Comment 4 by jochen@chromium.org, Jun 27 2017

Status: Assigned (was: Unconfirmed)

Comment 5 by u...@chromium.org, Jun 27 2017

acejester@, thank you for the detailed bug report. I'll try to reproduce locally.
Is there a public .CAPX file that I can use and that reproduces the issue for you?

Comment 6 by a...@scirra.com, Jun 27 2017

The original GitHub report used this file: https://github.com/Scirra/Construct-3-bugs/files/1097957/Bitmen.zip

Comment 7 by u...@chromium.org, Jun 27 2017

Status: Started (was: Assigned)
Thank you, ash@

Comment 8 by u...@chromium.org, Jun 27 2017

The fix is in flight: https://chromium-review.googlesource.com/c/550215/

Comment 9 by u...@chromium.org, Jun 27 2017

Labels: -Pri-2 M-60 Pri-1
We will need to back-merge the fix in #8 to M60.

I am also going to add sanity-check for the parameter of AdjustAmountOfExternalMemory API on V8 side.
Project Member

Comment 10 by bugdroid1@chromium.org, Jun 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/453c124756ed4016b892acabd37828bbfedf892c

commit 453c124756ed4016b892acabd37828bbfedf892c
Author: Ulan Degenbaev <ulan@chromium.org>
Date: Wed Jun 28 09:57:32 2017

Fix unsigned int underflow bug in FileReader.

The underflow happens when reporting amount of external memory to V8:
AdjustReportedMemoryUsageToV8(-1 * raw_data_->ByteLength());

since ByteLength is unsigned, the -1 is cast to unsigned, which results
in V8 getting reports of ~4GB allocations. This confuses V8 GC and leads
to GC trashing.

BUG= chromium:736861 , chromium:114548 

Change-Id: Iba51aecf37ca9f8f009f369e952ea1ae509fe4cc
Reviewed-on: https://chromium-review.googlesource.com/550215
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#482928}
[modify] https://crrev.com/453c124756ed4016b892acabd37828bbfedf892c/third_party/WebKit/Source/core/fileapi/FileReaderLoader.cpp

Comment 11 by u...@chromium.org, Jun 28 2017

Labels: Merge-Request-60
Requesting merge to M60 since the bug is severe and makes Chrome unusable.
Project Member

Comment 12 by sheriffbot@chromium.org, Jun 29 2017

Labels: -Merge-Request-60 Hotlist-Merge-Review Merge-Review-60
This bug requires manual review: M60 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), josafat@(ChromeOS), bustamante@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Have we confirmed the fix in canary or dev? Is this overall a safe merge?
Ping

Comment 15 by u...@chromium.org, Jul 7 2017

I confirmed that the fix works on Canary.
It is a safe merge.
Labels: -Merge-Review-60 Merge-Approved-60
Approving merge to M60. 
Please merge this to M60 ASAP. branch:3112

Comment 18 by u...@chromium.org, Jul 10 2017

Here is the merge CL: https://chromium-review.googlesource.com/c/565570/
Project Member

Comment 19 by bugdroid1@chromium.org, Jul 10 2017

Labels: -merge-approved-60 merge-merged-3112
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9e4d178859deb9b2dcb16cb7976e5a014e256dc3

commit 9e4d178859deb9b2dcb16cb7976e5a014e256dc3
Author: Ulan Degenbaev <ulan@chromium.org>
Date: Mon Jul 10 16:17:12 2017

Fix unsigned int underflow bug in FileReader.

The underflow happens when reporting amount of external memory to V8:
AdjustReportedMemoryUsageToV8(-1 * raw_data_->ByteLength());

since ByteLength is unsigned, the -1 is cast to unsigned, which results
in V8 getting reports of ~4GB allocations. This confuses V8 GC and leads
to GC trashing.

BUG= chromium:736861 , chromium:114548 
TBR=ulan@chromium.org

(cherry picked from commit 453c124756ed4016b892acabd37828bbfedf892c)

Change-Id: Iba51aecf37ca9f8f009f369e952ea1ae509fe4cc
Reviewed-on: https://chromium-review.googlesource.com/550215
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#482928}
Reviewed-on: https://chromium-review.googlesource.com/565570
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/branch-heads/3112@{#555}
Cr-Branched-From: b6460e24cf59f429d69de255538d0fc7a425ccf9-refs/heads/master@{#474897}
[modify] https://crrev.com/9e4d178859deb9b2dcb16cb7976e5a014e256dc3/third_party/WebKit/Source/core/fileapi/FileReaderLoader.cpp

Cc: rbasuvula@chromium.org
Labels: Needs-Feedback
Tested in chrome Beta # 60.0.3112.66 on win 7 and unable to test with provided zip file.Please find the screen shot for reference.
Steps Followed:
1. Install chrome and navigate to https://editor.construct.net/
2. Open file folder and open the attached zip file >File

@Ulan: Could you please let me know if i have missed anything and if possible,Please provide the sample layout URL / other sample steps of the issue which would help us to verify the issue further.

Thanks in Advance.
736861.PNG
240 KB View Download

Comment 21 by u...@chromium.org, Jul 12 2017

rbasuvula@, I tested with the zip file from comment #6.
Labels: -Needs-Feedback TE-Verified-M60 TE-Verified-60.0.3112.66
@ulan: Thanks for your support! Tested as per comment #6 and #21.
Tested the issue on Windows-7 using chrome latest Beta M60-60.0.3112.66 by following steps mentioned in the original comment. Observed that file uploaded and images are render in a timely manner, without memory issues and crashes and its seems to be working as expected. Hence adding TE-Verified label.

Please find the screen cast for reference.

Thank you! 
736861.mp4
4.3 MB View Download

Comment 23 by u...@chromium.org, Jul 24 2017

Status: Fixed (was: Started)
Thanks for checking, rbasuvula@!

Sign in to add a comment