Issue metadata
Sign in to add a comment
|
MediaElement inappropriately disposed
Reported by
m...@bocoup.com,
Feb 22 2017
|
||||||||||||||||||||||
Issue description
Steps to reproduce the problem:
Create the following document and access it over HTTP:
<!DOCTYPE html>
<script>
(function() {
var element = document.createElement('audio');
element.onerror = function() {
window.location = window.location;
};
element.src = '.?' + new Date().getTime();
}());
</script>
What is the expected behavior?
The browser should refresh indefinitely.
What went wrong?
The browser eventually stopped refreshing (for 29 trial runs, the cycle halted
after an average of 40 refreshes with a standard deviation of 30.2).
Did this work before? N/A
Does this work in other browsers?
This works as expected in Firefox 51.0.1 (64-bit) on my system.
Chrome version:
- Chromium 55.0.2883.87 (Developer Build) Built on Ubuntu, running on Ubuntu
16.04 (64-bit)
- Google Chrome 58.0.3013.3 (Official Build) dev (64-bit), running on Ubuntu
16.04 (64-bit)
The same behavior is observable under other conditions:
- `<audio>` elements
- the `onloadeddata` event (when loading valid resources)
This causes unstable results in at least two Web Platform Tests: [1] and [2].
Either of the following alterations to the script appear to produce the
expected behavior:
- Removing the immediately-invoked function expression and instead executing
the function body in the global scope directly
- Creating a function that closes around the `element` reference and scheduling
that to be executed later via a timer--e.g. `setTimeout(() => element, 1000)`
It's difficult to say that either of these definitively correct the behavior
based only on experiment. They each "appear" to do so because following their
application, the browser refreshes as expected at least 1000 times.
A layman's interpretation of this is over-eager garbage collection. I'll leave
the real diagnosis to the professionals.
[1] /html/semantics/embedded-content/media-elements/error-codes/error.html
Available online at
https://github.com/w3c/web-platform-tests/blob/1ea4f53a5b0fe9705b1ed279a3904ab173e98393/html/semantics/embedded-content/media-elements/error-codes/error.html
[2] /html/semantics/embedded-content/media-elements/ready-states/autoplay.html
Available online at
https://github.com/w3c/web-platform-tests/blob/1ea4f53a5b0fe9705b1ed279a3904ab173e98393/html/semantics/embedded-content/media-elements/ready-states/autoplay.html
,
Feb 23 2017
Unable to reproduce this issue on Ubuntu 14.04 with chrome dev #58.0.3013.3
These are the steps followed
1. Launched chrome and navigate to "Youtube.com"
2. In the browser console pasted the following code
(function() {
var element = document.createElement('audio');
element.onerror = function() {
window.location = window.location;
};
element.src = '.?' + new Date().getTime();
}());
3. Observed that youtube page got immediately refreshed.
Attaching the screen-cast for reference.
mike@ could you please look into it and let us know any steps i have missed while reproducing the scenario.
Thank You...
,
Feb 23 2017
Thanks for taking a look. An important detail missing from your attempt to reproduce this bug is the creation of a dedicated document. By executing the provided script in the developer console, it will only be run one time. The erroneous behavior is exhibited irregularly. This is the significance of the statistics I shared: only 2.5% of trials failed on my system. This means the bug may not be appreciable in a single trial. My original report recommended a dedicated document so that the trial would be run many times automatically and so that a failure would halt execution of further trials.
,
Mar 1 2017
Thank you for providing feedback. removing "Needs-Feedback" label.
,
Mar 3 2017
,
Mar 23 2017
,
Mar 26 2017
Any chance you can provide a test page that we could use to reproduce the issue?
,
Mar 27 2017
Sure, see attached. Note that this file simply contains the text from my initial report. Note also that it must be loaded via a web server--accessing it via the `file://` protocol does not seem to trigger the bug.
,
Mar 29 2017
I put this page in https://mounirlamouri.github.io/sandbox/bugs/695096.html and I can't reproduce on 59.0.3043.0 Can you try with a similar set up?
,
Mar 29 2017
The script I shared in my issue report made an invalid assumption: that the server would respond to requests for the document's directory (i.e. .) with an HTTP 2xx status code. The webserver I have been using for local testing behaves in this way (providing a directory listing), but the server implemented by GitHub on github.io does not. I'm attaching a corrected version that corrects this. (I've also submitted a patch to your git repository in case that is easier.)
,
Mar 29 2017
That's also available on my fork of your repository: https://jugglinmike.github.io/sandbox/bugs/695096.html I've attached a recording of the reported behavior as I am experiencing it.
,
Mar 29 2017
Thank you for providing more feedback. Adding requester "mlamouri@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
,
Apr 10 2017
Hmm, I can't reproduce with 59.0.3063.4 on Linux with the URL in Comment 12.
,
Apr 19 2017
Mike, I can't reproduce this on a M59 build too. Can you still reproduce this issue?
,
Apr 20 2017
Yes, I am still experiencing this bug on version 59.0.3067.0. It continues to
be rare, though, sometimes requiring over 500 trials before being expressed. I
spent some time tonight trying to nail down conditions to reproduce the
behavior more consistently, but I haven't had any luck. For instance, forcing
garbage collection by calling `gc()` (as exposed via
`--js-flags="--expose-gc"`) does not seem to help.
In what I hope is the next best thing, I am additional debugging data (enabled
using `--enable-logging=stderr --v=1`). This documents some of the internal
state for an error-free trial and for a failing trial that immediately followed
it. Note that in the successful trial, two "contexts" are created, reported as
"tracked," and subsequently destroyed. In the failing trial, no "contexts" are
created, although the "Destroyed context for extension" message is nonetheless
emitted.
I'm not sure if the "extension" referenced in these logs refers to the same
concept as the term "extension" as used in the UI. To be safe, I have uninstalled
all such extensions, but I am still seeing the same logging output.
Because the network connection to GitHub.com introduces a source of variability
that does not appear to be necessary, I have also attached Python source code
for an HTTP server that can be used to demonstrate this behavior. In
environments that have Python 2.7 available, the script can be executed via the
following command:
python media-element.py
That makes a demonstration web page available at http://localhost:8009
,
Apr 20 2017
Thank you for providing more feedback. Adding requester "mlamouri@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
,
Apr 27 2017
Mike, I ran your script for 5 mins and things were working fine. Do you have this running in the background by any chance? I believe this is throttled when running in the background.
,
Apr 28 2017
The browser has been the foreground process during my local testing. (Although note that even in the presence of request throttling, the reported behavior would still be a bug.) When it comes to reproducing the problem, I'm using the same procedure in the recording from comment 12.
,
Apr 28 2017
Thank you for providing more feedback. Adding requester "mlamouri@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
,
Jun 7 2017
Hmm I could not reproduce this on M60. Mike can you reproduce on M60?
,
Jun 8 2017
I sure can :) I've attached a new screen recording, this time running from Chrome version "60.0.3112.20 (Official Build) dev (64-bit)". The platform is the same as in my prior reports: version 16.04 of Ubuntu GNU/Linux. Note that the Developer Tools pane is open in these screen recordings solely for demonstration purposes. I experience the unexpected behavior whether that pane is open or not. Note that to be safe (and unlike in the previous recording), I have un-checked the UI checkbox labeled "Disable cache". Again, this detail does not effect my ability to reproduce the bug.
,
Jun 8 2017
Thank you for providing more feedback. Adding requester "beccahughes@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
,
Jun 9 2017
Thanks :) I tried it on M58, M59 and M60 across OSX / Ubuntu but unfortunately I can't seem to reproduce it. Do you have any more information, or anything that can help us reproduce the issue? If not, i'm afraid we will have to mark this as WontFix because we can't fix it if we can't reproduce it.
,
Jun 9 2017
,
Jun 20 2017
I'm really sorry about that but as beccahughes@ said, we have to close this because we can't reproduce the issue. If we find a way to reproduce the issue 100 % or have more information please ping the bug. We would be happy to have another look.
,
Jun 21 2017
The NextAction date has arrived: 2017-06-21 |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by nyerramilli@chromium.org
, Feb 23 2017