GNOME Bugzilla – Bug 737949
GtkApplication instance leaks on exit due to GtkActionMuxer
Last modified: 2015-03-02 14:09:25 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.
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.
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.
+ Trace 234511
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().
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
Pretty sure we won't be 'fixing' this...