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

Exception occurs when writing many texts to java console

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 6u45, 7u51, 8, 9
    • Fix Version/s: 8u40
    • Component/s: deploy
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b06
    • CPU:
      x86
    • OS:
      windows_7

      Backports

        Description

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

        ADDITIONAL OS VERSION INFORMATION :
        Microsoft Windows [Version 6.1.7601]

        A DESCRIPTION OF THE PROBLEM :
        Exception occurs when writing 4,000 K texts to java console.

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
         1. Open java applet
         2. Write 4,000 K texts to java console


        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        No exception occurs.
        ACTUAL -
        IllegalArgumentException occurs.
        ----
        Exception in thread "AWT-EventQueue-1" java.lang.IllegalArgumentException: Invalid remove
          at javax.swing.JTextArea.replaceRange(Unknown Source)
          at com.sun.deploy.util.ConsoleWindow$25.run(Unknown Source)
          at java.awt.event.InvocationEvent.dispatch(Unknown Source)
          at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
          at java.awt.EventQueue.access$400(Unknown Source)
          at java.awt.EventQueue$2.run(Unknown Source)
          at java.awt.EventQueue$2.run(Unknown Source)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
          at java.awt.EventQueue.dispatchEvent(Unknown Source)
          at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
          at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
          at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
          at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
          at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
          at java.awt.EventDispatchThread.run(Unknown Source)


        ERROR MESSAGES/STACK TRACES THAT OCCUR :
        Exception in thread "AWT-EventQueue-1" java.lang.IllegalArgumentException: Invalid remove

        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------
        public class ConsoleTest extends JApplet {
          JButton _button = new JButton("Write Console");

          String _testOutput = null;
          
          public void init() {
            super.init();
            add(_button);
            
            StringBuffer bf = new StringBuffer();
            for (int i = 0; i < 1000; i ++) {
              bf.append("0123456789");
            }
            _testOutput = bf.toString();
            
            _button.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent evt) {
                for (int i = 0; i < 400; i ++) {
                  System.out.println(_testOutput);
                }
              }
            });
          }
        }

        ---------- END SOURCE ----------

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                herrick Andy Herrick (Inactive)
                Reporter:
                webbuggrp Webbug Group
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: