After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 621233 - Unable to reload plugins
Unable to reload plugins
Status: RESOLVED FIXED
Product: libpeas
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: libpeas-maint
libpeas-maint
Depends on:
Blocks:
 
 
Reported: 2010-06-10 18:54 UTC by L. López
Modified: 2010-07-22 13:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix reloading C plugins. (7.23 KB, patch)
2010-07-22 13:08 UTC, Steve Frécinaux
committed Details | Review

Description L. López 2010-06-10 18:54:44 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.
Comment 1 Bastien Nocera 2010-06-16 12:17:11 UTC
There's no attachment, but I saw the same problem with C loader plugins.
Comment 2 Steve Frécinaux 2010-07-22 12:04:01 UTC
Does it still happen with libpeas master? I'm unable to reproduce it with peas-demo.
Comment 3 Garrett Regier 2010-07-22 12:43:18 UTC
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'

  • #0 g_logv
    at gmessages.c line 544
  • #1 g_log
    at gmessages.c line 568
  • #2 peas_plugin_loader_c_load
    at peas-plugin-loader-c.c line 85
  • #3 peas_plugin_loader_load
    at peas-plugin-loader.c line 65
  • #4 load_plugin
    at peas-engine.c line 740
  • #5 peas_engine_load_plugin_real
    at peas-engine.c line 756
  • #6 g_cclosure_marshal_VOID__BOXED
    at gmarshal.c line 568
  • #7 g_type_class_meta_marshal
    at gclosure.c line 877
  • #8 g_closure_invoke
    at gclosure.c line 766
  • #9 signal_emit_unlocked_R
    at gsignal.c line 3290
  • #10 g_signal_emit_valist
    at gsignal.c line 2983
  • #11 g_signal_emit
    at gsignal.c line 3040
  • #12 peas_engine_load_plugin
    at peas-engine.c line 780
  • #13 peas_ui_plugin_manager_store_set_enabled
    at peas-ui-plugin-manager-store.c line 333
  • #14 peas_ui_plugin_manager_store_toggle_enabled
    at peas-ui-plugin-manager-store.c line 419
  • #15 enabled_toggled_cb
    at peas-ui-plugin-manager-view.c line 187
  • #16 g_cclosure_marshal_VOID__STRING
    at gmarshal.c line 498
  • #17 g_closure_invoke
    at gclosure.c line 766
  • #18 signal_emit_unlocked_R
    at gsignal.c line 3252
  • #19 g_signal_emit_valist
    at gsignal.c line 2983
  • #20 g_signal_emit
    at gsignal.c line 3040
  • #21 gtk_cell_renderer_toggle_activate
    at gtkcellrenderertoggle.c line 416
  • #22 gtk_cell_renderer_activate
    at gtkcellrenderer.c line 650
  • #23 gtk_tree_view_column_cell_process_action
    at gtktreeviewcolumn.c line 2906
  • #24 _gtk_tree_view_column_cell_event
    at gtktreeviewcolumn.c line 3183
  • #25 gtk_tree_view_button_press
    at gtktreeview.c line 2734
  • #26 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 86
  • #27 g_type_class_meta_marshal
    at gclosure.c line 877
  • #28 g_closure_invoke
    at gclosure.c line 766
  • #29 signal_emit_unlocked_R
    at gsignal.c line 3290
  • #30 g_signal_emit_valist
    at gsignal.c line 2993
  • #31 g_signal_emit
    at gsignal.c line 3040
  • #32 gtk_widget_event_internal
    at gtkwidget.c line 4937
  • #33 gtk_widget_event
    at gtkwidget.c line 4734
  • #34 gtk_propagate_event
    at gtkmain.c line 2412
  • #35 gtk_main_do_event
    at gtkmain.c line 1595
  • #36 gdk_event_source_dispatch
    at gdkeventsource.c line 302
  • #37 g_main_dispatch
    at gmain.c line 2119
  • #38 g_main_context_dispatch
    at gmain.c line 2672
  • #39 g_main_context_iterate
    at gmain.c line 2750
  • #40 g_main_loop_run
    at gmain.c line 2958
  • #41 gtk_main
    at gtkmain.c line 1202
  • #42 main
    at peas-demo.c line 177

Comment 4 Steve Frécinaux 2010-07-22 13:08:11 UTC
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.
Comment 5 Steve Frécinaux 2010-07-22 13:11:33 UTC
Attachment 166387 [details] pushed as feb6e7b - Fix reloading C plugins.