[webkit-gtk] Handling Plugins and Error scanning plugin

Nicolas Jäger jagernicolas at legtux.org
Tue Jan 20 13:13:36 PST 2015


Hi, I try to make a list of all plugins, I follow this :

«Handling Plugins

To be able to load certain web contents such as Java applets or Flash
scripts we need plugins. We have a class named WebKitPlugin that stores
information about each plugin. If we need to get a list of available
plugins we should call the asyncronous method
webkit_web_context_get_plugins and when the callback function were
executed, use the webkit_web_context_get_plugins_finish method to get a
list of WebKitPlugins.»


this is my (simple) code :

#include <iostream>
#include <gtkmm.h>
#include <webkit2/webkit2.h>

WebKitWebContext * web_context = nullptr;

void
callback(
        )
{
  GList *plugin_list, *p;
  GAsyncResult *result;
  plugin_list = webkit_web_context_get_plugins_finish ( web_context,
result, nullptr );

  for (p = plugin_list; p; p = p->next)
  {
    WebKitPlugin *plugin = WEBKIT_PLUGIN (p->data);
    std::cout << webkit_plugin_get_name (plugin) << std::endl;
  }
}


int main( int argc
        , char **argv
        )
{

  Glib::RefPtr<Gtk::Application> app = Gtk::Application::create( argc,
  argv, "" );

  Gtk::Window window;
  window.set_default_size( 800, 600 );

  WebKitWebView * one =  WEBKIT_WEB_VIEW( webkit_web_view_new() );
  Gtk::Widget * three = Glib::wrap( GTK_WIDGET( one ) );

  window.add( *three );
  webkit_web_view_load_uri(one, "www.google.com");

  web_context =  webkit_web_context_get_default ();
  webkit_web_context_get_plugins (web_context, nullptr,
  (GAsyncReadyCallback)callback, nullptr);

  window.show_all();

  app->run( window );  
  exit( 0 );
}

I got these errors :
Error scanning
plugin /usr/lib/mozilla/plugins/gecko-mediaplayer-dvx.so, /usr/lib/webkit2gtk-4.0/WebKitPluginProcess
returned 256 exit status Error scanning
plugin /usr/lib/mozilla/plugins/gecko-mediaplayer-qt.so, /usr/lib/webkit2gtk-4.0/WebKitPluginProcess
returned 256 exit status Error scanning
plugin /usr/lib/mozilla/plugins/gecko-mediaplayer-rm.so, /usr/lib/webkit2gtk-4.0/WebKitPluginProcess
returned 256 exit status Error scanning
plugin /usr/lib/mozilla/plugins/mozplugger.so, /usr/lib/webkit2gtk-4.0/WebKitPluginProcess
returned 256 exit status segmentation fault (core dumped)

the problem seems to come from
`webkit_web_context_get_plugins_finish()` . I ask myself if it's about
a problem of file owner.

independently of this problem, if I remove everything from my code
about plugins, when I go on a site such youtube I got the same errors
than above.

regards,
/nicoo


More information about the webkit-gtk mailing list