GNOME Bugzilla – Bug 567840
GIMP's GtkScaleButton conflicts with GTK's
Last modified: 2009-02-12 18:22:01 UTC
While developing a GTK+ module that makes use pygtk, we discovered that Gimp's bundled GtkScaleButton conflicts with GTK+'s, causing some pretty nasty deadlocks. Essentially what happens is that while initializing pygtk (or making use of GtkScaleButton at all in the module), a GType is registered with the name "GtkScaleButton". Then, while Gimp is loading, it attempts to create its own bundled GtkScaleButton, reusing the same GType name. This errors out, and in the end, causes a deadlock inside the GOnce code in gimp_gtk_scale_button_get_type(). The reverse appears to be true. If we delay any access to pygtk or a GtkScaleButton creation until well after Gimp is loaded, we hit the same issue, but in GTK's gtk_scale_button_get_type(). It seems that setting GimpGtkScaleButton as the GType name in app/widgets/gtkscalebutton.c would fix this.
Eek, I didn't think of gtk modules when copying this. Obviously making sure that nothing in GIMP uses a real GtkScaleButton is not enough. Will look into this asap.
Fixed in both branches: 2009-02-12 Michael Natterer <mitch@gimp.org> Bug 567840 – GIMP's GtkScaleButton conflicts with GTK's * app/widgets/gtkscalebutton.c: rename the type to "GimpGtkScaleButton" so we don't crash if the real GtkScaleButton type is registered too.