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

Pressing PageUp on the JComboBox causes StackOverflowError.

    Details

    • Subcomponent:
    • Resolved In Build:
      beta2
    • CPU:
      generic, x86, sparc
    • OS:
      generic, linux, solaris_7, windows_98
    • Verification:
      Verified

      Description



      Name: asR10013 Date: 05/16/2001



      JDK : 1.4.0-b64
      Platform[s] : RedHat Linux 6.2, Windows 98

      Pressing PageUp or PageDown on the JComboBox causes java.lang.StackOverflowError.
      The StackOverflowError is thrown only if combobox is completely placed inside the parent frame when opened.
      If combobox overlaps the parent's frame borders it behaves correctly.

      How to reproduce:
      ====================
      1. Compile and run the following program using jdk1.4.0-build 65
      2. Left-click mouse on the top combo-box to pull it down.
      3. Press PageUp and wait a few seconds

      You will see java.lang.StackOverflowError.

      The bottom combobox is placed on the frame as a sample of correct behavior.

      -------- test.java ---------------------
      import java.awt.*;
      import javax.swing.*;

      public class test extends JFrame {
      public static void main( String[] args ) {
          test tst = new test();
          tst.init();
          tst.setSize(300,300);
          tst.setVisible(true);
      }
      public void init() {
          setDefaultCloseOperation( EXIT_ON_CLOSE );
          
          JComboBox jcmb = new JComboBox();
          jcmb.addItem("JComobo1");
          jcmb.addItem("Item2");
          jcmb.addItem("Item3");
          getContentPane().add( jcmb, BorderLayout.NORTH );
          
          jcmb = new JComboBox();
          jcmb.addItem("JComobo2");
          jcmb.addItem("Item2");
          jcmb.addItem("Item3");
          getContentPane().add( jcmb, BorderLayout.SOUTH );
      };
      }
      -------- end test.java ------------------

      Test output:
      =============
      bash$ java -showversion test
      java version "1.4.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b64)
      Java HotSpot(TM) Client VM (build 1.4.0-beta-b64, mixed mode)
      Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct
      java.lang.StackOverflowError
      at java.awt.Toolkit.getEventQueue(Toolkit.java:1481)
      at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:675)
      at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:627)
      at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:544)
      at java.awt.Component.dispatchEventImpl(Component.java:3367)
      at java.awt.Container.dispatchEventImpl(Container.java:1399)
      at java.awt.Component.dispatchEvent(Component.java:3343)
      at javax.swing.plaf.basic.BasicComboBoxUI$KeyToListDispatcher.actionPerformed(BasicComboBoxUI.java:1408)
      at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1496)
      at javax.swing.JComponent.processKeyBinding(JComponent.java:2361)
      at javax.swing.JComponent.processKeyBindings(JComponent.java:2407)
      at javax.swing.JComponent.processKeyEvent(JComponent.java:2314)
      at javax.swing.JComboBox.processKeyEvent(JComboBox.java:1340)
      at java.awt.Component.processEvent(Component.java:4744)
      at java.awt.Container.processEvent(Container.java:1337)
      at java.awt.Component.dispatchEventImpl(Component.java:3476)
      at java.awt.Container.dispatchEventImpl(Container.java:1399)
      at java.awt.Component.dispatchEvent(Component.java:3343)
      at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1514)
      at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:572)
      at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:689)
      at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:627)
      at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:544)
      at java.awt.Component.dispatchEventImpl(Component.java:3367)
      at java.awt.Container.dispatchEventImpl(Container.java:1399)
      at java.awt.Component.dispatchEvent(Component.java:3343)
      at javax.swing.plaf.basic.BasicComboBoxUI$KeyToListDispatcher.actionPerformed(BasicComboBoxUI.java:1408)
      at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1496)
      at javax.swing.JComponent.processKeyBinding(JComponent.java:2361)
      at javax.swing.JComponent.processKeyBindings(JComponent.java:2407)
      at javax.swing.JComponent.processKeyEvent(JComponent.java:2314)
      at javax.swing.JComboBox.processKeyEvent(JComboBox.java:1340)
      at java.awt.Component.processEvent(Component.java:4744)
      at java.awt.Container.processEvent(Container.java:1337)
      at java.awt.Component.dispatchEventImpl(Component.java:3476)
      at java.awt.Container.dispatchEventImpl(Container.java:1399)
      at java.awt.Component.dispatchEvent(Component.java:3343)
      at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1514)
      at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:572)
      at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:689)
      at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:627)
      at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:544)
      at java.awt.Component.dispatchEventImpl(Component.java:3367)
      at java.awt.Container.dispatchEventImpl(Container.java:1399)
      at java.awt.Component.dispatchEvent(Component.java:3343)
      at javax.swing.plaf.basic.BasicComboBoxUI$KeyToListDispatcher.actionPerformed(BasicComboBoxUI.java:1408)
      ...
      The rest of trace log is about 70 K bytes and is skipped.
      All the skipped log contains the same data as shown above.
      ...
              at java.awt.Component.processEvent(Component.java:4744)
              at java.awt.Container.processEvent(Container.java:1337)
              at java.awt.Component.dispatchEventImpl(Component.java:3476)
              at java.awt.Container.dispatchEventImpl(Container.java:1399)

      Specific Machine Info:
      =====================
      Hostname: linux-24
      OS: RedHat Linux 6.2

      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mdavidsosunw Mark Davidson (Inactive)
                Reporter:
                alssunw Als Als (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: