Discussion:
[Gnash-commit] [bug #48087] gst_install_plugins_sync may freeze gnash or make too many popups
Dag Hovland
2016-06-02 08:23:14 UTC
Permalink
URL:
<http://savannah.gnu.org/bugs/?48087>

Summary: gst_install_plugins_sync may freeze gnash or make
too many popups
Project: Gnash - The GNU Flash player
Submitted by: daghovland
Submitted on: Thu 02 Jun 2016 08:23:11 AM GMT
Category: video-gst
Severity: 3 - Normal
Release: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any

_______________________________________________________

Details:

This is a follow-up of support https://savannah.gnu.org/support/?109027 and
gnash-dev email conversations on May 26- June 1.

Problems:
- The call to gst_install_plugins_sync in libmedia/gst/GstUtil.cpp will not
return if the plugin installer crashes.
- If the plugin installation is unsuccessful or the user cancels,
gst_install_plugins_sync will be called repeatedly, making the movie
unusable.

Flash file:
http://kids.discovery.com/files/games/pompeii/media/global.swf

OS:
Ubuntu 16.04 (64 bit) without the package gstreamer0.10-ffmpeg installed.

Scenario:
Downloaded the file above, ran gtk-gnash from the commandline with the file.
The plugin installer attempts to install gstreamer0.10-ffmpeg, which is not in
the ubuntu distribution. The plugin installer crashes at this point, which
freezes the whole movie and has to be killed.
If I instead click cancel in the plugin installer dialog, the plugin installer
is just called again and again, making the movie unusable.


Fix in the attached patch
- Changed the call to gst_install_plugins_async, as recommended by the
gstremaer docs.
- Made the movie pause during plugin installation, and resume afterwards. The
user may click "Play" on the screen at any time, e.g. if the installer
crashes.
- Prevented any further install attempts after the user has once clicked
cancel.
- Added dialogs for some of the different return values from the gst plugin
installer: Informing the user about the consequence of plugin installation
errors, and asking the user whether to restart the movie in case of successful
installation.

To do the last part, I had to get hold of a movie_root object, which was not
available in libmedia. I passed the object down all the calls from the classes
in libcore/asobj, where it is available.

If you can use this code, it would be nice. Please tell me if there are issues
or it's better if I send this in some other way.

Questions:
- Is there a better way to get access to movie_root or the gui? (Sandro
Santili suggests using RunResources instead, but that would also have to be
passed down the same path. I think.)
- Do the automatic pausing of the movie during plugin installation, and the
added dialogs fit in the general user experience?

Cheers,

Dag Hovland






_______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 02 Jun 2016 08:23:11 AM GMT Name: pluginasync.patch Size: 31kB
By: daghovland
patch for async gst plugin install
<http://savannah.gnu.org/bugs/download.php?file_id=37350>

_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?48087>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
Dag Hovland
2016-06-02 10:54:31 UTC
Permalink
Follow-up Comment #1, bug #48087 (project gnash):

Just now saw the patches list, so added it there:
patch #9016 <https://savannah.gnu.org/patch/?9016>

_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?48087>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
Dag Hovland
2016-07-25 10:36:36 UTC
Permalink
Follow-up Comment #2, bug #48087 (project gnash):

I think this can be closed now, as [Patch #9016] has been applied

_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?48087>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
Sandro Santilli
2016-07-25 16:04:37 UTC
Permalink
Update of bug #48087 (project gnash):

Release: None => 0.8.10
Status: None => Fixed
Assigned to: None => strk
Open/Closed: Open => Closed

_______________________________________________________

Follow-up Comment #3:

Thanks!

_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?48087>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/

Loading...