bugGnash - The GNU Flash player - Bugs: bug #50623, libgnashplugin freezes when SWF...

 
 

bug #50623: libgnashplugin freezes when SWF calls JavaScript function with non-English string parameter

Submitted by:  Nutchanon Wetchasit <nachanon>
Submitted on:  Fri 24 Mar 2017 06:29:37 AM UTC  
 
Category: pluginSeverity: 3 - Normal
Release: masterStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Fri 24 Mar 2017 06:36:33 AM UTC, comment #1:

Gnash's screenshots, browser's text output, Gnash-libgnashplugin communication log, debug output, and GDB backtrace log (captured at the time of GDB attachment to busy `plugin-container` process, and at SIGTERM) are attached as `jsflash-thaistring_gnash0.8.11dev-8a11e60.zip`.

Gnash's behavior summary:

  • JavaScript calls Flash, Thai string parameter: parmeter value is passed and printed correctly.
  • JavaScript calls Flash, Thai string return value: return value is passed and displayed correctly.
  • Flash calls JavaScript, Thai string parameter: libgnashplugin froze, and the call never reached JavaScript.
  • Flash calls JavaScript, Thai string return value: return value is passed and printed correctly.

Side note: there is an excess newline at the end of "Host container communication timed out" error message, which I will submit a separate patch to fix.

Gnash: 0.8.11dev (git 8a11e60 8-Mar-2017) NPAPI
Browser: Iceweasel 10.0.12esr-1 (debian)
Locale: th_TH (system encoding TIS-620)
System: Debian GNU/Linux 7.0 Wheezy i386

(file #40110)

Nutchanon Wetchasit <nachanon>
Fri 24 Mar 2017 06:29:37 AM UTC, original submission:

While I was inspecting a special-character issue in Gnash's ExternalInterface implementation, I got curious of how well Gnash handle ExternalInterface string data outside US-ASCII code points.

So, I wrote a dummy Flash-calls-JavaScript ExternalInterface test that tries to pass string with Thai characters as call's parameter for JavaScript to display; attached as `flash2js-thaiarg.html` in `jsflash-thaistring.zip`.

This test gives correct output when run with Flash Player: the string is passed to JavaScript and is correctly displayed on HTML page.

However, when using Gnash, once the HTML is loaded and the SWF file is run...

  • There would be no output on the page.
  • The browser seems to respond slowly.
  • XUL `plugin-container` process would constantly consume 100% of CPU.
  • Once ~10 sec is passed, a message "ERROR: Host container communication timed out" would appear on the console.
  • Things will continue like this until I tried to open a new tab in browser.
  • Once the browser responds, the browser would say that libgnashplugin "crashed".
  • Once the "crash" message appeared, browser's response speed (and CPU usage) would come back to normal.

Despite what browser said, there's no core file dumped. Attaching GDB to a busy `plugin-container` process revealed that it didn't exactly "crashed", but rather "froze" (something like endless loop) until the browser killed it with SIGTERM.

According to Gnash-libgnashplugin communication log, the player side seemed to send Thai string parameter correctly (in UTF-8 encoding), but libgnashplugin sent back nothing (which explains "Host container communication timed out" message). So this is likely libgnashplugin's internal problem, especially how it parsed/converted/forwarded the NPVariant value.

Gnash: 0.8.11dev (git 8a11e60 8-Mar-2017) NPAPI
Flash Player: 11.2.202.491 (NPAPI)
Browser: Iceweasel 10.0.12esr-1 (debian)
Locale: th_TH (system encoding TIS-620)
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 #40110:  jsflash-thaistring_gnash0.8.11dev-8a11e60.zip added by nachanon (21KiB - application/zip - Results of `jsflash-thaistring.zip` tests under Gnash 0.8.11dev git 8a11e60 )
file #40109:  jsflash-thaistring.zip added by nachanon (15KiB - application/zip - Test SWF and HTML files with reference screenshots, text output, and trace log)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 24 Mar 2017 06:36:33 AM UTCnachanonAttached File-=>Added jsflash-thaistring_gnash0.8.11dev-8a11e60.zip, #40110
    Fri 24 Mar 2017 06:29:37 AM UTCnachanonAttached File-=>Added jsflash-thaistring.zip, #40109

    Back to the top


    Powered by Savane 3.1-cleanup1