"ASSERTION: Stream already destroyed"

RESOLVED FIXED in mozilla21

Status

()

RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: jruderman, Assigned: roc)

Tracking

(Blocks: 1 bug, {assertion, testcase})

Trunk
mozilla21
x86_64
Mac OS X
assertion, testcase
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments)

(Reporter)

Description

6 years ago
Created attachment 676486 [details]
testcase

1. Save the testcase.
2. Fix the path in the testcase so it points at frames.webm in your tree.
3. Load the testcase.
4. Wait until the video finishes (~5 seconds).

Result:

###!!! ASSERTION: Stream already destroyed: '!aMessage->GetStream() || !aMessage->GetStream()->IsDestroyed()', file content/media/MediaStreamGraph.cpp, line 1717

The testcase is a slight perturbation of http://mxr.mozilla.org/mozilla-central/source/layout/reftests/webm-video/bug686957.html?force=1
(Reporter)

Comment 1

6 years ago
Created attachment 676487 [details]
stack
Created attachment 705233 [details] [diff] [review]
Make MediaDecoders detect when a MediaStream has been  destroyed because its DOM wrapper has been collected, and remove the no-longer-relevant MediaStream from the output list

Jesse, what's the state of the art in writing tests that require GCs at particular times? Can we do that reliably?
Assignee: nobody → roc
Attachment #705233 - Flags: review?(cpearce)
(Reporter)

Comment 3

6 years ago
As part of the test suite?  Try SpecialPowers.gc() or SpecialPowers.forceGC().

http://hg.mozilla.org/mozilla-central/file/e9f39220b8e7/testing/specialpowers/content/specialpowersAPI.js#l937
Attachment #705233 - Flags: review?(cpearce) → review+
(In reply to Jesse Ruderman from comment #3)
> As part of the test suite?  Try SpecialPowers.gc() or
> SpecialPowers.forceGC().

Does that actually reliably destroy unreachable wrapped DOM objects synchronously during the gc() call?
(Reporter)

Comment 5

6 years ago
I don't know.  It's possible you'll need a CC too.  Play with it?
Created attachment 707431 [details] [diff] [review]
Part 2: fix bogus assertions and add test

See comments in patch.
Attachment #707431 - Flags: review?(cpearce)
Comment on attachment 707431 [details] [diff] [review]
Part 2: fix bogus assertions and add test

Review of attachment 707431 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/media/test/test_streams_gc.html
@@ +26,5 @@
> +
> +  a.addEventListener("seeked", function() {
> +    a.play();
> +
> +	a.addEventListener("play", function() {

Mixing tabs and spaces here?
Attachment #707431 - Flags: review?(cpearce) → review+
https://hg.mozilla.org/mozilla-central/rev/62f4bc028c72
https://hg.mozilla.org/mozilla-central/rev/d4a6570ca6b0
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21

Updated

6 years ago
Depends on: 841809
You need to log in before you can comment on or make changes to this bug.