egg-recent isn't threadsafe



Looking at somewhat mysterious occasional panel crashes when saving
files in gedit, jrb and I discovered today that egg-recent isn't
threadsafe, since it installs a timeout which isn't protected by
GDK_THREADS_ENTER/_LEAVE. 
While the fix is fairly trivial, the fact that it applies to a module
that has been copied all through Gnome makes fixing this a giant code
freeze break. We need release team approval to commit the attached patch
to libegg, and then all apps using egg-recent need to update their
copies. The alternative is unpredictable crashes from all multithreaded
apps using egg-recent (this includes all apps using gnome-vfs + egg-
recent). Not nice. 
This shows again that code sharing is nice for prototyping, but a
disaster for wide adoption; egg-recent really has to find a permanent
home for Gnome 2.10.

Regards, 

Matthias
Index: egg-recent-model.c
===================================================================
RCS file: /cvs/gnome/libegg/libegg/recent-files/egg-recent-model.c,v
retrieving revision 1.28
diff -u -p -r1.28 egg-recent-model.c
--- egg-recent-model.c	6 Aug 2004 17:41:15 -0000	1.28
+++ egg-recent-model.c	4 Sep 2004 04:53:22 -0000
@@ -643,7 +643,11 @@ egg_recent_model_monitor_list (EggRecent
 static gboolean
 egg_recent_model_changed_timeout (EggRecentModel *model)
 {
+	GDK_THREADS_ENTER();
+
 	egg_recent_model_changed (model);
+
+	GDK_THREADS_LEAVE();
 
 	return FALSE;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]