Bug 33671 - media/video-loop.html fails intermittently on GTK and Chromium bots
Summary: media/video-loop.html fails intermittently on GTK and Chromium bots
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords:
: 33497 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-01-14 05:24 PST by Philippe Normand
Modified: 2010-08-31 08:55 PDT (History)
7 users (show)

See Also:


Attachments
refactored test (5.33 KB, patch)
2010-01-14 08:22 PST, Philippe Normand
eric.carlson: review-
Details | Formatted Diff | Diff
Revised test (6.74 KB, patch)
2010-01-25 10:18 PST, Eric Carlson
no flags Details | Formatted Diff | Diff
Proposed patch (7.31 KB, patch)
2010-01-30 15:22 PST, Eric Carlson
no flags Details | Formatted Diff | Diff
patch (9.77 KB, patch)
2010-08-19 09:07 PDT, Eric Carlson
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2010-01-14 05:24:27 PST
That test does a seek() and fires up a timer. In our player the pipeline can take time to complete the seek and in some cases the timer will be fired too early. That test should be rewritten to rely on timeupdate events instead of a timer, in my opinion.
Comment 1 Philippe Normand 2010-01-14 08:22:55 PST
Created attachment 46571 [details]
refactored test
Comment 2 Philippe Normand 2010-01-14 08:24:57 PST
(In reply to comment #1)
> Created an attachment (id=46571) [details]
> refactored test

This is a proposed solution, can it be tested on mac as well? I had to change a line of the expected result and I am not totally sure it is correct.
Comment 3 Eric Seidel (no email) 2010-01-14 10:07:09 PST
*** Bug 33497 has been marked as a duplicate of this bug. ***
Comment 4 Eric Seidel (no email) 2010-01-14 14:08:18 PST
It seems that either r53277 or 53281 caused this to start failing consistently.  It's been failing for the last 8 builds on the Gtk builder.
Comment 5 Eric Seidel (no email) 2010-01-14 14:13:00 PST
Never mind, it failed 7 out of 8 builds.  It did not fail in http://build.webkit.org/results/GTK%20Linux%20Release/r53283%20(7663)/results.html
Comment 6 Gustavo Noronha (kov) 2010-01-14 17:29:54 PST
I preffer to have Eric Carlson or someone else with more knowledge than me reviewing this patch. I'll skip the test while you get this one reviewed, please unskip when committing! =)
Comment 7 Eric Carlson 2010-01-25 09:47:52 PST
Comment on attachment 46571 [details]
refactored test

This patch has several problems: 

> else if (timeupdateEventCount >= 10)
>
This magic number seems fragile, if a media engine doesn't fire 10 'timeupdate' events (because of processor load or whatever) it will fail.

> testExpected("mediaElement.currentTime", (video.duration - 0.4).toFixed(2), '<');
>
This will log the movie's duration, which is not exactly the on every platform because of the different movie files used.

> if (timeupdateEventCount == 2) {
>    // make sure we are playing, seek to near the end so
>
Three space tabs?

> function ended() {
>
Brace should be on the next line.

In general, replacing a timer with a 'timeupdate' event handler seems wrong, as that event is extremely platform and machine dependent. I would rather see this test rewritten in a way that removes as much indeterminism as possible. 

I would also like to see revised tests cleaned up so they have reasonable looking markup. You didn't make this any worse, but the lack of a body, the stray "</head>", etc should be cleaned up as long as the file is being changed.

marking r-
Comment 8 Eric Carlson 2010-01-25 09:49:00 PST
Why don't I revise this test and reattach so you can test on a GTK machine to make sure my changes fix the intermittent failures.
Comment 9 Philippe Normand 2010-01-25 10:00:36 PST
(In reply to comment #8)
> Why don't I revise this test and reattach so you can test on a GTK machine to
> make sure my changes fix the intermittent failures.

Ok, you will be faster than me at reworking this test :) Thanks for the review anyway, I will be happy to test here the reworked test if needed.
Comment 10 Eric Carlson 2010-01-25 10:18:35 PST
Created attachment 47354 [details]
Revised test

Can you see if is more consistent?
Comment 11 Philippe Normand 2010-01-26 00:35:39 PST
(In reply to comment #10)
> Created an attachment (id=47354) [details]
> Revised test
> 
> Can you see if is more consistent?

I was unable to make it fail :)
Comment 12 Eric Carlson 2010-01-30 15:22:50 PST
Created attachment 47777 [details]
Proposed patch
Comment 13 Eric Seidel (no email) 2010-02-05 12:02:53 PST
Attachment 47777 [details] was posted by a committer and has review+, assigning to Eric Carlson for commit.
Comment 14 Eric Carlson 2010-02-09 10:49:09 PST
Comment on attachment 47777 [details]
Proposed patch

Clearing the r+ flag for now because I need to generate new results but won't be able to get to it for a bit.
Comment 15 Eric Carlson 2010-08-19 09:07:20 PDT
Created attachment 64860 [details]
patch

Revised slightly to pause before seeking to try to avoid looping before the 'seeked' event fires on really slow machines.
Comment 16 Gustavo Noronha (kov) 2010-08-19 11:13:54 PDT
Could you please take the opportunity to unskip the test, too? =)
Comment 17 Eric Carlson 2010-08-19 11:15:13 PDT
trac.webkit.org/changeset/65684
Comment 18 Eric Carlson 2010-08-19 11:15:37 PDT
(In reply to comment #16)
> Could you please take the opportunity to unskip the test, too? =)

Darn, missed your comment.
Comment 19 Philippe Normand 2010-08-31 08:55:58 PDT
(In reply to comment #18)
> (In reply to comment #16)
> > Could you please take the opportunity to unskip the test, too? =)
> 
> Darn, missed your comment.

Unskipped in http://trac.webkit.org/changeset/66487