Closed Bug 1298307 Opened 4 years ago Closed 1 year ago

Intermittent dom/media/test/test_webvtt_empty_displaystate.html | Cue's displayState shouldn't be empty.


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




Tracking Status
firefox-esr52 --- affected
firefox55 --- fixed


(Reporter: intermittent-bug-filer, Assigned: bechen)


(Keywords: intermittent-failure)


(2 files, 1 obsolete file)

Component: Audio/Video → Audio/Video: Playback
Assignee: nobody → bechen
After discuss with :alwu offline, we find something we need to modify or investigate.
1. The testcase assume that when a cue receive an onenter event, the displayState object should exist. This assumption is wrong because there is "missing cue" whose displayState is null but still receive onenetr event. Missing cue comes from the bad performance playback, for example: if the timeupdate are 1s, 5s, 10s, once a cue whose time is 2-3s, it is a missing cue, break the testcase.

2. In the testcase, the cue whose time is 0s to 1s, if it is a missing cue, means that the timeupdate of the MediaElement doesn't have 0s. It is weird that we don't receive the timeupdate whose time is 0s.
Comment on attachment 8867628 [details]
Bug 1298307 - Check cue's active state first, then verify displaystate.
Attachment #8867628 - Flags: review?(alwu) → review+
Keywords: checkin-needed
hg error in cmd: hg push -r tip ssh:// pushing to ssh://
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 2 changes to 2 files
remote: WebIDL file dom/webidl/VTTCue.webidl altered in changeset e3e52ed72862 without DOM peer review
remote: ************************** ERROR ****************************
remote: Changes to WebIDL files in this repo require review from a DOM peer in the form of r=...
remote: This is to ensure that we behave responsibly with exposing new Web APIs. We appreciate your understanding..
remote: *************************************************************
remote: transaction abort!
remote: rollback completed
remote: pretxnchangegroup.d_webidl hook failed
abort: push failed on remote
Comment on attachment 8867628 [details]
Bug 1298307 - Check cue's active state first, then verify displaystate.

Hi :smaug, please help to review the patch.

The testcase wants to verify the displayState of the TextTrackCue object, and the problem is that when TextTrackCue receive the onenter event, the displayState might be empty because it is a missing cue, details in comment 18. There is a boolean member |mActive| in TextTrackCue which indicate the cue is showing or not. When the mActive is true, the displayState should be true. So I modify the VTTCue.webidl.
(Note: the displayState is a div, the root of a subtree parsed in vtt.jsm)
Comment on attachment 8867628 [details]
Bug 1298307 - Check cue's active state first, then verify displaystate.
Attachment #8867628 - Flags: review?(bugs) → review+
Keywords: checkin-needed
Pushed by
Check cue's active state first, then verify displaystate. r=alwu,smaug
Keywords: checkin-needed
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
This isn't fixed.
Flags: needinfo?(bechen)
Resolution: FIXED → ---
Target Milestone: mozilla55 → ---
I guess we hit the timing issue.
From the log, fail seems only occurs at opt build.
The nsVideoFrame be constructed after append to dom tree, not immediately. Once the main thread and decode thread run faster than "next refresh driver tick", the TextTrackManager will early return here

I still thinking about changing the testcase or our implementation.
Flags: needinfo?(bechen)
Attached patch bug1298307avoidnullframe.patch (obsolete) — Splinter Review
Attachment #8874288 - Flags: review?(alwu)
Comment on attachment 8874288 [details] [diff] [review]

Review of attachment 8874288 [details] [diff] [review]:

Please also modify the comment in [1] in order to capture the case of unexpected missing cue.


::: dom/media/test/test_webvtt_empty_displaystate.html
@@ +58,5 @@
>    info("--- check the type of cue ---");
>    isnot(window.TextTrackCue, undefined, "TextTrackCue should be defined.");
>    isnot(window.VTTCue, undefined, "VTTCue should be defined.");
> +  var cue = new VTTCue(1, 2, "Test cue");

Add the check to ensure the ending time is always small than the video duration, in case someday the video duration changes.
Attachment #8874288 - Flags: review?(alwu) → review+
Attachment #8874288 - Attachment is obsolete: true
Attachment #8874366 - Flags: review+
Hi sheriff, please help to check-in attachment 8874366 [details] [diff] [review].
Keywords: checkin-needed
Pushed by
Change the cue's startTime/endTime to avoid the videoframe was not created. r=alwu
Keywords: checkin-needed
Closed: 3 years ago3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
I hit this again on my Fennec devices, and the reproduce rate is about 0.1%.
However I have some idea to increase the reproduce rate. I'll try to reproduce it at local first.
Resolution: FIXED → ---
Here is the root cause:

We early return here because the videoFrame is not created at the beginning.
Flags: needinfo?(alwu)
Since its failure rate is super low, I think it's not worth to spend time investigating it. I'll prefer to wait for a long while to see its trend (still happen or disappear).
Flags: needinfo?(alwu)
Closed: 3 years ago3 years ago
Resolution: --- → INCOMPLETE

Fail reappeared on m-c
Log link:

Log snippet:

19:16:14 INFO - TEST-PASS | dom/media/test/test_webvtt_empty_displaystate.html | video.duration should larger than 2
19:16:14 INFO - --- video.currentTime is 0.000047
19:16:14 INFO - --- video.currentTime is 0.28021
19:16:14 INFO - --- video.currentTime is 0.563409
19:16:14 INFO - --- video.currentTime is 0.843682
19:16:14 INFO - Buffered messages logged at 19:15:46
19:16:14 INFO - cueChrome.getActive true
19:16:14 INFO - Buffered messages finished
19:16:14 INFO - TEST-UNEXPECTED-FAIL | dom/media/test/test_webvtt_empty_displaystate.html | Cue's displayState shouldn't be empty.
19:16:14 INFO - SimpleTest.ok@SimpleTest/SimpleTest.js:275:7
19:16:14 INFO - checkCueDisplayState@dom/media/test/test_webvtt_empty_displaystate.html:28:5
19:16:14 INFO - runTest/cue.onenter@dom/media/test/test_webvtt_empty_displaystate.html:81:7
19:16:14 INFO - EventHandlerNonNullrunTest@dom/media/test/test_webvtt_empty_displaystate.html:75:3
19:16:14 INFO - EventHandlerNonNull
19:16:14 INFO - --- video.currentTime is 1.125941
19:16:14 INFO - --- video.currentTime is 1.407174
19:16:14 INFO - --- video.currentTime is 1.688404
19:16:14 INFO - --- video.currentTime is 1.972608
19:16:14 INFO - TEST-PASS | dom/media/test/test_webvtt_empty_displaystate.html | Cue's displayState should be empty.
19:16:14 INFO - --- video.currentTime is 2.012647

Resolution: INCOMPLETE → ---
Closed: 3 years ago1 year ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.