-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
1.1
-
x86
-
windows_nt
Name: sgC58550 Date: 03/18/97
I've written a short program to workaround the modal dialog from modal dialog bug
but I've discovered another bug.
When a frame from a frame is opened and the parent frame is disabled and enabled very often,
the program crashes java.exe or locks.
Here is a short program. Compile it and click on the windows as fast as you can for a few minutes.
Sometimes it doesn't crash if it doesn't, restart the program and repeat the clicking as fast as possible.
After 2 or three restarts the program must be crashed the first time.
Sometimes it doesn't crash sometimes it simply locks the system.
import java.awt.*;
class bug3 extends Frame {
Frame parent;
bug3 (Frame parent) {
super();
setLayout(new BorderLayout());
add("North", new Button("Test"));
resize(200,200);
move(0,0);
this.parent = parent;
parent.disable();
}
public boolean handleEvent(Event ev) {
if(ev.id == Event.MOUSE_DOWN) {
parent.enable();
this.dispose();
return true;
}
return super.handleEvent(ev);
}
}
class bug2 extends Frame {
bug2() {
super();
resize(200,200);
move(0,0);
}
public boolean handleEvent(Event ev) {
if(ev.id == Event.MOUSE_DOWN) {
(new bug3(this)).show();
return true;
}
return super.handleEvent(ev);
}
public static void main(String [] args) {
(new bug2()).show();
}
}
company - Axioma GmbH , email - ###@###.###
======================================================================