Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6472901

GTK Theme change and JTextField can/will crash Java

XMLWordPrintable

    • b03
    • x86
    • solaris_10
    • Verified

        FULL PRODUCT VERSION :
        java version "1.6.0-rc"
        Java(TM) SE Runtime Environment (build 1.6.0-rc-b95)
        Java HotSpot(TM) Client VM (build 1.6.0-rc-b95, mixed mode, sharing)


        ADDITIONAL OS VERSION INFORMATION :
        Solaris

        A DESCRIPTION OF THE PROBLEM :
        When switching themes in GTK and a JTextField is being used, Java can/will crash.

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Run the testcase.
        Begin switching the themes. At some point, maybe early on maybe after a couple of switches java will crash. My most recent attempt at switching themes took only 2 switches to cause the crash.

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        no crash
        ACTUAL -
        a crash

        ERROR MESSAGES/STACK TRACES THAT OCCUR :
        (<unknown>:10076): Gtk-WARNING **: GtkEntry - did not receive focus-out-event. If you
        connect a handler to this signal, it must return
        FALSE so the entry gets the event as well

        Gtk-ERROR **: file gtkentry.c: line 4671: assertion failed: (GTK_WIDGET_HAS_FOCUS (entry))
        aborting...
        zsh: IOT instruction (core dumped) java GTK_JTextField


        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------
        import javax.swing.*;
        import javax.swing.text.*;
        import java.awt.*;
        import java.awt.event.*;

        public class GTK_JTextField implements Runnable{

            public void run(){
                JFrame jf = new JFrame();
                JTextComponent jtf1 = new JTextField(20);
                jf.add(jtf1);
                jf.pack();
                jf.setVisible(true);
            }

            public static void main(String ... args){
                try{
        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
                } catch(Exception x){}
                SwingUtilities.invokeLater(new GTK_JTextField());
            }

        }
        ---------- END SOURCE ----------

        CUSTOMER SUBMITTED WORKAROUND :
        don't change themes.

              stayer Kirill Kirichenko (Inactive)
              ndcosta Nelson Dcosta (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: