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

JTextPane.SetTextStyle(String,Style) always throws OutOfMemoryError

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.1.5
    • CPU:
      sparc
    • OS:
      solaris_2.5.1
    • Verification:
      Not verified

      Description



      Name: akC57697 Date: 09/01/97



      The com.sun.java.swing.JTextPane.SetTextStyle(String,Style) always
      throws OutOfMemoryError in the next case under both Solaris and
      Windows95.


      -------------------Example-----------------------------------
      import com.sun.java.swing.*;
      import com.sun.java.swing.text.*;
      public class TestSetStyle {
        public static void main(String[] args) {

            JTextPane c = new JTextPane();
            Style st = c.addStyle("default",null);

           try {
             c.setLogicalStyle(st); //step Set new value
            } catch (Throwable ex)
             
              { System.out.println( "Unexpected "+ex+" thrown in the test method");
               return;
              }
          System.out.println("OK. No exceptions.");
        }
      }
      -------------------Output------------------------------------
      (###@###.###): /set/java/jdk1.2/solaris/bin/java TestSetStyle
      Default UI factory not set, using BasicFactory
      Unexpected java.lang.OutOfMemoryError thrown in the test method
      ^C

      Moreover, ps -aux shows that this java process takes almost all resourses
      --------------------------------------------------------------
      USER PID %CPU %MEM SZ RSS TT S START TIME COMMAND
      kuzm 3297 91.8 55.82306017380 pts/1 R 12:13:54 1:48 /usr/local/java/jdk1.2/solaris/bin
      root 3306 1.9 2.7 1004 840 pts/3 O 12:16:12 0:00 ps -aux
      kuzm 2799 1.4 11.214280 3472 console S Aug 26 150:24 /usr/openwin/bin
      ....


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

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tprinzinsunw Timothy Prinzing (Inactive)
              Reporter:
              akuzminorcl Alexander Kuzmin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: