bugGnash - The GNU Flash player - Bugs: bug #46115, Gnash doesn't always terminate...

 
 

bug #46115: Gnash doesn't always terminate lines when sending message to host container

Submitter:  Nutchanon Wetchasit <nachanon>
Submitted:  Sat 03 Oct 2015 05:03:44 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

Sat 19 Dec 2015 08:49:22 AM UTC, comment #9: 

Yes, this should be marked as closed.

For the `jstimeline.tar.gz` test, I'll file a separate patch entry
for it when it is made to be included in the testsuite.

Nutchanon Wetchasit <nachanon>
Wed 16 Dec 2015 04:52:59 PM UTC, comment #8: 

Thanks for testing Nutchanon, the patch is applied so can we close this ticket now ?

Sandro Santilli <strk>
Group Member
Wed 16 Dec 2015 03:56:39 PM UTC, comment #7: 

For other variants of Gnash plugin like Konqueror/Klash and Win32 NPAPI,
I have briefly checked the corresponding source code and found that those
don't seem to support unix socket-based player-container communication,
thus unaffected by this change.

Nutchanon Wetchasit <nachanon>
Wed 16 Dec 2015 03:51:29 PM UTC, comment #6: 

I also wrote additional test on plugin's timeline functions like
`PercentLoaded()`, `IsPlaying()`, and `TotalFrames()`, attached as
`jstimeline.tar.gz` which could be tested against Flash Player at
JavaScript level too:

`jstimeline-testrunner.html` on browser with Gnash (before applying patch):

PASSED: Gnash should return a correct type from PercentLoaded call
PASSED: Gnash should return a correct value from PercentLoaded call
PASSED: Gnash should return a correct type from TotalFrames call
PASSED: Gnash should return a correct value from TotalFrames call
PASSED: Gnash should return a correct type from IsPlaying call
PASSED: Gnash should return a correct value from IsPlaying call


`jstimeline-testrunner.html` on browser with Gnash (after applied patch):

PASSED: Gnash should return a correct type from PercentLoaded call
PASSED: Gnash should return a correct value from PercentLoaded call
PASSED: Gnash should return a correct type from TotalFrames call
PASSED: Gnash should return a correct value from TotalFrames call
PASSED: Gnash should return a correct type from IsPlaying call
PASSED: Gnash should return a correct value from IsPlaying call


`jstimeline-testrunner.html` on browser with Flash Player:

PASSED: Gnash should return a correct type from PercentLoaded call
PASSED: Gnash should return a correct value from PercentLoaded call
PASSED: Gnash should return a correct type from TotalFrames call
PASSED: Gnash should return a correct value from TotalFrames call
PASSED: Gnash should return a correct type from IsPlaying call
PASSED: Gnash should return a correct value from IsPlaying call


You'd see that all gave identical result.

Each test result, screenshots, and applicable container-player communication
logs are attached in `newlinepatch-roundup.95763ce-45b945d.zip`
as a reference.

Note: `jstimeline.tar.gz` also include an container-emulating automated test
that works similarly to `extcommtests-runner`.

Gnash: 0.8.11dev (git 95763ce 8-Dec-2015 and git 45b945d 15-Dec-2015) NPAPI
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


(file #35763)

Nutchanon Wetchasit <nachanon>
Wed 16 Dec 2015 03:49:48 PM UTC, comment #5: 

Follow up from mailing list discussion
http://lists.gnu.org/archive/html/gnash-commit/2015-12/msg00043.html
http://lists.gnu.org/archive/html/gnash-commit/2015-12/msg00052.html

In case of compatibility concern, there are HTML-based test runner for
ExternalInterface and `GetVariable()` plugin function included in
bug #37223's `js2flash-auto-v2.tar.gz` (file #35071), and bug #42395's
`extgetvariable-auto.tar.gz` (file #35743) that could be used for checking
relevent behavior against proprietary Flash Player at JavaScript level.

For this case, Gnash (NPAPI libgnashplugin) before patching, after patching,
and Flash Player give all identical result:

`js2flash-testrunner.html` on browser with Gnash (before applying patch):

PASSED: Gnash should properly register an ExternalInterface callback
PASSED: Gnash should return a correct value from ExternalInterface callback


`js2flash-testrunner.html` on browser with Gnash (after applied patch):

PASSED: Gnash should properly register an ExternalInterface callback
PASSED: Gnash should return a correct value from ExternalInterface callback


`js2flash-testrunner.html` on browser with Flash Player:

PASSED: Gnash should properly register an ExternalInterface callback
PASSED: Gnash should return a correct value from ExternalInterface callback


`extgetvariable-testrunner.html` on browser with Gnash (before applying patch):

PASSED: Gnash should return a correct type from GetVariable call on string
PASSED: Gnash should return a correct value from GetVariable call on string
PASSED: Gnash should return a correct type from GetVariable call on integer
PASSED: Gnash should return a correct value from GetVariable call on integer
PASSED: Gnash should return a correct type from GetVariable call on floating point
PASSED: Gnash should return a correct value from GetVariable call on floating point
PASSED: Gnash should return a correct type from GetVariable call on infinity floating point
PASSED: Gnash should return a correct value from GetVariable call on infinity floating point
PASSED: Gnash should return a correct type from GetVariable call on negative infinity floating point
PASSED: Gnash should return a correct value from GetVariable call on negative infinity floating point
PASSED: Gnash should return a correct type from GetVariable call on non-number floating point
PASSED: Gnash should return a correct value from GetVariable call on non-number floating point
PASSED: Gnash should return a correct type from GetVariable call on boolean
PASSED: Gnash should return a correct value from GetVariable call on boolean
PASSED: Gnash should return a correct type from GetVariable call on null
PASSED: Gnash should return a correct value from GetVariable call on null
PASSED: Gnash should return a correct type from GetVariable call on unassigned variable
PASSED: Gnash should return a correct value from GetVariable call on unassigned variable
PASSED: Gnash should return a correct type from GetVariable call on variable with undefined value
PASSED: Gnash should return a correct value from GetVariable call on variable with undefined value
PASSED: Gnash should return a correct type from GetVariable call on non-existent variable
PASSED: Gnash should return a correct value from GetVariable call on non-existent variable
PASSED: Gnash should return a correct type from GetVariable call on array variable
PASSED: Gnash should return a correct value from GetVariable call on array variable
PASSED: Gnash should return a correct type from GetVariable call on object variable
PASSED: Gnash should return a correct value from GetVariable call on object variable
PASSED: Gnash should return a correct type from GetVariable call on object variable with custom toString()
PASSED: Gnash should return a correct value from GetVariable call on object variable with custom toString()
PASSED: Gnash should return a correct type from GetVariable call on function variable
PASSED: Gnash should return a correct value from GetVariable call on function variable


`extgetvariable-testrunner.html` on browser with Gnash (after applied patch):

PASSED: Gnash should return a correct type from GetVariable call on string
PASSED: Gnash should return a correct value from GetVariable call on string
PASSED: Gnash should return a correct type from GetVariable call on integer
PASSED: Gnash should return a correct value from GetVariable call on integer
PASSED: Gnash should return a correct type from GetVariable call on floating point
PASSED: Gnash should return a correct value from GetVariable call on floating point
PASSED: Gnash should return a correct type from GetVariable call on infinity floating point
PASSED: Gnash should return a correct value from GetVariable call on infinity floating point
PASSED: Gnash should return a correct type from GetVariable call on negative infinity floating point
PASSED: Gnash should return a correct value from GetVariable call on negative infinity floating point
PASSED: Gnash should return a correct type from GetVariable call on non-number floating point
PASSED: Gnash should return a correct value from GetVariable call on non-number floating point
PASSED: Gnash should return a correct type from GetVariable call on boolean
PASSED: Gnash should return a correct value from GetVariable call on boolean
PASSED: Gnash should return a correct type from GetVariable call on null
PASSED: Gnash should return a correct value from GetVariable call on null
PASSED: Gnash should return a correct type from GetVariable call on unassigned variable
PASSED: Gnash should return a correct value from GetVariable call on unassigned variable
PASSED: Gnash should return a correct type from GetVariable call on variable with undefined value
PASSED: Gnash should return a correct value from GetVariable call on variable with undefined value
PASSED: Gnash should return a correct type from GetVariable call on non-existent variable
PASSED: Gnash should return a correct value from GetVariable call on non-existent variable
PASSED: Gnash should return a correct type from GetVariable call on array variable
PASSED: Gnash should return a correct value from GetVariable call on array variable
PASSED: Gnash should return a correct type from GetVariable call on object variable
PASSED: Gnash should return a correct value from GetVariable call on object variable
PASSED: Gnash should return a correct type from GetVariable call on object variable with custom toString()
PASSED: Gnash should return a correct value from GetVariable call on object variable with custom toString()
PASSED: Gnash should return a correct type from GetVariable call on function variable
PASSED: Gnash should return a correct value from GetVariable call on function variable


`extgetvariable-testrunner.html` on browser with Flash Player:

PASSED: Gnash should return a correct type from GetVariable call on string
PASSED: Gnash should return a correct value from GetVariable call on string
PASSED: Gnash should return a correct type from GetVariable call on integer
PASSED: Gnash should return a correct value from GetVariable call on integer
PASSED: Gnash should return a correct type from GetVariable call on floating point
PASSED: Gnash should return a correct value from GetVariable call on floating point
PASSED: Gnash should return a correct type from GetVariable call on infinity floating point
PASSED: Gnash should return a correct value from GetVariable call on infinity floating point
PASSED: Gnash should return a correct type from GetVariable call on negative infinity floating point
PASSED: Gnash should return a correct value from GetVariable call on negative infinity floating point
PASSED: Gnash should return a correct type from GetVariable call on non-number floating point
PASSED: Gnash should return a correct value from GetVariable call on non-number floating point
PASSED: Gnash should return a correct type from GetVariable call on boolean
PASSED: Gnash should return a correct value from GetVariable call on boolean
PASSED: Gnash should return a correct type from GetVariable call on null
PASSED: Gnash should return a correct value from GetVariable call on null
PASSED: Gnash should return a correct type from GetVariable call on unassigned variable
PASSED: Gnash should return a correct value from GetVariable call on unassigned variable
PASSED: Gnash should return a correct type from GetVariable call on variable with undefined value
PASSED: Gnash should return a correct value from GetVariable call on variable with undefined value
PASSED: Gnash should return a correct type from GetVariable call on non-existent variable
PASSED: Gnash should return a correct value from GetVariable call on non-existent variable
PASSED: Gnash should return a correct type from GetVariable call on array variable
PASSED: Gnash should return a correct value from GetVariable call on array variable
PASSED: Gnash should return a correct type from GetVariable call on object variable
PASSED: Gnash should return a correct value from GetVariable call on object variable
PASSED: Gnash should return a correct type from GetVariable call on object variable with custom toString()
PASSED: Gnash should return a correct value from GetVariable call on object variable with custom toString()
PASSED: Gnash should return a correct type from GetVariable call on function variable
PASSED: Gnash should return a correct value from GetVariable call on function variable


Gnash: 0.8.11dev (git 95763ce 8-Dec-2015 and git 45b945d 15-Dec-2015) NPAPI
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>
Tue 15 Dec 2015 07:26:43 AM UTC, comment #4: 

patch #8758 applied.

Sandro Santilli <strk>
Group Member
Mon 05 Oct 2015 02:13:16 PM UTC, comment #3: 

For the `ExternalInterface.call()` return value issue mentioned in comment 1,
it is now posted as a separate entry: see bug #46131

Nutchanon Wetchasit <nachanon>
Mon 05 Oct 2015 07:17:23 AM UTC, comment #2: 

Patch included: see patch #8758

Compare and contrast:

Player-to-plugin communication log on `hostcommtest.html` *before* patching:
(`hostcommtest_gnash0.8.11dev-f0f66ce.toplugin.log` in `hostcommtest.zip`)

<invoke name="addMethod" returntype="xml"><arguments><string>flash_function</string></arguments></invoke>
<invoke name="script_function" returntype="xml"><arguments><string>script_function</string><string>Hello</string><string>World!</string></arguments></invoke>
<invoke name="getURL" returntype="xml"><arguments><string>http://www.gnu.org/</string><string>GET</string><string>_blank</string></arguments></invoke>
<invoke name="getURL" returntype="xml"><arguments><string>http://savannah.gnu.org/</string><string>GET</string><string>_blank</string></arguments></invoke>
<invoke name="fsCommand" returntype="xml"><arguments><string>lorem</string><string>ipsum</string></arguments></invoke>
<string>over a lazy dog.</string><string>Hello there?</string><true/><number>100</number><number>4</number>


Player-to-plugin communication log on `hostcommtest.html` *after* patching:

<invoke name="addMethod" returntype="xml"><arguments><string>flash_function</string></arguments></invoke>
<invoke name="script_function" returntype="xml"><arguments><string>script_function</string><string>Hello</string><string>World!</string></arguments></invoke>
<invoke name="getURL" returntype="xml"><arguments><string>http://www.gnu.org/</string><string>GET</string><string>_blank</string></arguments></invoke>
<invoke name="getURL" returntype="xml"><arguments><string>http://savannah.gnu.org/</string><string>GET</string><string>_blank</string></arguments></invoke>
<invoke name="fsCommand" returntype="xml"><arguments><string>lorem</string><string>ipsum</string></arguments></invoke>
<string>over a lazy dog.</string>
<string>Hello there?</string>
<true/>
<number>100</number>
<number>4</number>


You'd see that after patching, each return value have its own line.

Gnash: Gnash 0.8.11dev (patched against git f0f66ce 23-Sep-2015) NPAPI
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386

Nutchanon Wetchasit <nachanon>
Sun 04 Oct 2015 04:47:07 PM UTC, comment #1: 

I have done tests with more plugin functions, and found that:


I have made a test Flash file (using SWFC and MTASC) with HTML container
that tries to use all mentioned functionality, and also captured pipe
communication logs between NPAPI libgnashplugin and `gtk-gnash`, debug logs,
screen shots for reference; see the attached `hostcommtest.zip`.

Side note: There seems to be an additional problem in Gnash's implementation
of `ExternalInterface.call()` as it did not pass return value properly.
(See Gnash debug log file, at "JavaScript function returned" line)

Gnash: Gnash 0.8.11dev (git f0f66ce 23-Sep-2015) NPAPI
System: Debian GNU/Linux 7.0 Wheezy i386


(file #35060)

Nutchanon Wetchasit <nachanon>
Sat 03 Oct 2015 05:03:44 PM UTC, original submission:  

This is a spin-off from bug #37223 (ExternalInterface callback issue).
It it kind of a cosmetic issue, but affects on how automated tests could be written.

Current version of Gnash uses an inconsistent line separation when sending
message to host container (like libgnashplugin), for example:


You may see that all command issued through `ExternalInterface::makeInvoke()`
have newline, but return values (which didn't use `makeInvoke()`)
do not have it.

These inconsistency does not affect NPAPI libgnashplugin.
But if fixed, it will make a devlopment of container emulation-based
automated test easier as the conversation could be read by line boundary.
(Currently, test runner would need to employ an XML-like parser)

Gnash: 0.8.11dev (git f0f66ce 23-Sep-2015) NPAPI
Browser: Iceweasel 10.0.12 (debian)
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 Files:
   
   
Comment:
   

Attached Files
file #35764:  newlinepatch-roundup.95763ce-45b945d.zip added by nachanon (30KiB - application/zip - JavaScript interface test result from Gnash (pre/post-patch) and Flash Player)
file #35763:  jstimeline.tar.gz added by nachanon (16KiB - application/x-gzip - Timeline plugin function manual/automated tester)
file #35060:  hostcommtest.zip added by nachanon (14KiB - application/zip - Test Flash file, with container communication and debug logs)

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2015-12-19 strk StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2015-12-16 nachanon Attached File- Added newlinepatch-roundup.95763ce-45b945d.zip, #35764
    2015-12-16 nachanon Attached File- Added jstimeline.tar.gz, #35763
    2015-12-15 strk StatusNone Ready For Test
        Assigned toNone strk
    2015-10-04 nachanon Attached File- Added hostcommtest.zip, #35060

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code