JDK-4117584 : TextField, TextArea setText() call core dump in Win95.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt:i18n
  • Affected Version: 1.2.0
  • Priority: P1
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: windows_95
  • CPU: x86
  • Submitted: 1998-03-06
  • Updated: 1998-03-10
  • Resolved: 1998-03-10
Related Reports
Relates :  
Description
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

Comments
EVALUATION This is no longer reproducible in the latest JDK1.2beta3 build (L). This is probably because of the fixes made to native methods for Win32 (Win95 paths). (UTF converters to multibyte converters). However, this has not been confirmed yet. masayoshi.okutsu@Eng 1998-03-10
10-03-1998