Closed Bug 1157654 Opened 9 years ago Closed 9 years ago

Intermittent test_mediarecorder_getencodeddata.html | onStop after onError - expected PASS

Categories

(Core :: Audio/Video: Recording, defect)

Unspecified
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox38 --- unaffected
firefox38.0.5 --- unaffected
firefox39 --- unaffected
firefox40 --- fixed
firefox-esr31 --- unaffected
firefox-esr38 --- unaffected

People

(Reporter: cbook, Assigned: bechen)

References

()

Details

(Keywords: intermittent-failure)

Attachments

(1 file, 1 obsolete file)

Windows XP 32-bit mozilla-inbound opt test mochitest-3

https://treeherder.mozilla.org/logviewer.html#?job_id=9220693&repo=mozilla-inbound

02:47:16 INFO - 338 INFO TEST-UNEXPECTED-FAIL | dom/media/test/test_mediarecorder_getencodeddata.html | onStop after onError - expected PASS
Component: DOM → Video/Audio
This is pretty frequent. Can we get some eyes on this please? :)
Flags: needinfo?(jwwang)
Pretty clearly caused by something in this push:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?changeset=914fd1f2d882

I plan to back out the three changesets by Benjamin Chen in that push unless I can quickly eliminate some of them as potential causes of this.
Hi Benjamin,
Please check this out. Thanks.
Assignee: nobody → bechen
Flags: needinfo?(jwwang)
Blocks: 1153690
Component: Video/Audio → Video/Audio: Recording
I think I figure out why the testcase failed even though I can not reproduce it.

Because the InitEncoder() is not called yet from TracksAvailableCallback, so the Session::Stop function call DoSessionEndTask(NS_OK). Since the NS_OK won't notify the error to JS cause the testcase failed.
Before bug 1153690, the InitEncoder() will trigger the DoSessionEndTask(NS_ERROR_ABORT) to notify the error.
Attached patch bug-1157654.v01.patch (obsolete) — Splinter Review
For the testcase modification, apply the patch of bug 1153690, if we call MediaRecorder.stop immediately after the MediaReocrder.start, it won't gaurantee the onerror callback will be invoked because the TracksAvailableCallback might not be called (See bug 1153690 comment 8). So I remove the MediaRecorder.stop to make sure we will receive the onerror callback.

For the MediaReocrder modification, I think it is better if we make the NotifyError asynchronous, if the MediaReocrder::NotifyError is a sync call, the testcase will fail if we add MediaRecorder.stop in onerror callback. (It is trivial to call stop if we receive an onerror callback)
Attachment #8598530 - Flags: review?(roc)
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/a8dcccaf00c4
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.