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

Text selection in java.awt.TextField leads to AWT Assertion Failure at least in JDK7b88 +

    Details

    • Subcomponent:
    • Introduced In Build:
      b55
    • Introduced In Version:
      7
    • Resolved In Build:
      b79
    • CPU:
      generic
    • OS:
      windows

      Description

      OS: Windows
      PASSES: JDK6, JDK7b40
      FAILS: at least JDK7b88+

      TO REPRODUCE MANUALLY:
      The following code sample shows an AWT text field.
      One of the possible ways to reproduce the failure is to select all the text in it with mouse by dragging mouse from the right to the left side of the text field. For fastdebug version of JDK a dialog will be shown offering debugging session.

      --------------------------------------------------------------
      import javax.swing.*;
      import java.awt.*;
      import java.lang.reflect.*;

      public class TextFieldTest {
          public static void main(String[] args) throws Exception {
              SwingUtilities.invokeAndWait(new Runnable() {
                  public void run() {
                      Frame frame = new Frame();
                      frame.add(new TextField("some text"));
                      frame.pack();
                      frame.setVisible(true);
                  }
              });
          }
      }
      --------------------------------------------------------------

      When the failure occures dialog will appear containing text:

      *********************
      AWT Assertion Failure
      *********************
      ::GetScrollInfo(GetHWnd(), 0, &si)
      File '../../../src/windows/native/sun/windows/awt_TextField.cpp', at line 255
      GetLastError() is 5a7 : The window does not have scroll bars.

      Do you want to break into the debugger?
      *********************

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                arapte Ambarish Rapte
                Reporter:
                dbessono Dmitry Bessonov
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: