-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.1.2
-
None
-
x86
-
windows_95
Name: joT67522 Date: 08/22/97
I've provided a sample program below which reproduces the
problem. The following steps will lead to a crash of the JVM.
c:\yourdir> javac Stresser.java
c:\yourdir> java Stresser
The crash occurs between 4 and 200 test cycles as counted off
in the Stresser window.
In the real application which relies on the creation and
dismissal of many windows this problem happens sporadically.
There is no known workaround.
/*
* Stresser demonstrates how to crash the JVM.
*
* The crash environment is:
* Java: JDK1.1.1 or JDK1.1.2
* CPU: Pentium 120
* RAM: 32MB
* OS: Win95 4.00.950a
*
* Using FlowLayouts instead of BorderLayouts also demonstrates the bug
* though it takes MUCH longer. With BorderLayouts, I've seen the crash
* occur within as few as 4 cycles and as many as 200 cycles.
*
* The crash is an invalid page fault and usually occurs in WINAWT.DLL
* but also happens in KERNEL32.DLL and <unknown> on occassion. The stack
* dump, registers, etc. contain different information each crash.
*
* Will Tuthill - ###@###.### - 06/05/97
*/
import java.awt.*;
public class Stresser extends Frame implements Runnable
{
private Label label;
private int MaxStress = 1000;
public static void main(String[] args)
{
Stresser stresser = new Stresser();
stresser.show();
stresser.run();
stresser.hide();
stresser.dispose();
stresser = null;
System.exit(0);
}
public Stresser()
{
setTitle("Stresser");
setBackground(Color.lightGray);
setLayout(new FlowLayout());
add(new Label("stress count: "));
add(label = new Label(String.valueOf(MaxStress)));
pack();
}
public void run()
{
StressWindow window;
for (int stress = 0; stress < MaxStress; stress++)
{
label.setText(String.valueOf(stress));
window = new StressWindow();
window.show();
window.dismiss();
window = null;
}
}
public boolean handleEvent(Event event)
{
if (event.id == Event.WINDOW_DESTROY)
System.exit(0);
return super.handleEvent(event);
}
}
class StressWindow extends Frame
{
public StressWindow()
{
//setLayout(new FlowLayout());
setLayout(new BorderLayout());
add("North",makePanel());
add("West",makePanel());
add("Center",makePanel());
add("East",makePanel());
add("South",makePanel());
pack();
}
public void dismiss()
{
hide();
super.dispose();
}
public Panel makePanel()
{
Panel panel = new Panel();
panel.setLayout(new BorderLayout());
panel.add("North",new Label("North"));
panel.add("East",new Label("East"));
panel.add("Center",new Label("Center"));
panel.add("West",new Label("West"));
panel.add("South",new Label("South"));
return panel;
}
public void removeNotify()
{
removeAll();
setLayout(null);
}
}
company - America Online, Inc. , email - ###@###.###
======================================================================
- duplicates
-
JDK-4051487 Win95/NT invalid page fault crash
- Closed