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

Issue 809574 link

Starred by 10 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Error "ResizeObserver loop limit exceeded" Firing When Video Controls Exist

Reported by imdashiz...@gmail.com, Feb 6 2018

Issue description

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

Steps to reproduce the problem:
1. Run the attached html file "ResizeObserver Error.html"
2. Shrink and expand the browser window's width so that the video overflows.
3. While the video controls are changing size, an error will eventually appear.

What is the expected behavior?

What went wrong?
A ResizeObserver error seems to be caused by the video controls resizing in certain scenarios.

The window fires a resize event, which does two things:
1. Change the body's font-size based on it's width.
2. Check the offsetWidth of an element.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 64.0.3282.140  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 28.0 r0

The key factor seems to be the video controls changing size. For some reason, making an offsetWidth check during this can produce the error.

This error does NOT get logged in console, but is caught with window.onerror.

The resize changes must be called within a timeout for the error to occur.

In my mobile courses, this was occurring on orientation change consistently.
 
ResizeObserver Error.html
1.6 KB View Download
ResizeObserver Error In Action.mp4
659 KB View Download
Labels: Needs-Triage-M64
When running "ResizeObserver Error.html" locally, it seems to only provide a basic "Script Error" message, unless you are using "--allow-file-access-from-files".
Labels: Needs-Bisect
The video controls have an odd interaction with the the right edge of the window. When the body is overflow:hidden and the video is partially off the right end of the screen, changing the font-size of the body will make the video controls attempt to fit within the visible space. The only other time the controls seem to do this is when the page is first opened.

I created another sample, which may help a bit. Download the two html files and open the ResizeObserver one. Click "Open Video Window," wait for the video to load in the new window, then click "Resize Video Window" to cause the error. It occurs every time the button is pressed.

If run locally, Chrome needs to be launched with "--allow-file-access-from-files".
ResizeObserver Error - external window.html
1.0 KB View Download
videoPage.html
383 bytes View Download
Cc: krajshree@chromium.org
Labels: Triaged-ET Needs-Feedback
Tried testing the issue using comment #4 by invoking chrome using --allow-file-access-from-files. After opening the ResizeObserver Error - external window.html file and clicking on Open Video Window, opened another chrome window showing the site not reachable.

imdashizmono@ - Could you please check the attached screen cast and please provide any other sample file to test the issue. Any further inputs from your end will help us in triaging the issue further.

Thanks...!!
809574.mp4
929 KB View Download
You also need to download videoPage.html and place it in the same folder.
Project Member

Comment 7 by sheriffbot@chromium.org, Feb 8 2018

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "krajshree@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Here is a working demo of it in action.

Loading the video page in a separate window was needed so that the javascript can control the dimensions of it. The code that makes the error is:

win.resizeBy(-100,0);
body.style.fontSize='15px';
win.document.getElementById('video').offsetWidth;
		
setTimeout(function(){
	win.resizeBy(100,0);
	body.style.fontSize='16px';
	win.document.getElementById('video').offsetWidth;
},100);


This does the following:
1. Shrink the video window width by 100px.
2. Change the font-size of the video page's body
3. Check an offsetWidth on the video page.
4. After a timeout, repeat the first three steps, but increase the window width instead.

External Window.mp4
671 KB View Download
Able to reproduce the issue on reported version 64.0.3282.140 and latest canary 66.0.3343.0 using Mac 10.12.6, Ubuntu 14.04 and Windows-10, hence providing Bisect Info
Bisect Info:
================
Good build: 63.0.3226.0
Bad build: 63.0.3227.0

You are probably looking for a change made after 504965 (known good), but no later than 504966 (first known bad).

https://chromium.googlesource.com/chromium/src/+log/41ed4a4682284e379929281189ede6a9e13a1fb4..46fb5c855a8622fe73a5c8000b7370407b9122af

Reviewed-on: https://chromium-review.googlesource.com/657820

@Becca Hughes: Please confirm the issue and help in re-assigning if it is not related to your change.

Thanks!
Cc: viswatej...@techmahindra.com beccahughes@chromium.org
Components: Blink>Media>Controls
Labels: -Type-Bug -Pri-2 -Needs-Bisect hasbisect-per-revision RegressedIn-63 M-66 Target-65 FoundIn-66 Target-66 FoundIn-64 FoundIn-65 FoundIn-63 Target-64 OS-Linux OS-Mac Pri-1 Type-Bug-Regression
Owner: mlamouri@chromium.org
Status: Assigned (was: Unconfirmed)
Assigning to reviewer (mlamouri@chromium.org), as owner(beccahughes@chromium.org) is OOO until 12th March
@mlamouri@chromium.org: please confirm the bug.
Owner: beccahughes@chromium.org
Hey Becca, mind confirming if this is still an issue?
Cc: mlamouri@chromium.org
Here is a simpler minimization that doesn't require javascript timers or any actual resizing.  It happens by itself on first page load.

The div containing the video element and the video controls attribute are both necessary to trip the error.
video.html
466 bytes View Download
Still happening infrequently in Chrome 70, this results in spurious triggers of window.onerror, which are visible from JS code, but are somehow not listed in the debugger console when there is no onerror handler (maybe hidden under a carpet of some sort in the console?)
In one of our products at work we have a catch-all error handler. We have a lot of videos in our products. We had no choice but to suppress this error as we were getting it a lot. Would really appreciate this getting some priority. Thanks.

Sign in to add a comment