Hello community, here is the log from the commit of package gtk-sharp2 checked in at Tue May 9 12:20:28 CEST 2006. -------- --- GNOME/gtk-sharp2/gtk-sharp2.changes 2006-02-28 20:20:06.000000000 +0100 +++ STABLE/gtk-sharp2/gtk-sharp2.changes 2006-05-08 22:36:28.000000000 +0200 @@ -1,0 +2,7 @@ +Mon May 8 22:34:24 CEST 2006 - joeshaw@suse.de + +- Add a patch to make GLib.ValueArray actually free in the main + GTK thread rather than the finalizer thread. Fixes deadlocks, + like bnc #168650. + +------------------------------------------------------------------- New: ---- gtk-sharp-valuearray-threadsafety.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gtk-sharp2.spec ++++++ --- /var/tmp/diff_new_pack.o6oSDZ/_old 2006-05-09 12:20:17.000000000 +0200 +++ /var/tmp/diff_new_pack.o6oSDZ/_new 2006-05-09 12:20:17.000000000 +0200 @@ -22,9 +22,10 @@ Group: System/GUI/GNOME Autoreqprov: on Version: 2.8.2 -Release: 1 +Release: 14 Summary: .Net Language Bindings for GTK+ Source: gtk-sharp-%{version}.tar.gz +Patch1: gtk-sharp-valuearray-threadsafety.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -167,6 +168,7 @@ %prep %setup -n gtk-sharp-%{version} +%patch1 %build autoreconf -fi @@ -294,6 +296,10 @@ %dir %{prefix}/lib/gtk-sharp-2.0 %changelog -n gtk-sharp2 +* Mon May 08 2006 - joeshaw@suse.de +- Add a patch to make GLib.ValueArray actually free in the main + GTK thread rather than the finalizer thread. Fixes deadlocks, + like bnc #168650. * Tue Feb 28 2006 - wberrier@suse.de - Update to 2.8.2. Fixes the following bugs: (Ximian) - 77497 ++++++ gtk-sharp-valuearray-threadsafety.patch ++++++ Index: glib/ValueArray.cs =================================================================== --- glib/ValueArray.cs (revision 59424) +++ glib/ValueArray.cs (working copy) @@ -29,6 +29,9 @@ private IntPtr handle = IntPtr.Zero; + static private ArrayList PendingFrees = new ArrayList (); + static private bool idle_queued = false; + [DllImport("libgobject-2.0-0.dll")] static extern IntPtr g_value_array_new (uint n_preallocs); @@ -62,9 +65,35 @@ if (Handle == IntPtr.Zero) return; - g_value_array_free (Handle); + lock (PendingFrees) { + PendingFrees.Add (handle); + + if (! idle_queued) { + Timeout.Add (50, new TimeoutHandler (PerformFrees)); + idle_queued = true; + } + } + handle = IntPtr.Zero; } + + static bool PerformFrees () + { + IntPtr[] handles; + + lock (PendingFrees) { + idle_queued = false; + + handles = new IntPtr [PendingFrees.Count]; + PendingFrees.CopyTo (handles, 0); + PendingFrees.Clear (); + } + + foreach (IntPtr h in handles) + g_value_array_free (h); + + return false; + } public IntPtr Handle { get { ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun...