bugGnash - The GNU Flash player - Bugs: bug #32602, FAIL: run_swfdec_testsuite_r:...

 
 

bug #32602: FAIL: run_swfdec_testsuite_r: registerclass-previous.swf on hurd

Submitted by:  Gabriele Giacone <gg0>
Submitted on:  Sat 26 Feb 2011 02:59:56 AM UTC  
 
Category: testsuiteSeverity: 3 - Normal
Release: masterStatus: Postponed
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sun 31 Jul 2011 09:10:28 PM UTC, comment #8:

I attach a proof-of-concept patch making the results of this specific test stable.

Drawbacks:
1: it always waits for the first 64k bytes of each loaded movie to be loaded while blocking the GUI (you may notice that when loading from network)
2: it only waits for the first advance (construction)
3: it does not use the nice SWFParser interface which seems to be designed for exactly this kind of predictability
4: trusts the SWF header to advertise the correct file length, deadlocking if that number is longer than reality

Most likely the PP simply does a non-blocking read with a buffer of 64k... but I've yet to see comprehensive tests about that.

(file #23720)

Sandro Santilli <strk>
Project Member
Sun 31 Jul 2011 01:11:47 PM UTC, comment #7:

idea: we could add an ensure_bytes_loaded() similar to existing ensure_frames_loaded() and use that to ensure at least _currentframe*64k bytes are loaded before advancing.

Might actually fix all the tests relying on the 64k chunk parsing expectation.

Sandro Santilli <strk>
Project Member
Sat 30 Jul 2011 05:31:24 PM UTC, comment #6:

so, to recap, the race condition is not a bug but the well known design issue about loading.

That is: when main thread executes first DOACTION, the parser may or may not have parsed the second frame (which contains the export tag).

When the parser was too slow, the test fails.

Parsing in chunks of 65535 bytes (as seems to be tested by
some swfdec testcase) would fix this.

Sandro Santilli <strk>
Project Member
Sat 30 Jul 2011 05:29:19 PM UTC, comment #5:

I was wrong about the tags order, here's the correct one:

FRAME 1:
- DOACTION ( registerClass on "export" named export )
- DEFINESPRITE (id:1)
- PLACE sprite id 1 (name: "m")
FRAME 2:
- DOACTION:
+ check that "m2" was affected by registerClass
+ check that "m" wasn't affected by registerClass
- EXPORT sprite id 1 (name: "export")
- PLACE sprite id 1 again (name: "m2")

Sandro Santilli <strk>
Project Member
Sat 30 Jul 2011 03:27:51 PM UTC, comment #4:

I'm not sure; it's the sporadic failure that led me to believe it's timing related.

Benjamin Wolsey <bwy>
Project Member
Sat 30 Jul 2011 03:20:20 PM UTC, comment #3:

Structure of the test is:

FRAME 1:
- DEFINESPRITE
- EXPORT it (name: "export")
- PLACE it (name: "m")
- DOACTION ( registerClass to "export" )
FRAME 2:
- PLACE it again (name: "m2")
- DOACTION:
- check that "m2" was affected by registerClass
- check that "m" wasn't affected by registerClass

Sandro Santilli <strk>
Project Member
Sat 30 Jul 2011 03:14:05 PM UTC, comment #2:

What's time-related about that test ? I can't tell from sourcecode:

movie = newSWFMovie();
SWFMovie_setRate (movie, 1);
SWFMovie_setDimension (movie, 200, 150);

clip = newSWFMovieClip ();
SWFMovie_addExport (movie, (SWFBlock) clip, "export");
item = SWFMovie_add (movie, (SWFBlock) clip);
SWFDisplayItem_setName (item, "m");
SWFMovie_add (movie, (SWFBlock) compileSWFActionCode (""
"trace (\"Check that registerClass does not influence previously created instances\");"
"fun = function () {"
" trace (this + \": Constructor\");"
"};"
"fun.prototype = new Object ();"
"fun.prototype.foo = function () {"
" trace (\"foo called on \" + this);"
"};"
"Object.registerClass (\"export\", fun);"
"m.foo ();"
""));
SWFMovie_nextFrame (movie);

item = SWFMovie_add (movie, (SWFBlock) clip);
SWFDisplayItem_setName (item, "m2");
SWFMovie_add (movie, (SWFBlock) compileSWFActionCode (""
"m.foo ();"
"m2.foo ();"
"stop ();"
""));

SWFMovie_save (movie, "registerclass-previous.swf");

Sandro Santilli <strk>
Project Member
Sat 26 Feb 2011 08:39:34 AM UTC, comment #1:

It is a timing-related one.

Benjamin Wolsey <bwy>
Project Member
Sat 26 Feb 2011 02:59:56 AM UTC, original submission:

Unexpected failures follow:
--=[ testsuite/swfdec ]=--
FAIL: run_swfdec_testsuite_r: registerclass-previous.swf:7ea3d590fa576190bda56996ff0fa768 (traces in registerclass-previous.swf.trace-gnash, log in registerclass-previous.swf.log)

--
NOTE: running registerclass-previous.swf (expect pass: yes)
Running /bb/build/sid-hurd-i386/build/utilities/gprocessor -r11 -f10 -v /bb/build/sid-hurd-i386/build/testsuite/swfdec/src/test/trace/registerclass-previous.swf
FAILED: registerclass-previous.swf:7ea3d590fa576190bda56996ff0fa768 (traces in registerclass-previous.swf.trace-gnash, log in registerclass-previous.swf.log)

$ cat registerclass-previous.swf.trace-gnash
Check that registerClass does not influence previously created instances
$ cat registerclass-previous.swf.log
--- /bb/build/sid-hurd-i386/build/testsuite/swfdec/src/test/trace/registerclass-previous.swf.trace 2011-02-13 22:20:51.000000000 +0000
+++ registerclass-previous.swf.trace-gnash 2011-02-26 02:51:00.000000000 +0000
@@ -1,3 +1 @@
Check that registerClass does not influence previously created instances
-_level0.m2: Constructor
-foo called on _level0.m2

Gabriele Giacone <gg0>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by strk (Posted a comment)
  • -unavailable- added by bwy (Posted a comment)
  • -unavailable- added by gg0 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 31 Jul 2011 09:10:28 PM UTCstrkAttached File-=>Added 0001-Add-a-way-to-wait-for-a-given-amount-of-bytes-to-be-.patch, #23720
    Sat 30 Jul 2011 05:31:24 PM UTCstrkStatusNone=>Postponed

    Back to the top


    Powered by Savane 3.1-cleanup