bugGnash - The GNU Flash player - Bugs: bug #45840, Gnash ignores bare `var`...

 
 

bug #45840: Gnash ignores bare `var` declaration in timeline ActionScript

Submitted by:  Nutchanon Wetchasit <nachanon>
Submitted on:  Fri 28 Aug 2015 01:09:21 PM UTC  
 
Category: ActionScriptSeverity: 3 - Normal
Release: masterStatus: Fixed
Privacy: PublicAssigned to: Sandro Santilli <strk>
Open/Closed: Closed

Add a New Comment(Rich 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)

Thu 12 May 2016 01:39:28 PM UTC, comment #11:

The XMLSocketTester problem is now reported separately as bug #47906.

Nutchanon Wetchasit <nachanon>
Wed 03 Feb 2016 01:09:26 PM UTC, comment #10:

The testsuite failure problem is now reported separately as bug #47054.

It is likely to be Adobe Flash Player's regression. But I filed it anyway,
mostly to document the case in detailed manner, and update relevant
testsuite documentation.

Nutchanon Wetchasit <nachanon>
Tue 02 Feb 2016 10:30:57 AM UTC, comment #9:

Thanks again !

Sandro Santilli <strk>
Project MemberIn charge of this item.
Tue 02 Feb 2016 10:28:52 AM UTC, comment #8:

On current Gnash git version, `var` declaration on timeline ActionScript of
MovieClip seems to correctly set property on it.

Verbosity = 1 debug output from running `undefprop.swf` under Gnash:

Text output from running `extgetvariable-testrunner.html`
(from bug #42395 file #35743) on web browser with Gnash:

Moreover, if one tried to revert the fix using following patch:

When built and run `make check`, it also shown test failures correctly:
(SWF6-SWF8 failures from getvariable test, and SWF5-SWF8 failures from extgetvariable test)

This bug could now be considered as fixed.

I'll try to file the suspected incorrect test issue
as a separate report after I checked it on multiple version
of Flash Player on different platforms. Same goes for the
unrelated XMLSocketTester failure.

Gnash: 0.8.11dev (git e705394 29-Jan-2016)
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386

Nutchanon Wetchasit <nachanon>
Mon 11 Jan 2016 03:13:59 PM UTC, comment #7:

See patch #8851, which fixes testability of this bug under SWF5.

Note (for the record): There is no need to test this under SWF4,
as `var` statement is available only in Flash 5 and later versions.

Nutchanon Wetchasit <nachanon>
Sat 19 Dec 2015 05:09:36 PM UTC, comment #6:

For the issue that prevents this bug from being checked
under SWF5 environment, see bug #46719.

Nutchanon Wetchasit <nachanon>
Sat 19 Dec 2015 05:32:48 AM UTC, comment #5:

See patch #8835 which provides automated check for this issue under SWF5
using `GetVariable()` plugin function, but it is currently giving an XFAIL
result due to a different issue.

Nutchanon Wetchasit <nachanon>
Thu 24 Sep 2015 03:52:33 PM UTC, comment #4:

Regarding the test on SWF5 (and possibly SWF4) environment, using
a Plugin-provided `GetVariable()` interface might helps since it seems
to be available all the way back to Flash 4 era.
The HTML container `undefprop.html` also tested it this way.

This automated test could be implemented using an emulated host container,
as a part of `GetVariable()` plugin function test (patch #8721).

Nutchanon Wetchasit <nachanon>
Thu 24 Sep 2015 03:50:54 PM UTC, comment #3:

Current git version of Gnash gives correct result when tested with `undefprop.swf`:

and also gives correct result when tested with `getvariable-v3.html` from bug #42395:

Gnash: 0.8.11dev (git f0f66ce 23-Sep-2015)
Adobe Flash Player: 11.2 r202 (11.2.202.491) NPAPI binary
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386

Nutchanon Wetchasit <nachanon>
Fri 28 Aug 2015 05:41:12 PM UTC, comment #2:

As of commit 062edf672abbd849a4a67447b5c3fb9f30d1a701 the "var" declaration in timeline will set an undefined variable to the "this" pointer. Please see if it passes all the tests in your .zip, and eventually provide a patch to add more in getvariable.

You may notice the current test does not run in SWF5 due to the lack of hasOwnProperty at that level. You you have an idea about testing the SWF5 behavior that'd be great.

Also by running the tests (make getvariable-v{5,6,7,8}.swf under build/testsuite/actionscript.all) with the adobe player I've also found a test that fails (wrong exepctance, could you check with your version ?)

Sandro Santilli <strk>
Project MemberIn charge of this item.
Fri 28 Aug 2015 04:29:11 PM UTC, comment #1:

Good catch! There's a testsuite/actionscript.all/getvariable.as file you could add these tests to.

It's a good thing that there's an error message, so you can spot exactly where the code for considering that a no-op is found :)

Sandro Santilli <strk>
Project MemberIn charge of this item.
Fri 28 Aug 2015 01:09:21 PM UTC, original submission:

This is a follow-up to patch #8721 (GetVariable fix) and bug #42395
(Panopticlick issue).

From bug #42395, getvariable test does not give a correct result for
an unassigned variable declared on the timeline; it mistakenly reported
that the variable was not declared at all (instead of being declared with an
`undefined` value).

The cause of this issue could be narrowed down to one line of Gnash's debug output (verbosity 2 + action error log):

I have created test flash file (using libming's makeswf) that tries
to assign an `undefined` property on root MovieClip from the main timeline
in various way:

  • Declaring variable on the timeline
  • Declaring variable on the timeline, with `undefined` value assigned
  • Assigning through member operator on `this` instance
  • Assigning through associative array operator on `this` instance

Then test for its existence using `Object.hasOwnProperty()`.

This is a trace output from Adobe Flash Player:

You'd see that all method of assigning `undefined` property work as expected.

This is a trace output from current Gnash:

You'd see that under Gnash, declaring `var undefined_timeline_declared`
on the timeline does not assign the property on root MovieClip,
which is incorrect.

Test Flash file, optional HTML container, source code, build script,
and full debug logs of both cases are attached (undefprop.zip).

Gnash: 0.8.11dev (git f341372 25-Aug-2015)
Adobe Flash Player: 11.2 r202 (11.2.202.491) standalone binary
System: Debian GNU/Linux 7.0 Wheezy i386

Nutchanon Wetchasit <nachanon>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #34760:  undefprop.zip added by nachanon (4KiB - application/zip - Undefined Properties Test Flash file, with source code, and logs)

 

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 nachanon (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 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 02 Feb 2016 10:30:57 AM UTCstrkStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Fri 28 Aug 2015 05:41:12 PM UTCstrkStatusIn Progress=>Ready For Test
    Fri 28 Aug 2015 04:29:37 PM UTCstrkCategorycore=>ActionScript
      StatusNone=>In Progress
      Assigned toNone=>strk
    Fri 28 Aug 2015 01:09:21 PM UTCnachanonAttached File-=>Added undefprop.zip, #34760

    Back to the top


    Powered by Savane 3.1-cleanup1