-
Bug
-
Resolution: Fixed
-
P1
-
1.2.0
-
None
-
1.2beta3
-
x86
-
windows_95
-
Not verified
JDK version : JDK1.2beta3-L
Platforms : Win95
Locales : en, zh, zh_TW (English and both Chinese)
to reproduce :
- appletviewer example1.html
(under /usr/local/java/jdk1.2/win32/demo/applets/SortDemo)
- after click on the "accept" for license agreement, crash happens.
Failure is in kernal32.dll.
----
The above procedure requires that your .hotjava/properties file either doesn't
exist, does not contain a value for the property "appletviewer.version", or
contains a value for this property that is not "1.2". You must furthermore be
running a build that contains a valid LICENSE file in JAVA_HOME.
The underlying problem is that java.awt.TextComponent.getText causes an access
violation if the text in the component is longer than 255 characters. This
is demonstrated by the following simple program, which crashes on win95
using the 1.2beta3-L build:
import java.awt.*;
public class GetText {
static final String xx = "01234567890123456789012345678901";
public static void main(String[] args) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < 9; i++) sb.append(xx);
System.err.println(sb.length());
Frame f = new Frame();
TextArea ta = new TextArea();
ta.append(sb.toString());
f.add(ta);
f.pack();
f.show();
System.err.println(ta.getText().length());
f.setVisible(false);
f.dispose();
System.exit(0);
}
}
-- mr@eng 3/18/1998
Platforms : Win95
Locales : en, zh, zh_TW (English and both Chinese)
to reproduce :
- appletviewer example1.html
(under /usr/local/java/jdk1.2/win32/demo/applets/SortDemo)
- after click on the "accept" for license agreement, crash happens.
Failure is in kernal32.dll.
----
The above procedure requires that your .hotjava/properties file either doesn't
exist, does not contain a value for the property "appletviewer.version", or
contains a value for this property that is not "1.2". You must furthermore be
running a build that contains a valid LICENSE file in JAVA_HOME.
The underlying problem is that java.awt.TextComponent.getText causes an access
violation if the text in the component is longer than 255 characters. This
is demonstrated by the following simple program, which crashes on win95
using the 1.2beta3-L build:
import java.awt.*;
public class GetText {
static final String xx = "01234567890123456789012345678901";
public static void main(String[] args) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < 9; i++) sb.append(xx);
System.err.println(sb.length());
Frame f = new Frame();
TextArea ta = new TextArea();
ta.append(sb.toString());
f.add(ta);
f.pack();
f.show();
System.err.println(ta.getText().length());
f.setVisible(false);
f.dispose();
System.exit(0);
}
}
-- mr@eng 3/18/1998
- duplicates
-
JDK-4118571 In win95, JDK version 1.2beta3-L, TextArea, TextField call application crash.
-
- Closed
-