Closed Bug 448534 Opened 16 years ago Closed 16 years ago

Audio won't stop playing after closing a window with a Theora <video>

Categories

(Core :: Audio/Video, defect)

x86
All
defect
Not set
major

Tracking

()

VERIFIED FIXED
mozilla1.9.1a2

People

(Reporter: alex.fdm, Assigned: cajbir)

References

()

Details

Attachments

(3 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1a2pre) Gecko/2008073003 Minefield/3.1a2pre Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1a2pre) Gecko/2008073003 Minefield/3.1a2pre When I close a tab that is playing a Theora video element, the audio continues to play. It won't stop even if I close the browser. I have to kill the process in task manager to stop the audio. Reproducible: Always Steps to Reproduce: 1. Open any of the samples at http://www.double.co.nz/video_test/ 2. Start the video 3. Close the tab Actual Results: The audio will continue to play. Expected Results: No remains of the closed tab. I don't know how to open the bug in the correct category (Core/DOM:HTML), please reassign. I guess this should block bug #422538.
Blocks: 422538
Component: General → DOM: HTML
Product: Firefox → Core
Version: unspecified → Trunk
Confirmed, it seems to me this also means there is a memory leak, no?
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Status: NEW → ASSIGNED
Pause the video when removed from the DOM as per HTML5 spec. Tested under Linux where I don't see the problem of not being able to shut down the browser. I'll test in windows to see what's happening there and comment next.
Assignee: nobody → chris.double
Component: DOM: HTML → DOM: Core & HTML
QA Contact: general → general
at my firefox it also won't decrease the used memory which has increased very much after starting the video (using approx. 500 mb ram while playing 4 videos in 4 tabs at the same time ^^)
(In reply to comment #4) > at my firefox it also won't decrease the used memory which has increased very > much after starting the video (using approx. 500 mb ram while playing 4 videos > in 4 tabs at the same time ^^) > Same here and also virtual memory. I let Chris know about that last night and said something along the lines of looking into it. Hopefully fixing this bug will also fix the memory issues.
This adds a mochitest for this issue. Note that it contains a binary file in the patch (a test video). So it needs to be applied with hg import --no-commit. The video is from the theora testsuite and can be freely redistributed.
Attachment #331861 - Flags: superreview?(roc)
Attachment #331861 - Flags: review?(roc)
Attachment #331762 - Flags: superreview?(roc)
Attachment #331762 - Flags: review?(roc)
I can confirm this bug with ff3.1a2pre on Ubuntu 8.04. However, when I close the browser, the audio stops without the need to kill the process.
Regarding the memory issues in comment 4 and comment 5, I've opened a bug for that. See bug 448714.
Component: DOM: Core & HTML → Build Config
Attachment #331762 - Flags: superreview?(roc)
Attachment #331762 - Flags: superreview+
Attachment #331762 - Flags: review?(roc)
Attachment #331762 - Flags: review+
Comment on attachment 331861 [details] [diff] [review] Adds test for removing a video from the DOM OK, but is there a shorter test video you can use? The smaller the better...
Attachment #331861 - Flags: superreview?(roc)
Attachment #331861 - Flags: superreview+
Attachment #331861 - Flags: review?(roc)
Attachment #331861 - Flags: review+
Keywords: checkin-needed
Attached file Smaller ogg file (deleted) —
The change to nsVideoFrame::Destroy is actually not wanted since frame reconstruction or display:none would reach that but should not stop the video. So I pushed b7cfea09428c with everything except that. We still have an issue where closing the window does not immediately stop the audio --- it keeps playing for a short time. To fix that, we need to hook presentation teardown or document unload and aggressively stop all media elements. Someone should file a new bug for that.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
I disabled the test because it crashes in liboggplay. I didn't back out the patch because the liboggplay crash doesn't seem to be related to the code change here. We'll need a new small-but-valid video file here ... and a new bug filed on the liboggplay crash on attachment #332152 [details].
Flags: in-testsuite+ → in-testsuite?
New bug file as bug 448994.
Keywords: checkin-needed
Target Milestone: --- → mozilla1.9.1a2
Status: RESOLVED → VERIFIED
I still see issue on Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1a2pre) Gecko/2008080603 Minefield/3.1a2pre Now audio stops few seconds after closing window. But SOMETIMES still continue to play after we close the tab
Biju, please file a new bug for that, with steps to reproduce, if possible.
Component: Build Config → Video/Audio
(In reply to comment #15) > Biju, please file a new bug for that, with steps to reproduce, if possible. done Bug 449924
similar issue Bug 470636
As of 2009-05-28 the test for this bug is enabled and PASSES on both trunk and branch without any crash. Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090528 Minefield/3.6a1pre Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1pre) Gecko/20090528 Shiretoko/3.5pre Thus, I am marking in‑testsuite with +
Flags: in-testsuite? → in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: