bugGnash - The GNU Flash player - Bugs: bug #50393, `undefined` FSCommand parameter is...

 
 

bug #50393: `undefined` FSCommand parameter is not correctly passed to host container

Submitter:  Nutchanon Wetchasit <nachanon>
Submitted:  Fri 24 Feb 2017 02:52:50 PM UTC
   
 
Category:  core Severity:  3 - Normal
Release:  master Status:  Fixed
Privacy:  Public Assigned to:  strk
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 30 Mar 2017 07:59:11 AM UTC, comment #11: 

The issue of "<>" string handling in libgnashplugin-Gnash communication is now tracked separately as bug #50677.

Nutchanon Wetchasit <nachanon>
Sat 11 Mar 2017 03:56:25 PM UTC, comment #10: 

Ok, thanks for clarification. Closing this then and looking forward to your next ticket / patch :)

Sandro Santilli <strk>
Group Member
Sat 11 Mar 2017 02:48:11 PM UTC, comment #9: 

Clarification of comment 8 regarding XFAILED tests, which I misphrased- they are not really identical:

There are two categories of XFAILED at the end of bug #46944:

  • XFAILED caused by `undefined` target and `MovieClip.getURL()`.
    • 1 XFAILED per SWF version in emulated container mode.
    • 1 XFAILED per SWF version in HTML mode.
  • XFAILED caused by "<>" handling in libgnashplugin-Gnash communication.
    • 1 XFAILED per SWF version in emulated container mode.
    • 2 XFAILED and 2 missed tests per SWF version in HTML mode.


The first category is completely fixed by patch #9279 of this bug.

The second category, however, changed into...

  • XFAILED caused by "<>" handling in libgnashplugin-Gnash communication.
    • 2 XFAILED per SWF version in emulated container mode: 1 more XFAILED, due to plain `getURL()` being added to the test.
    • 3 XFAILED and 4 missed test per SWF version in HTML mode: 1 more XFAILED and 2 more missed tests, due to plain `getURL()` being added to the test.


These are the remaining XFAILED in the related automated tests, which are due to different problem (which didn't have a dedicated bug entry yet).

Nutchanon Wetchasit <nachanon>
Sat 11 Mar 2017 02:09:55 PM UTC, comment #8: 

For the second part of comment 5, it describes automated tests result obtained from Gnash testsuite (*Testsuite runs* of current version...).

According to this result, Gnash exhibit the same XFAILEDs+missing checks as ones noted in bug #46944; which I haven't open a dedicated bug entry for it yet.

Gnash: 0.8.11dev (git 8a11e60 8-Mar-2017)
Flash Player: 11.2.202.491 (NPAPI binary)
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386

Nutchanon Wetchasit <nachanon>
Sat 11 Mar 2017 02:08:10 PM UTC, comment #7: 

Well, in comment 5, I ran two kinds of tests on both players:

  • Manual tests, a.k.a. `geturl-targettest.zip`.
  • Automated tests, a.k.a. `hostcmd_testrunner_v*`, `hostcmd_htmltest_v*.html` and `hostcmd-geturl_testrunner_v*`.


The first paragraph in comment 5 describes result from manual tests (...running all HTML files in `geturl-targettest.zip` with identical result...): which Gnash, of course, yield result identical to Flash Player.

Full manual test results (originally omitted from comment 5) are as follows...

When testing Gnash with SWF version 5:

  • getURL("loaded.html",undefined): The main page redirected to "loaded.html".
  • getURL("loaded.html",null): File "loaded.html" got loaded into a frame named "null".
  • getURL("loaded.html",""): The main page redirected to "loaded.html".
  • getURL("loaded.html"): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html",undefined): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html",null): File "loaded.html" got loaded into a frame named "null".
  • MovieClip.getURL("loaded.html",""): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html"): The main page redirected to "loaded.html".


When testing Gnash with SWF version 6:

  • getURL("loaded.html",undefined): The main page redirected to "loaded.html".
  • getURL("loaded.html",null): File "loaded.html" got loaded into a frame named "null".
  • getURL("loaded.html",""): The main page redirected to "loaded.html".
  • getURL("loaded.html"): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html",undefined): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html",null): File "loaded.html" got loaded into a frame named "null".
  • MovieClip.getURL("loaded.html",""): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html"): The main page redirected to "loaded.html".


When testing Gnash with SWF version 7:

  • getURL("loaded.html",undefined): File "loaded.html" got loaded into a frame named "undefined".
  • getURL("loaded.html",null): File "loaded.html" got loaded into a frame named "null".
  • getURL("loaded.html",""): The main page redirected to "loaded.html".
  • getURL("loaded.html"): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html",undefined): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html",null): File "loaded.html" got loaded into a frame named "null".
  • MovieClip.getURL("loaded.html",""): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html"): The main page redirected to "loaded.html".


When testing Gnash with SWF version 8:

  • getURL("loaded.html",undefined): File "loaded.html" got loaded into a frame named "undefined".
  • getURL("loaded.html",null): File "loaded.html" got loaded into a frame named "null".
  • getURL("loaded.html",""): The main page redirected to "loaded.html".
  • getURL("loaded.html"): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html",undefined): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html",null): File "loaded.html" got loaded into a frame named "null".
  • MovieClip.getURL("loaded.html",""): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html"): The main page redirected to "loaded.html".


(You would see that result is the same as one from Flash Player)

Note: The reason I used these manual tests, is to double-check `hostcmd-geturl_testrunner_v*`'s behavior, as it does not have a semi-automatic HTML counterpart.

Hope this clear things up.

Gnash: 0.8.11dev (git 8a11e60 8-Mar-2017)
Flash Player: 11.2.202.491 (NPAPI binary)
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386

Nutchanon Wetchasit <nachanon>
Sat 11 Mar 2017 09:10:03 AM UTC, comment #6: 

Sorry I'm confused. You say that Gnash runs HTML files with identical result to the Flash Player but then in your report I see different numbers, what's the deal ? Are you only reporting previous runs and not including current run ?

Sandro Santilli <strk>
Group Member
Sat 11 Mar 2017 03:05:03 AM UTC, comment #5: 

Current git version of Gnash is now running all HTML files in `geturl-targettest.zip` with result identical to Flash Player. This bug could now be marked as fixed.

Testsuite runs of current version are summarized as follows...

  • Gnash, out of the box:
    • hostcmd_testrunner_v5: 34 PASSED, 2 XFAILED, 36 total
    • hostcmd_testrunner_v6: 34 PASSED, 2 XFAILED, 36 total
    • hostcmd_testrunner_v7: 34 PASSED, 2 XFAILED, 36 total
    • hostcmd_testrunner_v8: 34 PASSED, 2 XFAILED, 36 total
    • hostcmd_htmltest_v5.html: 93 PASSED, 3 XFAILED, 96 total
    • hostcmd_htmltest_v6.html: 93 PASSED, 3 XFAILED, 96 total
    • hostcmd_htmltest_v7.html: 93 PASSED, 3 XFAILED, 96 total
    • hostcmd_htmltest_v8.html: 93 PASSED, 3 XFAILED, 96 total
    • hostcmd-geturl_testrunner_v4: 3 PASSED, 3 total
    • hostcmd-geturl_testrunner_v5: 10 PASSED, 10 total
    • hostcmd-geturl_testrunner_v6: 10 PASSED, 10 total
    • hostcmd-geturl_testrunner_v7: 10 PASSED, 10 total
    • hostcmd-geturl_testrunner_v8: 10 PASSED, 10 total
  • Gnash, with fix part of commit 836df7f and 5dcfebd reverted:
    • hostcmd_testrunner_v5: 32 PASSED, 2 XFAILED, 2 FAILED, 36 total
    • hostcmd_testrunner_v6: 32 PASSED, 2 XFAILED, 2 FAILED, 36 total
    • hostcmd_testrunner_v7: 31 PASSED, 2 XFAILED, 3 FAILED, 36 total
    • hostcmd_testrunner_v8: 31 PASSED, 2 XFAILED, 3 FAILED, 36 total
    • hostcmd_htmltest_v5.html: 91 PASSED, 3 XFAILED, 2 FAILED, 96 total
    • hostcmd_htmltest_v6.html: 91 PASSED, 3 XFAILED, 2 FAILED, 96 total
    • hostcmd_htmltest_v7.html: 90 PASSED, 3 XFAILED, 3 FAILED, 96 total
    • hostcmd_htmltest_v8.html: 90 PASSED, 3 XFAILED, 3 FAILED, 96 total
    • hostcmd-geturl_testrunner_v4: 3 PASSED, 3 total
    • hostcmd-geturl_testrunner_v5: 8 PASSED, 2 FAILED, 10 total
    • hostcmd-geturl_testrunner_v6: 8 PASSED, 2 FAILED, 10 total
    • hostcmd-geturl_testrunner_v7: 7 PASSED, 3 FAILED, 10 total
    • hostcmd-geturl_testrunner_v8: 7 PASSED, 3 FAILED, 10 total
  • Flash Player:
    • hostcmd_htmltest_v5.html: 93 PASSED, 7 XPASSED, 100 total
    • hostcmd_htmltest_v6.html: 93 PASSED, 7 XPASSED, 100 total
    • hostcmd_htmltest_v7.html: 93 PASSED, 7 XPASSED, 100 total
    • hostcmd_htmltest_v8.html: 93 PASSED, 7 XPASSED, 100 total


(These figures treat "There should be NN tests run" the same as other checks)

Gnash: 0.8.11dev (git 8a11e60 8-Mar-2017)
Flash Player: 11.2.202.491 (NPAPI binary)
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386

Nutchanon Wetchasit <nachanon>
Tue 07 Mar 2017 01:33:11 PM UTC, comment #4: 

All patches in patch #9279 were applied, please do final testing to close this

Sandro Santilli <strk>
Group Member
Sun 05 Mar 2017 12:08:39 PM UTC, comment #3: 

Patch included for both FSCommand and normal getURL usage: see patch #9279.

Gnash: 0.8.11dev (patched against git 144e082 22-Feb-2017)
Adobe Flash Player: 11.2.202.491 (NPAPI binary)
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386

Nutchanon Wetchasit <nachanon>
Fri 03 Mar 2017 11:04:37 AM UTC, comment #2: 

However, under current Gnash...

When testing Gnash with SWF version 5:

  • getURL("loaded.html",undefined): The main page redirected to "loaded.html".
  • getURL("loaded.html",null): The main page redirected to "loaded.html".
  • getURL("loaded.html",""): The main page redirected to "loaded.html".
  • getURL("loaded.html"): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html",undefined): File "loaded.html" got loaded into a frame named "undefined".
  • MovieClip.getURL("loaded.html",null): File "loaded.html" got loaded into a frame named "null".
  • MovieClip.getURL("loaded.html",""): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html"): The main page redirected to "loaded.html".


When testing Gnash with SWF version 6:

  • getURL("loaded.html",undefined): The main page redirected to "loaded.html".
  • getURL("loaded.html",null): The main page redirected to "loaded.html".
  • getURL("loaded.html",""): The main page redirected to "loaded.html".
  • getURL("loaded.html"): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html",undefined): File "loaded.html" got loaded into a frame named "undefined".
  • MovieClip.getURL("loaded.html",null): File "loaded.html" got loaded into a frame named "null".
  • MovieClip.getURL("loaded.html",""): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html"): The main page redirected to "loaded.html".


When testing Gnash with SWF version 7:

  • getURL("loaded.html",undefined): The main page redirected to "loaded.html".
  • getURL("loaded.html",null): The main page redirected to "loaded.html".
  • getURL("loaded.html",""): The main page redirected to "loaded.html".
  • getURL("loaded.html"): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html",undefined): File "loaded.html" got loaded into a frame named "undefined".
  • MovieClip.getURL("loaded.html",null): File "loaded.html" got loaded into a frame named "null".
  • MovieClip.getURL("loaded.html",""): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html"): The main page redirected to "loaded.html".


When testing Gnash with SWF version 8:

  • getURL("loaded.html",undefined): The main page redirected to "loaded.html".
  • getURL("loaded.html",null): The main page redirected to "loaded.html".
  • getURL("loaded.html",""): The main page redirected to "loaded.html".
  • getURL("loaded.html"): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html",undefined): File "loaded.html" got loaded into a frame named "undefined".
  • MovieClip.getURL("loaded.html",null): File "loaded.html" got loaded into a frame named "null".
  • MovieClip.getURL("loaded.html",""): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html"): The main page redirected to "loaded.html".


(Gnash's behavior deviation from Flash Player are hilighted in bold)

Screenshots and debug logs (verbosity 2 + action error logs) are attached as `geturl-targettest_gnash0.8.11dev-144e082.zip`.

Gnash: 0.8.11dev (git 144e082 22-Feb-2017) NPAPI
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386


(file #39883)

Nutchanon Wetchasit <nachanon>
Wed 01 Mar 2017 08:47:22 AM UTC, comment #1: 

Currently, it is not very clear whether `undefined` value treatment behavior of `MovieClip.getURL()` is specific to FSCommand usage or not.

So I conducted tests on how `undefined` and `null` and empty target parameter are treated in normal usage of `getURL(url,target)` and `MovieClip.getURL(url,target)` under Flash Player...

When testing Flash Player with SWF version 5:

  • getURL("loaded.html",undefined): The main page redirected to "loaded.html".
  • getURL("loaded.html",null): File "loaded.html" got loaded into a frame named "null".
  • getURL("loaded.html",""): The main page redirected to "loaded.html".
  • getURL("loaded.html"): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html",undefined): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html",null): File "loaded.html" got loaded into a frame named "null".
  • MovieClip.getURL("loaded.html",""): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html"): The main page redirected to "loaded.html".


When testing Flash Player with SWF version 6:

  • getURL("loaded.html",undefined): The main page redirected to "loaded.html".
  • getURL("loaded.html",null): File "loaded.html" got loaded into a frame named "null".
  • getURL("loaded.html",""): The main page redirected to "loaded.html".
  • getURL("loaded.html"): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html",undefined): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html",null): File "loaded.html" got loaded into a frame named "null".
  • MovieClip.getURL("loaded.html",""): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html"): The main page redirected to "loaded.html".


When testing Flash Player with SWF version 7:

  • getURL("loaded.html",undefined): File "loaded.html" got loaded into a frame named "undefined".
  • getURL("loaded.html",null): File "loaded.html" got loaded into a frame named "null".
  • getURL("loaded.html",""): The main page redirected to "loaded.html".
  • getURL("loaded.html"): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html",undefined): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html",null): File "loaded.html" got loaded into a frame named "null".
  • MovieClip.getURL("loaded.html",""): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html"): The main page redirected to "loaded.html".


When testing Flash Player with SWF version 8:

  • getURL("loaded.html",undefined): File "loaded.html" got loaded into a frame named "undefined".
  • getURL("loaded.html",null): File "loaded.html" got loaded into a frame named "null".
  • getURL("loaded.html",""): The main page redirected to "loaded.html".
  • getURL("loaded.html"): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html",undefined): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html",null): File "loaded.html" got loaded into a frame named "null".
  • MovieClip.getURL("loaded.html",""): The main page redirected to "loaded.html".
  • MovieClip.getURL("loaded.html"): The main page redirected to "loaded.html".


(SWF version-specific results are italicized)

Behavior summary:

  • ActionGetURL2-based `getURL()` uses SWF's string representation of target parameter.
    • This means `undefined` is equivalent to empty string under SWF6-below and "undefined" under SWF7-above.
    • When target is omitted, it works as if target is empty string.
    • When target is an empty string, it works as if target is "_self" (redirecting current frame/tab/window to the specified URL).
  • MovieClip-based `getURL()` do the same things as ActionGetURL2-based one, except...
    • When target is `undefined`, it will work as if target is an empty string, no matter of SWF version.


Test files and screenshots are attached as `geturl-targettest.zip`. Testing on older Flash Player version (e.g. Flash 8) may require JavaScript to be enabled in the browser.

Side notes:

  • If target is non-empty, but denotes an unknown HTML frame, it will work as if the target is "_blank" (opening new tab/window).
  • I haven't test the behavior of empty target V.S. "_top" target yet (when SWF is in a child frame).
  • Writing HTML-based semi-automated tests in this case, could be difficult. (Container-emulated/shell-based one, on the other hand, is pretty simple)


Flash Player: 8.0.42.0 (NPAPI)
Browser: Mozilla Firefox 11.0
System: Microsoft Windows XP Professional SP3


(file #39861)

Nutchanon Wetchasit <nachanon>
Fri 24 Feb 2017 02:52:50 PM UTC, original submission:  

This is a spin-off from bug #46944 (patch #9264 comment 2).

While I was writing automated tests for bug #46944, I found that Flash Player's implementation of `MovieClip.getURL()`-based FSCommand passes the `undefined` command parameter to host container as empty string, no matter of SWF version running.

Gnash, on the other hand, passes it as a string "undefined"; which is incorrect.

Note: This behavior might not be consistent between `MovieClip.getURL()`-based FSCommand and normal `getURL()`-based FSCommand, so additional tests would have to be conducted to clarify the issue (possibly with multiple version of Flash Player).

Gnash: 0.8.11dev (git 144e082 22-Feb-2017)
Adobe Flash Player: 11.2.202.491 (NPAPI binary)
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386

P.S: Automated tests tracking this problem in `MovieClip.getURL()`-based FSCommand are:

  • [https://git.savannah.gnu.org/cgit/gnash.git/tree/testsuite/misc-ming.all/hostcmd_testrunner.sh?id=144e0827072b746b2bedebe39ca8a7e0fb43a455#n235 hostcmd_testrunner_v*]
  • [https://git.savannah.gnu.org/cgit/gnash.git/tree/testsuite/misc-ming.all/hostcmd_htmltest.sh?id=144e0827072b746b2bedebe39ca8a7e0fb43a455#n247 hostcmd_htmltest_v*.html]


Nutchanon Wetchasit <nachanon>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #39883:  geturl-targettest_gnash0.8.11dev-144e082.zip added by nachanon (52KiB - application/zip - Log files and screenshots from Gnash 0.8.11dev git 144e082 running tests in `geturl-targettest.zip`)
file #39861:  geturl-targettest.zip added by nachanon (82KiB - application/zip - Tests on target parameter treatment in `getURL()` and `MovieClip.getURL()` with reference screenshots)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by strk (Posted a comment)
  • -email is unavailable- added by nachanon (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-03-11 strk StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2017-03-07 strk StatusNone Ready For Test
        Assigned toNone strk
    2017-03-03 nachanon Attached File- Added geturl-targettest_gnash0.8.11dev-144e082.zip, #39883
    2017-03-01 nachanon Attached File- Added geturl-targettest.zip, #39861

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code