Re: interesting thread problem
- From: Owen Taylor <otaylor redhat com>
- To: Jean-Marc Valin <jean-marc valin hermes usherb ca>
- Cc: Edwin Young <edwin snufkin f9 co uk>, gnome-devel-list gnome org
- Subject: Re: interesting thread problem
- Date: 17 Feb 2000 18:00:20 -0500
Jean-Marc Valin <jean-marc.valin@hermes.usherb.ca> writes:
> I've seen something about a bug in glib that's fixed in CVS but not released
> yet. I've had the same problem and it worked when I applied a simple patch to
> glib. I have posted this patch on my project download page here:
> http://freespeech.on.openprojects.net/FreeSpeech/html/download.html
GLib-1.2.7, which fixes this bug, was released a couple of days ago.
Regards,
Owen
> > I've just managed to convert my app to use a separate worker thread. I
> > think it was worth it, but it wasn't trouble free. I thought I'd share
> > one problem with the list because it had me baffled for a while, though
> > I've worked around it now. It might also count as a bug, though I'm not
> > sure.
> >
> > I had a GnomePropertyBox, which contained a bunch of widgets. Whenever I
> > closed the box (even without doing anything) the program would hang.
> > This was because
> > the widgets attached themselves to the propertybox with the code:
> >
> > gtk_widget_ref(widget)
> > gtk_object_set_data_full(GTK_OBJECT(propertybox), "name", widget,
> > (GtkDestroyNotify) gtk_widget_unref);
> >
> > The problem was that the propertybox, as it destroys itself, calls
> > g_datalist_clear(). That acquires the gdk mutex, then (a few calls down)
> > calls g_datalist_clear() again, and promptly hangs while trying to
> > acquire the mutex.
> >
> > Anyway, the workaround was to use
> >
> > gtk_object_set_data(GTK_OBJECT(propertybox), "name", widget);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]