Closed Bug 1407895 Opened 3 years ago Closed 3 years ago

Assertion failure: IsSuspended() (Resume without suspend!), at /builds/worker/workspace/build/src/dom/media/ChannelMediaResource.cpp:997

Categories

(Core :: Audio/Video: Playback, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox-esr52 --- wontfix
firefox56 --- wontfix
firefox57 --- wontfix
firefox58 --- fixed

People

(Reporter: jkratzer, Assigned: jwwang)

References

(Blocks 1 open bug)

Details

(Keywords: assertion, testcase)

Attachments

(3 files)

Attached file trigger.html
Testcase found while fuzzing mozilla-central rev 20d9ad08dd36.
Flags: in-testsuite?
Attached file Minidump stack trace
Component: Audio/Video → Audio/Video: Playback
This testcase asserts in builds as far back as a year ago, which is the furthest back mozregression can bisect debug builds.
Has Regression Range: --- → no
The assertion is resulted from the calls to MediaDecoder::Suspend/Resume are not balanced.

1. HTMLMediaElement::SuspendOrResumeElement(true, true) is called. [1]
   mPausedForInactiveDocumentOrChannel is set to true and mDecoder is null at the moment.
2. HTMLMediaElement::FinishDecoderSetup() is called.
   NotifyOwnerDocumentActivityChanged() is called which calls SuspendOrResumeElement(true, true)
   Since |aPauseElement != mPausedForInactiveDocumentOrChannel| tests to be false, mDecoder->Suspend() is not called.
3. HTMLMediaElement::SuspendOrResumeElement(false, false) is called.
   mDecoder->Resume() is called and fails the assertion.

[1] http://searchfox.org/mozilla-central/rev/ed1d5223adcdc07e9a2589ee20f4e5ee91b4df10/dom/html/HTMLMediaElement.cpp#6438
[2] http://searchfox.org/mozilla-central/rev/ed1d5223adcdc07e9a2589ee20f4e5ee91b4df10/dom/html/HTMLMediaElement.cpp#5040

The call to NotifyOwnerDocumentActivityChanged() doesn't work as expected for |aPauseElement != mPausedForInactiveDocumentOrChannel| tests to be false and mDecoder->Suspend() is not called as expected.
Assignee: nobody → jwwang
Attachment #8918159 - Flags: review?(gsquelart)
Comment on attachment 8918159 [details]
Bug 1407895 - ensure mDecoder->Suspend() is called on a newly created decoder if mPausedForInactiveDocumentOrChannel is true.

https://reviewboard.mozilla.org/r/189018/#review194320
Attachment #8918159 - Flags: review?(gsquelart) → review+
Thanks!
Pushed by jwwang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bfa67a56076c
ensure mDecoder->Suspend() is called on a newly created decoder if mPausedForInactiveDocumentOrChannel is true. r=gerald
https://hg.mozilla.org/mozilla-central/rev/bfa67a56076c
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.