GNOME Bugzilla – Bug 621233
Unable to reload plugins
Last modified: 2010-07-22 13:11:36 UTC
I'm unable to reload the 'helloworld' plugin, after load and unload it if I try to reload it I get an error and the plugin is disabled. I tried 0.5 tarball and git version. I'm using glib and gtk+ from git master branches and I run this test under "jhbuild shell". A trace with my actions annotated is attached.
There's no attachment, but I saw the same problem with C loader plugins.
Does it still happen with libpeas master? I'm unable to reproduce it with peas-demo.
I do! It happens every time with the demo program (unmodified). To get the stackstrace I changed a g_warning to a g_error (peas-demo:11267): libpeas-WARNING **: libcloader.so: ../loaders/libcloader.so: cannot open shared object file: No such file or directory (peas-demo:11267): GLib-GObject-WARNING **: plugin 'helloworld' failed to register type 'PeasDemoHelloWorldConfigurable' libpeas-ERROR **: Could not load plugin module: 'Hello World'
+ Trace 222961
Created attachment 166387 [details] [review] Fix reloading C plugins. GTypeModule expects all the types to be registered during the g_type_module_use() call. It implies doing the registration within the _load() virtual method, but we did it at a later stage. The warnings (and actual reloading) are fixed by moving the type registration process within the _load() virtual function.
Attachment 166387 [details] pushed as feb6e7b - Fix reloading C plugins.