Monday, February 2, 2009

Java 6 Combo Box-Gtk bug

Sun Java 6 has a bug that goes way back to November 2007. The problem is with using a combo box in GTK. A workaround is to use the metal look and feel instead and the fix is available only in beta of Java 7. The beta is still unstable so if you're looking for a fix for the bug, you'll have to wait till Java 7 goes RTM. That makes it 15 months and counting for a resolution to the bug.

You can read more about it here and here.

Here's the output I get when running the open-source nText editor with java 6 (1.6.0_10-b33).

nitin@nitin-laptop:~/Desktop$ java -jar nText.jar

(<unknown>:19134): Gtk-WARNING **: Attempting to add a widget with type GtkButton to a GtkComboBoxEntry (need an instance of GtkEntry or of a subclass)

(<unknown>:19134): Gtk-CRITICAL **: gtk_widget_realize: assertion `GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:19134): Gtk-CRITICAL **: gtk_paint_box: assertion `style->depth == gdk_drawable_get_depth (window)' failed

(<unknown>:19134): Gtk-CRITICAL **: gtk_paint_box: assertion `style->depth == gdk_drawable_get_depth (window)' failed

(<unknown>:19134): Gtk-CRITICAL **: gtk_paint_box: assertion `style->depth == gdk_drawable_get_depth (window)' failed

(<unknown>:19134): Gtk-CRITICAL **: gtk_paint_box: assertion `style->depth == gdk_drawable_get_depth (window)' failed


UPDATE: Java 7 is expected to go RTM in early 2010. That's an estimated 27 months before the bugfix is available for production systems :-(

No comments: