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 737949 - GtkApplication instance leaks on exit due to GtkActionMuxer
GtkApplication instance leaks on exit due to GtkActionMuxer
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Class: GtkApplication
3.14.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-10-05 20:12 UTC by Paul Menzel
Modified: 2015-03-02 14:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Paul Menzel 2014-10-05 20:12:20 UTC
With at least Evolution 3.10 whenever Evolution is closed, the following warning is printed in the terminal.

    ** (evolution:18812): WARNING **: Shell not finalized on exit

I just reproduced it with Evolution 3.12.6 and GNOME 3.14.
Comment 1 Milan Crha 2015-01-06 14:10:25 UTC
Thanks for a bug report. I do not recall seeing this with evolution 3.10.x, but 3.12.x+, with combination of GLib 2.42.x and gtk 3.14.x (Fedora 21) prints this warning on evolution's exit too. A related evolution bug is bug #741858.

I suspect that there's a reference counting error in one of these libraries, because simply compiling against GLib and gtk from time of 3.10.x (Fedora 20) doesn't show the warning.
Comment 2 Milan Crha 2015-01-06 15:29:44 UTC
The evolution's EShell has one reference count on exit. This reference count imbalance is caused at the below place, thus I move this to gtk+. The added circular dependency breaks any code which creates its GtkApplication descendant, but doesn't call g_application_run(), but rather quits immediately for whatever reason and also unrefs its reference on the GtkApplication instance, which should free it.

  • #0 g_object_ref
    at gobject.c line 3046
  • #1 gtk_action_muxer_insert
    at gtkactionmuxer.c line 681
  • #2 gtk_application_startup
    at gtkapplication.c line 594
  • #3 shell_startup
    at e-shell.c line 827
  • #4 _g_closure_invoke_va
    at gclosure.c line 831
  • #5 g_signal_emit_valist
    at gsignal.c line 3218
  • #6 g_signal_emit
    at gsignal.c line 3365
  • #7 g_application_register
    at gapplication.c line 1975
  • #8 shell_initable_init
    at e-shell.c line 900
  • #9 g_initable_new_valist
    at ginitable.c line 228
  • #10 g_initable_new
    at ginitable.c line 146
  • #11 create_default_shell
    at main.c line 388
  • #12 main
    at main.c line 580

Comment 3 Matthias Clasen 2015-01-19 01:26:37 UTC
I guess we more or less require that you use g_application_run with GtkApplication, nowadays :-(

As a workaround, you could g_signal_emit_by_name (app, "shutdown") after gtk_main().
Comment 4 Milan Crha 2015-02-02 18:03:03 UTC
I muted the warning for 3.13.90 with [1]. The signal emit seems to work too, but doesn't feel correct. When you'll fix it, it may eventually crash evolution, no?

[1] https://git.gnome.org/browse/evolution/commit/?id=157c1ff
Comment 5 Allison Karlitskaya (desrt) 2015-03-02 05:45:53 UTC
Pretty sure we won't be 'fixing' this...