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

TextField, TextArea setText() call core dump in Win95.

XMLWordPrintable

      JDK Version:jdk1.2beta3-J
      OS: Win95
      Locale: C, zh


      In win95, when a string is composed of more than a certain number of unicode which is larger than "\u0800", and it is set to a TextField, an application
      error will occur, and win95 will close this application.

      ==========================CheckWin95.java=====================================
      import java.awt.*;
      import java.awt.event.*;

      public class CheckWin95 {
          TextField t;
          public static void main(String args[]) {
              if (args.length < 2) {
                  System.out.println("Please input two arguments");
                  System.exit(0);
              }
              new CheckWin95(Integer.parseInt(args[0],16),
                  (new Integer(args[1])).intValue());
          }

          public CheckWin95(int Z1, int Z2) {
              Frame f = new Frame();
              t = new TextField(20);
              f.add(t);
              String data = "";
              String single = ""+(char)Z1;
              for (int i = 0; i < Z2; i++) {
                  data = data + single;
              }
              t.setText(data);
              f.pack();
              f.setVisible(true);
          }
      }
      =============================================================================

      java CheckWin95 0800 2400 error will occur.

      java CheckWin95 0800 239 ok

      java CheckWin95 0799 240 error will occur

       


      jim.hu@prc 1998-03-06

            Unassigned Unassigned
            jhusunw Jim Hu (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: