"ASSERTION: Should have state machine"

RESOLVED FIXED in Firefox 43

Status

()

P1
normal
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: jruderman, Assigned: jwwang)

Tracking

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

Trunk
mozilla45
assertion, testcase
Points:
---

Firefox Tracking Flags

(firefox42 affected, firefox43 fixed, firefox44 fixed, firefox45 fixed)

Details

Attachments

(3 attachments)

(Reporter)

Description

3 years ago
Created attachment 8683494 [details]
testcase

###!!! ASSERTION: Should have state machine.: 'mDecoderStateMachine != nullptr', file dom/media/MediaDecoder.cpp, line 559

Testcase is the same as in bug 1221370, except for the last statement:
  - vid.mozCaptureStreamUntilEnded();
  + vid.autoplay = true
(Reporter)

Comment 1

3 years ago
Created attachment 8683499 [details]
stack
Component: Audio/Video → Audio/Video: Playback
Priority: -- → P1
(Assignee)

Updated

3 years ago
Assignee: nobody → jwwang
(Assignee)

Comment 2

3 years ago
Here is what happened:
1. |ms.endOfStream("network")| propagates network to the media element.
https://hg.mozilla.org/mozilla-central/file/cc473fe5dc512c450634506f68cbacfb40a06a23/dom/media/mediasource/MediaSource.cpp#l329

2. MediaDecoder::Shutdown() is called, and |mDecoderStateMachine| is cleared later.

3. autoplay kicks in and MediaDecoder::Play() is called to hit the assertion.
https://hg.mozilla.org/mozilla-central/file/cc473fe5dc512c450634506f68cbacfb40a06a23/dom/html/HTMLMediaElement.cpp#l3989
(Assignee)

Comment 4

3 years ago
Created attachment 8685849 [details]
MozReview Request: Bug 1221881 - HTMLMediaElement::NetworkError() should clear mDecoder. See bug 1221881 comment 2 for the root cause. r=cpearce.

Bug 1221881 - HTMLMediaElement::NetworkError() should clear mDecoder. See bug 1221881 comment 2 for the root cause. r=cpearce.
Attachment #8685849 - Flags: review?(cpearce)
I wonder if this will fix bug 1221370
(Assignee)

Comment 6

3 years ago
It does, but I would still like to know the root cause of bug 1221370. I think it might help to log the name of the task queue when debugging dispatch failures.
awesome.
should I mark 1221370 as a duplicate?
(Assignee)

Comment 8

3 years ago
I think bug 1221370 might be resulted another root cause. It should be worth digging a bit to know the truth.

Also I think it is time to develop a tool to facilitate debugging dispatch failures.
(Assignee)

Comment 9

3 years ago
(In reply to JW Wang [:jwwang] from comment #4)
> Created attachment 8685849 [details]
> MozReview Request: Bug 1221881 - HTMLMediaElement::NetworkError() should
> clear mDecoder. See bug 1221881 comment 2 for the root cause. r=cpearce.
> 
> Bug 1221881 - HTMLMediaElement::NetworkError() should clear mDecoder. See
> bug 1221881 comment 2 for the root cause. r=cpearce.

Since MediaDecoder::NetworkError() calls MediaDecoder::Shutdown(), we should clear mDecoder for HTMLMediaElement to prevent it from calling into MediaDecoder functions.
(Assignee)

Comment 10

3 years ago
Comment on attachment 8685849 [details]
MozReview Request: Bug 1221881 - HTMLMediaElement::NetworkError() should clear mDecoder. See bug 1221881 comment 2 for the root cause. r=cpearce.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/24915/diff/1-2/
(Assignee)

Comment 11

3 years ago
(In reply to JW Wang [:jwwang] from comment #10)
> Comment on attachment 8685849 [details]
> MozReview Request: Bug 1221881 - HTMLMediaElement::NetworkError() should
> clear mDecoder. See bug 1221881 comment 2 for the root cause. r=cpearce.
> 
> Review request updated; see interdiff:
> https://reviewboard.mozilla.org/r/24915/diff/1-2/

Hi Chris,
Can you review this patch? Thanks.
Flags: needinfo?(cpearce)
Comment on attachment 8685849 [details]
MozReview Request: Bug 1221881 - HTMLMediaElement::NetworkError() should clear mDecoder. See bug 1221881 comment 2 for the root cause. r=cpearce.

https://reviewboard.mozilla.org/r/24915/#review22919
Attachment #8685849 - Flags: review?(cpearce) → review+
Done. Sorry for delay.
Flags: needinfo?(cpearce)
(Assignee)

Comment 14

3 years ago
Thanks for the review!
(Assignee)

Updated

3 years ago
Duplicate of this bug: 1221370

Comment 17

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/c62903740717
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox45: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Comment on attachment 8685849 [details]
MozReview Request: Bug 1221881 - HTMLMediaElement::NetworkError() should clear mDecoder. See bug 1221881 comment 2 for the root cause. r=cpearce.

Approval Request Comment
[Feature/regressing bug #]: 1221881
[User impact if declined]: Crashes. Bug 1221370 has information related to crash rates and test case to reproduce the crash 
[Describe test coverage new/current, TreeHerder]: in central, manually verified
[Risks and why]: Low, properly clearing a variable on shutdown
[String/UUID change made/needed]: none
Attachment #8685849 - Flags: approval-mozilla-beta?
Attachment #8685849 - Flags: approval-mozilla-aurora?
Does this affect 43?  Bug 1221370 only has 44/45 marked as affected. This seems good to uplift to 44 though.
Never mind, looks like it has been an issue since firefox 40.
status-firefox42: --- → affected
status-firefox43: --- → affected
status-firefox44: --- → affected
Comment on attachment 8685849 [details]
MozReview Request: Bug 1221881 - HTMLMediaElement::NetworkError() should clear mDecoder. See bug 1221881 comment 2 for the root cause. r=cpearce.

Crash/assertion fix, recent regression. OK to uplift to aurora and beta.
Attachment #8685849 - Flags: approval-mozilla-beta?
Attachment #8685849 - Flags: approval-mozilla-beta+
Attachment #8685849 - Flags: approval-mozilla-aurora?
Attachment #8685849 - Flags: approval-mozilla-aurora+

Comment 22

3 years ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-aurora/rev/4f61d893d6d1
status-firefox44: affected → fixed

Comment 23

3 years ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-beta/rev/dddd1cb91dd6
status-firefox43: affected → fixed
You need to log in before you can comment on or make changes to this bug.