aboutsummaryrefslogtreecommitdiffstats
path: root/shell/main.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-10-12 13:23:47 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-10-12 13:23:47 +0800
commitac07e6a338f1dba0a4c5a5d044bb58b01e82a211 (patch)
treeb96fd3eea4ace8b534f0bc3404a52117dd990db6 /shell/main.c
parente7ea6195482eac08a8ea3239e7751592324791ef (diff)
downloadgsoc2013-evolution-ac07e6a338f1dba0a4c5a5d044bb58b01e82a211.tar.gz
gsoc2013-evolution-ac07e6a338f1dba0a4c5a5d044bb58b01e82a211.tar.zst
gsoc2013-evolution-ac07e6a338f1dba0a4c5a5d044bb58b01e82a211.zip
[Hopefully really, finally fix #8615 and friends.]
* main.c (no_views_left_cb): Invoke `e_shell_disconnect_db()' before unreffing the shell. * e-shell.c (e_shell_disconnect_db): New. (destroy): Call it instead of unreffing the db manually here. svn path=/trunk/; revision=13616
Diffstat (limited to 'shell/main.c')
-rw-r--r--shell/main.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/shell/main.c b/shell/main.c
index 2308862d4d..401a89d269 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -127,6 +127,29 @@ no_views_left_cb (EShell *shell, gpointer data)
e_shell_unregister_all (shell);
+ /* FIXME: And this is another ugly hack. We have a strange race
+ condition that I cannot work around. What happens is that the
+ EShell object gets unreffed and its aggregate EActivityHandler gets
+ destroyed too. But for some reason, the EActivityHanlder GtkObject
+ gets freed, while its CORBA object counterpart is still an active
+ server. So there is a slight chance that we receive CORBA
+ invocation that act on an uninitialized object, and we crash. (See
+ #8615.)
+
+ The CORBA invocation on the dead object only happens because we
+ ::unref the BonoboConf database server in the ::destroy method of
+ the shell. Since this is a CORBA call, it allows incoming CORBA
+ calls to happen -- and these get invoked on the partially
+ uninitialized object.
+
+ Since I am not 100% sure what the reason for this half-stale object
+ is, I am just going to make sure that no CORBA ops happen in
+ ::destroy... And this is achieved by placing this call here. (If
+ the DB is disconnected, there will be no ::unref of it in
+ ::destroy.) */
+
+ e_shell_disconnect_db (shell);
+
bonobo_object_unref (BONOBO_OBJECT (shell));
if (quit_box != NULL)