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 654043 - Snippet plugin causes gedit to crash on exit
Snippet plugin causes gedit to crash on exit
Status: RESOLVED FIXED
Product: gedit-plugins
Classification: Other
Component: General
git master
Other Linux
: Normal critical
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2011-07-05 19:11 UTC by Sebastian Pölsterl
Modified: 2019-03-23 20:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix issue by disconnect from bus first (2.07 KB, patch)
2011-08-14 19:23 UTC, Sebastian Pölsterl
committed Details | Review

Description Sebastian Pölsterl 2011-07-05 19:11:45 UTC
If the snippet plugin is enabled gedit crashes every time when it exits. I'm using gedit 3.0.6 on Fedora 15.

  • #0 raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 64
  • #1 abort
    at abort.c line 93
  • #2 Py_FatalError
    at /usr/src/debug/Python-2.7.1/Python/pythonrun.c line 1678
  • #3 PyEval_SaveThread
    at /usr/src/debug/Python-2.7.1/Python/ceval.c line 345
  • #4 pygobject_clear
    at pygobject.c line 1143
  • #5 pygobject_dealloc
    at pygobject.c line 1054
  • #6 subtype_dealloc
    at /usr/src/debug/Python-2.7.1/Objects/typeobject.c line 1005
  • #7 dict_dealloc
    at /usr/src/debug/Python-2.7.1/Objects/dictobject.c line 985
  • #8 pygobject_clear
    at pygobject.c line 1149
  • #9 pygobject_dealloc
    at pygobject.c line 1054
  • #10 subtype_dealloc
    at /usr/src/debug/Python-2.7.1/Objects/typeobject.c line 1005
  • #11 instancemethod_dealloc
    at /usr/src/debug/Python-2.7.1/Objects/classobject.c line 2364
  • #12 _pygi_invoke_closure_free
    at pygi-closure.c line 397
  • #13 ffi_closure_unix64_inner
    at src/x86/ffi64.c line 563
  • #14 ffi_closure_unix64
    at src/x86/unix64.S line 228
  • #15 ??
  • #16 g_list_foreach
    at glist.c line 938
  • #17 g_list_free_full
    at glist.c line 217
  • #18 ??
  • #19 g_hash_table_remove_all_nodes
    at ghash.c line 492
  • #20 g_hash_table_remove_all
    at ghash.c line 1167
  • #21 g_hash_table_destroy
    at ghash.c line 874
  • #22 ??
  • #23 g_object_unref
    at gobject.c line 2734
  • #24 ??
  • #25 g_object_run_dispose
    at gobject.c line 945
  • #26 _start
  • #0 raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 64
  • #1 abort
    at abort.c line 93
  • #2 Py_FatalError
    at /usr/src/debug/Python-2.7.1/Python/pythonrun.c line 1678
  • #3 PyEval_SaveThread
    at /usr/src/debug/Python-2.7.1/Python/ceval.c line 345
  • #4 pygobject_clear
    at pygobject.c line 1143
  • #5 pygobject_dealloc
    at pygobject.c line 1054
  • #6 subtype_dealloc
    at /usr/src/debug/Python-2.7.1/Objects/typeobject.c line 1005
  • #7 dict_dealloc
    at /usr/src/debug/Python-2.7.1/Objects/dictobject.c line 985
  • #8 pygobject_clear
    at pygobject.c line 1149
  • #9 pygobject_dealloc
    at pygobject.c line 1054
  • #10 subtype_dealloc
    at /usr/src/debug/Python-2.7.1/Objects/typeobject.c line 1005
  • #11 instancemethod_dealloc
    at /usr/src/debug/Python-2.7.1/Objects/classobject.c line 2364
  • #12 _pygi_invoke_closure_free
    at pygi-closure.c line 397
  • #13 ffi_closure_unix64_inner
    at src/x86/ffi64.c line 563
  • #14 ffi_closure_unix64
    at src/x86/unix64.S line 228
  • #15 listener_free
    at gedit-message-bus.c line 226
  • #16 g_list_foreach
    at glist.c line 938
  • #17 g_list_free_full
    at glist.c line 217
  • #18 message_free
    at gedit-message-bus.c line 237
  • #19 g_hash_table_remove_all_nodes
    at ghash.c line 492
  • #20 g_hash_table_remove_all
    at ghash.c line 1167
  • #21 g_hash_table_destroy
    at ghash.c line 874
  • #22 gedit_message_bus_finalize
    at gedit-message-bus.c line 259
  • #23 g_object_unref
    at gobject.c line 2734
  • #24 gedit_window_dispose
    at gedit-window.c line 311
  • #25 g_object_run_dispose
    at gobject.c line 945
  • #26 window_delete_event
    at gedit-app.c line 609
  • #27 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 85
  • #28 g_closure_invoke
    at gclosure.c line 767
  • #29 signal_emit_unlocked_R
    at gsignal.c line 3252
  • #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 6114
  • #33 gtk_main_do_event
    at gtkmain.c line 1774
  • #34 gdk_event_source_dispatch
    at gdkeventsource.c line 318
  • #35 g_main_dispatch
    at gmain.c line 2441
  • #36 g_main_context_dispatch
    at gmain.c line 3014
  • #37 g_main_context_iterate
    at gmain.c line 3092
  • #38 g_main_loop_run
    at gmain.c line 3300
  • #39 gtk_main
    at gtkmain.c line 1358
  • #40 gedit_main
    at gedit.c line 199
  • #41 main
    at gedit.c line 290

Comment 1 Ignacio Casal Quinteiro (nacho) 2011-07-05 23:18:56 UTC
As you can see in the bt this is not a problem in gedit but a problem in pygobject.
Comment 2 Sebastian Pölsterl 2011-08-14 19:23:53 UTC
Created attachment 193827 [details] [review]
Fix issue by disconnect from bus first

As a matter of fact this issue is caused gedit.

In do_deactivate you only call bus.unregister but not bus.disconnect. Therefore, the bus still thinks the plugin is listening and tries to free it, but it's already gone. The attached patch fixes this issue.
Comment 3 Ignacio Casal Quinteiro (nacho) 2011-08-14 19:25:41 UTC
Review of attachment 193827 [details] [review]:

It looks good.