-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
1.1.5, 1.1.6, 1.2.0
-
sparc
-
solaris_2.5.1
og implements ActionListener {
Button bCancel;
public awtDialog(Frame p) {
super(p);
Panel panel = new Panel(); // panel for whole window
panel.setLayout(new BorderLayout());
Panel bpanel = new Panel(); // panel for whole window
bpanel.setLayout(new FlowLayout(FlowLayout.CENTER, 20, 5));
add("Center", panel);
panel.add("Center", new Label("This is also an AWT test"));
bCancel = new Button("Cancel");
bpanel.add(bCancel);
bCancel.addActionListener(this);
add("South", bpanel);
pack();
show();
}
public void cancelCB() {
dispose();
}
public void actionPerformed (ActionEvent evt) {
if(evt.getActionCommand().equals("Cancel")) {
cancelCB();
}
}
}
------------end included program --------------
----- Crash on Solaris 2.5.1 using JDK 1.1.5: -------
SIGSEGV 11* segmentation violation
si_signo [11]: SIGSEGV 11* segmentation violation
si_errno [0]: Error 0
si_code [1]: SEGV_MAPERR [addr: 0x4]
stackbase=EDFB2000, stackpointer=EDFB1668
Full thread dump:
"AWT-Finalizer" (TID:0xee7077b8, sys_thread_t:0xedf51db8, state:CW) prio=9
java.lang.Object.wait(Object.java)
sun.awt.AWTFinalizer.run(AWTFinalizer.java:48)
"Screen Updater" (TID:0xee707a20, sys_thread_t:0xedf81db8, state:CW) prio=4
java.lang.Object.wait(Object.java)
sun.awt.ScreenUpdater.nextEntry(ScreenUpdater.java:78)7
sun.awt.ScreenUpdater.run(ScreenUpdater.java:98)
"AWT-Motif" (TID:0xee704f28, sys_thread_t:0xedfb1db8, state:R) prio=5 *current thread*
java.lang.Thread.run(Thread.java)
"AWT-Input" (TID:0xee704f48, sys_thread_t:0xedfe1db8, state:CW) prio=5
"AWT-EventQueue-0" (TID:0xee704f60, sys_thread_t:0xee011db8, state:CW) prio=5
java.lang.Object.wait(Object.java)
java.awt.EventQueue.getNextEvent(EventQueue.java:119)
java.awt.EventDispatchThread.run(EventDispatchThread.java:55)
"Finalizer thread" (TID:0xee700220, sys_thread_t:0xee2c1db8, state:CW) prio=1
"Async Garbage Collector" (TID:0xee700268, sys_thread_t:0xee2f1db8, state:CW) prio=1
"Idle thread" (TID:0xee7002b0, sys_thread_t:0xee3c1db8, state:R) prio=0
"Clock" (TID:0xee700088, sys_thread_t:0xee3f1db8, state:CW) prio=12
"main" (TID:0xee7000b0, sys_thread_t:0x69368, state:CW) prio=5
Monitor Cache Dump:
java.awt.EventQueue@EE704FB0/EE750378: <unowned>
Waiting to be notified:
"AWT-EventQueue-0" (0xee011db8)
sun.awt.AWTFinalizer@EE7077B8/EE754A48: <unowned>
Waiting to be notified:
"AWT-Finalizer" (0xedf51db8)
sun.awt.motif.MToolkit@EE704D20/EE750288: owner "AWT-Motif" (0xedfb1db8, 1 entry)
Waiting to be notified:
"AWT-Input" (0xedfe1db8)
<unknown key> (0xee2f1db8): <unowned>
Waiting to be notified:
"Async Garbage Collector" (0xee2f1db8)
sun.awt.ScreenUpdater@EE707A20/EE758768: <unowned>
Waiting to be notified:
"Screen Updater" (0xedf81db8)
Registered Monitor Dump:
Thread queue lock: <unowned>
Waiting to be notified:
"main" (0x69368)
Name and type hash table lock: <unowned>
String intern lock: <unowned>
JNI pinning lock: <unowned>
JNI global reference lock: <unowned>
BinClass lock: <unowned>
Class loading lock: <unowned>
Java stack lock: <unowned>
Code rewrite lock: <unowned>
Heap lock: <unowned>
Has finalization queue lock: <unowned>
Finalize me queue lock: <unowned>
Waiting to be notified:
"Finalizer thread" (0xee2c1db8)
Monitor IO lock: <unowned>
Child death monitor: <unowned>
Event monitor: <unowned>
I/O monitor: <unowned>
Alarm monitor: <unowned>
Waiting to be notified:
"Clock" (0xee3f1db8)
Sbrk lock: <unowned>
Monitor registry: owner "AWT-Motif" (0xedfb1db8, 1 entry)
Thread Alarm Q:
sys_thread_t 0xee2f1db8 [Timeout in 29 ms]
Abort
----- Crash on Solaris 2.5.1 using JDK 1.2: -----
SIGSEGV 11* segmentation violation
si_signo [11]: SIGSEGV 11* segmentation violation
si_errno [0]: Error 0
si_code [1]: SEGV_MAPERR [addr: 0x4]
stackbase=EDD32000, stackpointer=EDD3155C
Full thread dump:
"AWT-Finalizer" (TID:0xee307bb0, sys_thread_t:0x4389cc, state:CW) prio=9
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:309)
at sun.awt.AWTFinalizer.run(AWTFinalizer.java:47)
"Screen Updater" (TID:0xee3071e8, sys_thread_t:0x48c65c, state:CW) prio=4
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:309)
at sun.awt.ScreenUpdater.nextEntry(ScreenUpdater.java:81)
at sun.awt.ScreenUpdater.run(ScreenUpdater.java:101)
"AWT-Motif" (TID:0xee303f48, sys_thread_t:0x440064, state:R) prio=5 *current thread*
at sun.awt.motif.MToolkit.run(Native Method)
at java.lang.Thread.run(Thread.java:484)
"AWT-Input" (TID:0xee303f70, sys_thread_t:0x441de4, state:CW) prio=5
at java.lang.Object.wait(Native Method)
at sun.awt.motif.InputThread.run(Native Method)
"AWT-EventQueue-0" (TID:0xee303d68, sys_thread_t:0x3f689c, state:CW) prio=5
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:309)
at java.awt.EventQueue.getNextEvent(EventQueue.java:114)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:44)
"CachedReference sweeper" (TID:0xee300d30, sys_thread_t:0xe08e4, state:CW) prio=9
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:309)
at java.lang.Runtime.waitForMemoryAdvice(Runtime.java:569)
at java.lang.ref.CachedReference$Sweeper.run(CachedReference.java:342)
at java.lang.Thread.run(Thread.java:484)
"Finalizer" (TID:0xee300368, sys_thread_t:0xc2e5c, state:CW) prio=8
at java.lang.Object.wait(Native Method)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:86)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:99)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:131)
"Reference handler" (TID:0xee300438, sys_thread_t:0xca35c, state:CW) prio=10
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:309)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:198)
"Async Garbage Collector" (TID:0xee3001f8, sys_thread_t:0xc5564, state:CW) prio=1
"Idle thread" (TID:0xee300240, sys_thread_t:0xc545c, state:R) prio=0
"Clock" (TID:0xee300088, sys_thread_t:0x8aea4, state:CW) prio=12
"main" (TID:0xee3000b0, sys_thread_t:0x209fc, state:CW) prio=5
Monitor Cache Dump:
sun.awt.motif.MToolkit@EE303DE8/EE36B130: owner "AWT-Motif" (0x440064, 1 entry)
Waiting to be notified:
"AWT-Input" (0x441de4)
Registered Monitor Dump:
utf8 hash table: <unowned>
JNI pinning lock: <unowned>
JNI global reference lock: <unowned>
BinClass lock: <unowned>
Class linking lock: <unowned>
Code rewrite lock: <unowned>
Heap lock: <unowned>
Monitor IO lock: <unowned>
Child death monitor: <unowned>
Event monitor: <unowned>
I/O monitor: <unowned>
Alarm monitor: <unowned>
Waiting to be notified:
"Clock" (0x8aea4)
Sbrk lock: <unowned>
Monitor cache expansion lock: <unowned>
Thread queue lock: <unowned>
Waiting to be notified:
"main" (0x209fc)
Monitor registry: owner "AWT-Motif" (0x440064, 1 entry)
Thread Alarm Q:
sys_thread_t 0xc5564 [Timeout in 49 ms]
Abort
---- Crash on Solaris 2.6 using JDK 1.1.5 ----
SIGSEGV 11* segmentation violation
si_signo [11]: SIGSEGV 11* segmentation violation
si_errno [0]: Error 0
si_code [1]: SEGV_MAPERR [addr: 0x4]
stackbase=EDF92000, stackpointer=EDF91668
Full thread dump:
"Image Fetcher 3" (TID:0xee6ed350, sys_thread_t:0xede71db8, state:CW) prio=8
sun.awt.image.ImageFetcher.nextImage(ImageFetcher.java:109)
sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:146)
sun.awt.image.ImageFetcher.run(ImageFetcher.java:127)
"AWT-Finalizer" (TID:0xee70c5b0, sys_thread_t:0xedea1db8, state:CW) prio=9
java.lang.Object.wait(Object.java)
sun.awt.AWTFinalizer.run(AWTFinalizer.java:48)
"TimerQueue" (TID:0xee70b668, sys_thread_t:0xedf01db8, state:CW) prio=4
com.sun.java.swing.TimerQueue.run(TimerQueue.java:235)
java.lang.Thread.run(Thread.java)
"Screen Updater" (TID:0xee70b598, sys_thread_t:0xedf31db8, state:CW) prio=4
java.lang.Object.wait(Object.java)
sun.awt.ScreenUpdater.nextEntry(ScreenUpdater.java:78)
sun.awt.ScreenUpdater.run(ScreenUpdater.java:98)
"AWT-Motif" (TID:0xee706ba0, sys_thread_t:0xedf91db8, state:R) prio=5
*current thread*
java.lang.Thread.run(Thread.java)
"AWT-Input" (TID:0xee706bc0, sys_thread_t:0xedfc1db8, state:CW) prio=5
"AWT-EventQueue-0" (TID:0xee706aa0, sys_thread_t:0xedff1db8, state:CW) prio=5
java.lang.Object.wait(Object.java)
java.awt.EventQueue.getNextEvent(EventQueue.java:119)
java.awt.EventDispatchThread.run(EventDispatchThread.java:56)
"Finalizer thread" (TID:0xee700220, sys_thread_t:0xee2c1db8, state:CW) prio=1
"Async Garbage Collector" (TID:0xee700268, sys_thread_t:0xee2f1db8, state:CW) prio=1
"Idle thread" (TID:0xee7002b0, sys_thread_t:0xee3c1db8, state:R) prio=0
"Clock" (TID:0xee700088, sys_thread_t:0xee3f1db8, state:CW) prio=12
"main" (TID:0xee7000b0, sys_thread_t:0x95fe0, state:CW) prio=5
Monitor Cache Dump:
sun.awt.AWTFinalizer@EE70C5B0/EE76C0B0: <unowned>
Waiting to be notified:
"AWT-Finalizer" (0xedea1db8)
sun.awt.motif.MToolkit@EE706B20/EE754FF8: owner "AWT-Motif" (0xedf91db8, 1
entry)
Waiting to be notified:
"AWT-Input" (0xedfc1db8)
sun.awt.ScreenUpdater@EE70B598/EE765DC8: <unowned>
Waiting to be notified:
"Screen Updater" (0xedf31db8)
com.sun.java.swing.TimerQueue@EE70B658/EE7686C0: <unowned>
Waiting to be notified:
"TimerQueue" (0xedf01db8)
<unknown key> (0xee2f1db8): <unowned>
Waiting to be notified:
"Async Garbage Collector" (0xee2f1db8)
java.awt.EventQueue@EE706AF0/EE7550E8: <unowned>
Waiting to be notified:
"AWT-EventQueue-0" (0xedff1db8)
java.util.Vector@EE708800/EE76C628: <unowned>
Waiting to be notified:
"Image Fetcher 3" (0xede71db8)
Registered Monitor Dump:
Thread queue lock: <unowned>
Waiting to be notified:
"main" (0x95fe0)
Name and type hash table lock: <unowned>
String intern lock: <unowned>
JNI pinning lock: <unowned>
JNI global reference lock: <unowned>
BinClass lock: <unowned>
Class loading lock: <unowned>
Java stack lock: <unowned>
Code rewrite lock: <unowned>
Heap lock: <unowned>
Has finalization queue lock: <unowned>
Finalize me queue lock: <unowned>
Waiting to be notified:
"Finalizer thread" (0xee2c1db8)
Monitor IO lock: <unowned>
Child death monitor: <unowned>
Event monitor: <unowned>
I/O monitor: <unowned>
Alarm monitor: <unowned>
Waiting to be notified:
"Clock" (0xee3f1db8)
Sbrk lock: <unowned>
Monitor registry: owner "AWT-Motif" (0xedf91db8, 1 entry)
Thread Alarm Q:
sys_thread_t 0xee2f1db8 [Timeout in 620 ms]
Abort - core dumped
Name: joT67522 Date: 01/08/98
My program worked fine on jdk1.1.1, (and IE4)
when i upgraded to jdk1.1.5, it crashed on the first mouse pick.
which does a removeAll and re-laysout the panels.
This example program will also crash,
but you may need to click the mouse rapidly
and possibly move while clicking. Sometimes crashes
after 5-10 clicks, other times may need a bunch,
it may be load-dependent. My more complex app crashes
reliably, without much effort.
I have a Sparc-2, running Solaris-2.4
This bug may be related to 4073905
TestBug.java:
import java.awt.*;
public class TestBug extends Panel {
boolean singleDisp = true;
LayoutManager gridLM = null;
LayoutManager borderLM = null;
static int kk = 50;
class dispPanel extends Panel {
dispPanel(Color c) {super(); setBackground(c);}
public Dimension preferredSize() {return new Dimension(200,200);}
// bug can be provoked without any paint(), but since the bug
// seems to be time dependent, this may help...
public void paint(Graphics g) {
Dimension s = size();
int x = s.width;
int y = s.height;
for(int i = 0; i<kk; i++)
for(int j = 0; j<kk; j++)
g.drawLine(i*x/kk,i*y/kk,j*x/kk,j*y/kk);
}
// in my actual app, code as simple as this will cause a crash...
// especially if mouse is moving during the click.
public void paint1(Graphics g) {
Dimension s = size();
int xtc = s.width/2-10;
g.setPaintMode(); // overwrite vs XOR mode
g.setColor(Color.green); // indicate NO DATA
g.drawString("Bug?", xtc, s.height-1);
g.setColor(Color.black);
g.drawLine(xtc, 0, xtc, s.height); // right edge mark
}
}
Panel disp1 = new dispPanel(Color.blue) ;
Panel disp2 = new dispPanel(Color.red) ;
Panel disp3 = new dispPanel(Color.green) ;
public TestBug() {
this.setBackground(Color.magenta);
if(gridLM == null) gridLM = new GridLayout(0,2,4,4);
if(borderLM==null) borderLM = new BorderLayout();
layoutDisplay(disp1);
}
public void layoutDisplay(Panel disp) {
removeAll();
if(singleDisp) { // toggle layouts
singleDisp = false;
setLayout(gridLM);
add(disp1); // in real app we add several Panels
add(disp2); // in real app we add several Panels
} else {
singleDisp = true;
setLayout(borderLM);
add("Center",disp); // can use disp3 here...
}
validate();
}
public boolean handleEvent(Event e) {
switch (e.id) {
case Event.MOUSE_DOWN:
if(e.target instanceof dispPanel) {
layoutDisplay((Panel)e.target);
return true;
}
default:
return false;
}
}
public static void main(String args[]) {
if (args.length>0) kk = Integer.parseInt(args[0]);
Frame mf = new Frame("TestBug");
mf.setSize(200,200);
mf.add (new TestBug());
mf.pack();
mf.show();
}
}
whitney<101> javac TestBug.java
Note: TestBug.java uses a deprecated API. Recompile with "-deprecation" for details.
1 warning
whitney<102> java TestBug
SIGSEGV 11* segmentation violation
si_signo [11]: SIGSEGV 11* segmentation violation
si_errno [0]: Error 0
si_code [1]: SEGV_MAPERR [addr: 0x4]
stackbase=EDFF1000, stackpointer=EDFEF7F8
Full thread dump:
"AWT-Finalizer" (TID:0xee306800, sys_thread_t:0xedf90db8, state:CW) prio=9
java.lang.Object.wait(Object.java)
sun.awt.AWTFinalizer.run(AWTFinalizer.java:48)
"Screen Updater" (TID:0xee306e30, sys_thread_t:0xedfc0db8, state:CW) prio=4
java.lang.Object.wait(Object.java)
sun.awt.ScreenUpdater.nextEntry(ScreenUpdater.java:78)
sun.awt.ScreenUpdater.run(ScreenUpdater.java:98)
"AWT-Motif" (TID:0xee304fa8, sys_thread_t:0xedff0db8, state:R) prio=5 *current thread*
java.lang.Thread.run(Thread.java)
"AWT-Input" (TID:0xee304d08, sys_thread_t:0xef030db8, state:MW) prio=5
"AWT-EventQueue-0" (TID:0xee304e70, sys_thread_t:0xef310db8, state:MW) prio=5
sun.awt.motif.MComponentPeer.initialize(MComponentPeer.java:69)
sun.awt.motif.MComponentPeer.<init>(MComponentPeer.java:126)
sun.awt.motif.MCanvasPeer.<init>(MCanvasPeer.java:35)
sun.awt.motif.MPanelPeer.<init>(MPanelPeer.java:29)
sun.awt.motif.MToolkit.createPanel(MToolkit.java:135)
java.awt.Panel.addNotify(Panel.java:76)
java.awt.Container.addImpl(Container.java:313)
java.awt.Container.add(Container.java:189)
TestBug.layoutDisplay(TestBug.java:55)
TestBug.handleEvent(TestBug.java:64)
java.awt.Component.postEvent(Component.java:1884)
java.awt.Component.postEvent(Component.java:1894)
java.awt.Component.dispatchEventImpl(Component.java:1776)
java.awt.Container.dispatchEventImpl(Container.java:939)
java.awt.Component.dispatchEvent(Component.java:1704)
java.awt.EventDispatchThread.run(EventDispatchThread.java:63)
"Finalizer thread" (TID:0xee300220, sys_thread_t:0xef360db8, state:CW) prio=1
"Async Garbage Collector" (TID:0xee300268, sys_thread_t:0xef390db8, state:R) prio=1
"Idle thread" (TID:0xee3002b0, sys_thread_t:0xef3c0db8, state:R) prio=0
"Clock" (TID:0xee300088, sys_thread_t:0xef3f0db8, state:CW) prio=12
"main" (TID:0xee3000b0, sys_thread_t:0x69290, state:CW) prio=5
Monitor Cache Dump:
sun.awt.motif.MToolkit@EE304DA0/EE34F868: owner "AWT-Motif" (0xedff0db8, 1 entry)
Waiting to enter:
"AWT-Input" (0xef030db8)
"AWT-EventQueue-0" (0xef310db8)
java.lang.Object@EE303DB8/EE34C9B0: owner "AWT-EventQueue-0" (0xef310db8, 1 entry)
<unknown key> (0xef390db8): owner "Async Garbage Collector" (0xef390db8, 1 entry)
sun.awt.AWTFinalizer@EE306800/EE357790: <unowned>
Waiting to be notified:
"AWT-Finalizer" (0xedf90db8)
sun.awt.ScreenUpdater@EE306E30/EE357470: <unowned>
Waiting to be notified:
"Screen Updater" (0xedfc0db8)
Registered Monitor Dump:
Thread queue lock: <unowned>
Waiting to be notified:
"main" (0x69290)
Name and type hash table lock: <unowned>
String intern lock: <unowned>
JNI pinning lock: <unowned>
JNI global reference lock: <unowned>
BinClass lock: <unowned>
Class loading lock: <unowned>
Java stack lock: <unowned>
Code rewrite lock: <unowned>
Heap lock: <unowned>
Has finalization queue lock: <unowned>
Finalize me queue lock: <unowned>
Waiting to be notified:
"Finalizer thread" (0xef360db8)
Monitor IO lock: <unowned>
Child death monitor: <unowned>
Event monitor: <unowned>
I/O monitor: <unowned>
Alarm monitor: <unowned>
Waiting to be notified:
"Clock" (0xef3f0db8)
Sbrk lock: <unowned>
Monitor registry: owner "AWT-Motif" (0xedff0db8, 1 entry)
Thread Alarm Q:
Abort (core dumped)
(Review ID: 22929)
======================================================================
Compile and run the enclosed TestBug.
It will display grid with a Red and Green panel.
On each mouse down, the Green Panel is replaced
(toggles) with a Blue Panel.
The results, running JDK1.1.5 on
Solaris-2.4 on a Sparc-5 are:
1. click the red panel, the green&blue panel toggles
the system does not [generally] crash.
Run TestBug again:
2.click the Green Panel, it is replaced by Blue panel.
click the Blue panel, JVM crashes.
3. run TestBug. click down ONLY on the green panel
wait a second, the release mouse button up,
panel toggles correctly to blue.
click down only on blue, it toggles to green,
wait and release mouse, no crash.
click down/up, once or twice, it will crash.
4. run TestBug. click the red panel several times,
let's pretend this gets the panel switching data
structures all greased up. now click on the Green
or blue panel, IT WORKS,over and over...
But if you click long enough and fast enough, i
suspect it will eventually crash.
I filed a report on this bug yesterday, with a
more complex test program, this simpler version,
actually crashes more reliably.
The program from which this is derived worked
without problems in JDK1.1.1, and IE4, when i
upgraded to jdk1.1.5 it immediately crashed.
[after i had deleted jdk1.1.1, so i have not
tried TestBug on other than jdk1.1.5]
TestBug.java:
import java.awt.*;
public class TestBug extends Panel {
class dispPanel extends Panel {
dispPanel(Color c) {super(); setBackground(c);}
public Dimension preferredSize() {return new Dimension(200,200);}
}
Panel dispRed = new dispPanel(Color.red) ;
Panel dispGrn = new dispPanel(Color.green) ;
Panel dispBlu = new dispPanel(Color.blue) ;
boolean addGrn = true;
LayoutManager gridLM = new GridLayout(0,2,4,4);
public TestBug() {
this.setBackground(Color.magenta);
setLayout(gridLM);
add(dispRed);
add(dispBlu);
layoutDisplay();
}
public void layoutDisplay() {
if(addGrn) { // toggle layout
remove(dispBlu);
add(dispGrn); // Red & Green
} else {
remove(dispGrn);
add(dispBlu); // Red & Blue
}
addGrn = !addGrn;
validate();
}
public boolean handleEvent(Event e) {
switch (e.id) {
case Event.MOUSE_DOWN:
if(e.target instanceof dispPanel) {
layoutDisplay();
return true;
}
default:
return false;
}
}
public static void main(String args[]) {
Frame mf = new Frame("TestBug");
mf.add ( new TestBug());
mf.pack();
mf.show();
}
}
whitney<75> java TestBug
SIGSEGV 11* segmentation violation
si_signo [11]: SIGSEGV 11* segmentation violation
si_errno [0]: Error 0
si_code [1]: SEGV_MAPERR [addr: 0x4]
stackbase=EDFF1000, stackpointer=EDFF0668
Full thread dump:
"AWT-Finalizer" (TID:0xee306558, sys_thread_t:0xedf90db8, state:CW) prio=9
java.lang.Object.wait(Object.java)
sun.awt.AWTFinalizer.run(AWTFinalizer.java:48)
"Screen Updater" (TID:0xee306e28, sys_thread_t:0xedfc0db8, state:CW) prio=4
java.lang.Object.wait(Object.java)
sun.awt.ScreenUpdater.nextEntry(ScreenUpdater.java:78)
sun.awt.ScreenUpdater.run(ScreenUpdater.java:98)
"AWT-Motif" (TID:0xee304fb8, sys_thread_t:0xedff0db8, state:R) prio=5 *current thread*
java.lang.Thread.run(Thread.java)
"AWT-Input" (TID:0xee304d20, sys_thread_t:0xef030db8, state:CW) prio=5
"AWT-EventQueue-0" (TID:0xee304d38, sys_thread_t:0xef310db8, state:CW) prio=5
java.lang.Object.wait(Object.java)
java.awt.EventQueue.getNextEvent(EventQueue.java:119)
java.awt.EventDispatchThread.run(EventDispatchThread.java:55)
"Finalizer thread" (TID:0xee300220, sys_thread_t:0xef360db8, state:CW) prio=1
"Async Garbage Collector" (TID:0xee300268, sys_thread_t:0xef390db8, state:CW) prio=1
"Idle thread" (TID:0xee3002b0, sys_thread_t:0xef3c0db8, state:R) prio=0
"Clock" (TID:0xee300088, sys_thread_t:0xef3f0db8, state:CW) prio=12
"main" (TID:0xee3000b0, sys_thread_t:0x69290, state:CW) prio=5
Monitor Cache Dump:
sun.awt.motif.MToolkit@EE304DB8/EE34FAB8: owner "AWT-Motif" (0xedff0db8, 1 entry)
Waiting to be notified:
"AWT-Input" (0xef030db8)
java.awt.EventQueue@EE304D88/EE34FBA8: <unowned>
Waiting to be notified:
"AWT-EventQueue-0" (0xef310db8)
sun.awt.AWTFinalizer@EE306558/EE357800: <unowned>
Waiting to be notified:
"AWT-Finalizer" (0xedf90db8)
<unknown key> (0xef390db8): <unowned>
Waiting to be notified:
"Async Garbage Collector" (0xef390db8)
sun.awt.ScreenUpdater@EE306E28/EE3574B8: <unowned>
Waiting to be notified:
"Screen Updater" (0xedfc0db8)
Registered Monitor Dump:
Thread queue lock: <unowned>
Waiting to be notified:
"main" (0x69290)
Name and type hash table lock: <unowned>
String intern lock: <unowned>
JNI pinning lock: <unowned>
JNI global reference lock: <unowned>
BinClass lock: <unowned>
Class loading lock: <unowned>
Java stack lock: <unowned>
Code rewrite lock: <unowned>
Heap lock: <unowned>
Has finalization queue lock: <unowned>
Finalize me queue lock: <unowned>
Waiting to be notified:
"Finalizer thread" (0xef360db8)
Monitor IO lock: <unowned>
Child death monitor: <unowned>
Event monitor: <unowned>
I/O monitor: <unowned>
Alarm monitor: <unowned>
Waiting to be notified:
"Clock" (0xef3f0db8)
Sbrk lock: <unowned>
Monitor registry: owner "AWT-Motif" (0xedff0db8, 1 entry)
Thread Alarm Q:
sys_thread_t 0xef390db8 [Timeout in 493 ms]
Abort (core dumped)
whitney<76>
=====================================================================
Another report of this problem, sheri.good@Eng 1998-01-27. This
bug appears to be a regression from 1.1.4 to 1.1.5.
This bug happens on JDK 1.1.5 and JDK 1.2. Can not get it to
crash in 1.1.4
Current Environment:
1. Ultra Sparc I, 128MBytes RAM
2. Solaris 2.6
3. JRE/JDK 1.2 (happens on JDK 1.15 also)
To compile program:
Here is the program that can crash AWT easily.
To compile it :
javac awtTest.java
To run it:
java awtTest
On the window that comes up, click "OK" button, that will pop up another
dialog. On that dialog, hold the mouse button over cancel button and then
while releasing it, click the button also. The program will crash. This is
using JDK 1.1.5
-------- begin included program ----------
import java.awt.*;
import java.awt.event.*;
import java.lang.*;
import java.util.*;
public class awtTest extends Frame implements ActionListener {
Button bOk;
Button bCancel;
public awtTest() {
setTitle("AWT Test");
setResizable(false);
Panel panel = new Panel(); // panel for whole window
panel.setLayout(new BorderLayout());
Panel bpanel = new Panel(); // panel for whole window
bpanel.setLayout(new FlowLayout(FlowLayout.CENTER, 20, 5));
add("Center", panel);
panel.add("Center", new Label("This is AWT test"));
bOk = new Button("OK");
bpanel.add(bOk);
bOk.addActionListener(this);
bCancel = new Button("Cancel");
bpanel.add(bCancel);
bCancel.addActionListener(this);
add("South", bpanel);
pack();
}
public static void main(String []args) {
Frame f = new awtTest();
f.setResizable(false);
f.show();
}
public void okCB() {
awtDialog ad = new awtDialog(this);
}
public void cancelCB() {
System.exit(0);
}
public void actionPerformed (ActionEvent evt) {
if(evt.getActionCommand().equals("OK"))
okCB();
else if(evt.getActionCommand().equals("Cancel")) {
cancelCB();
}
}
}
class awtDialog extends Dial
Button bCancel;
public awtDialog(Frame p) {
super(p);
Panel panel = new Panel(); // panel for whole window
panel.setLayout(new BorderLayout());
Panel bpanel = new Panel(); // panel for whole window
bpanel.setLayout(new FlowLayout(FlowLayout.CENTER, 20, 5));
add("Center", panel);
panel.add("Center", new Label("This is also an AWT test"));
bCancel = new Button("Cancel");
bpanel.add(bCancel);
bCancel.addActionListener(this);
add("South", bpanel);
pack();
show();
}
public void cancelCB() {
dispose();
}
public void actionPerformed (ActionEvent evt) {
if(evt.getActionCommand().equals("Cancel")) {
cancelCB();
}
}
}
------------end included program --------------
----- Crash on Solaris 2.5.1 using JDK 1.1.5: -------
SIGSEGV 11* segmentation violation
si_signo [11]: SIGSEGV 11* segmentation violation
si_errno [0]: Error 0
si_code [1]: SEGV_MAPERR [addr: 0x4]
stackbase=EDFB2000, stackpointer=EDFB1668
Full thread dump:
"AWT-Finalizer" (TID:0xee7077b8, sys_thread_t:0xedf51db8, state:CW) prio=9
java.lang.Object.wait(Object.java)
sun.awt.AWTFinalizer.run(AWTFinalizer.java:48)
"Screen Updater" (TID:0xee707a20, sys_thread_t:0xedf81db8, state:CW) prio=4
java.lang.Object.wait(Object.java)
sun.awt.ScreenUpdater.nextEntry(ScreenUpdater.java:78)7
sun.awt.ScreenUpdater.run(ScreenUpdater.java:98)
"AWT-Motif" (TID:0xee704f28, sys_thread_t:0xedfb1db8, state:R) prio=5 *current thread*
java.lang.Thread.run(Thread.java)
"AWT-Input" (TID:0xee704f48, sys_thread_t:0xedfe1db8, state:CW) prio=5
"AWT-EventQueue-0" (TID:0xee704f60, sys_thread_t:0xee011db8, state:CW) prio=5
java.lang.Object.wait(Object.java)
java.awt.EventQueue.getNextEvent(EventQueue.java:119)
java.awt.EventDispatchThread.run(EventDispatchThread.java:55)
"Finalizer thread" (TID:0xee700220, sys_thread_t:0xee2c1db8, state:CW) prio=1
"Async Garbage Collector" (TID:0xee700268, sys_thread_t:0xee2f1db8, state:CW) prio=1
"Idle thread" (TID:0xee7002b0, sys_thread_t:0xee3c1db8, state:R) prio=0
"Clock" (TID:0xee700088, sys_thread_t:0xee3f1db8, state:CW) prio=12
"main" (TID:0xee7000b0, sys_thread_t:0x69368, state:CW) prio=5
Monitor Cache Dump:
java.awt.EventQueue@EE704FB0/EE750378: <unowned>
Waiting to be notified:
"AWT-EventQueue-0" (0xee011db8)
sun.awt.AWTFinalizer@EE7077B8/EE754A48: <unowned>
Waiting to be notified:
"AWT-Finalizer" (0xedf51db8)
sun.awt.motif.MToolkit@EE704D20/EE750288: owner "AWT-Motif" (0xedfb1db8, 1 entry)
Waiting to be notified:
"AWT-Input" (0xedfe1db8)
<unknown key> (0xee2f1db8): <unowned>
Waiting to be notified:
"Async Garbage Collector" (0xee2f1db8)
sun.awt.ScreenUpdater@EE707A20/EE758768: <unowned>
Waiting to be notified:
"Screen Updater" (0xedf81db8)
Registered Monitor Dump:
Thread queue lock: <unowned>
Waiting to be notified:
"main" (0x69368)
Name and type hash table lock: <unowned>
String intern lock: <unowned>
JNI pinning lock: <unowned>
JNI global reference lock: <unowned>
BinClass lock: <unowned>
Class loading lock: <unowned>
Java stack lock: <unowned>
Code rewrite lock: <unowned>
Heap lock: <unowned>
Has finalization queue lock: <unowned>
Finalize me queue lock: <unowned>
Waiting to be notified:
"Finalizer thread" (0xee2c1db8)
Monitor IO lock: <unowned>
Child death monitor: <unowned>
Event monitor: <unowned>
I/O monitor: <unowned>
Alarm monitor: <unowned>
Waiting to be notified:
"Clock" (0xee3f1db8)
Sbrk lock: <unowned>
Monitor registry: owner "AWT-Motif" (0xedfb1db8, 1 entry)
Thread Alarm Q:
sys_thread_t 0xee2f1db8 [Timeout in 29 ms]
Abort
----- Crash on Solaris 2.5.1 using JDK 1.2: -----
SIGSEGV 11* segmentation violation
si_signo [11]: SIGSEGV 11* segmentation violation
si_errno [0]: Error 0
si_code [1]: SEGV_MAPERR [addr: 0x4]
stackbase=EDD32000, stackpointer=EDD3155C
Full thread dump:
"AWT-Finalizer" (TID:0xee307bb0, sys_thread_t:0x4389cc, state:CW) prio=9
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:309)
at sun.awt.AWTFinalizer.run(AWTFinalizer.java:47)
"Screen Updater" (TID:0xee3071e8, sys_thread_t:0x48c65c, state:CW) prio=4
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:309)
at sun.awt.ScreenUpdater.nextEntry(ScreenUpdater.java:81)
at sun.awt.ScreenUpdater.run(ScreenUpdater.java:101)
"AWT-Motif" (TID:0xee303f48, sys_thread_t:0x440064, state:R) prio=5 *current thread*
at sun.awt.motif.MToolkit.run(Native Method)
at java.lang.Thread.run(Thread.java:484)
"AWT-Input" (TID:0xee303f70, sys_thread_t:0x441de4, state:CW) prio=5
at java.lang.Object.wait(Native Method)
at sun.awt.motif.InputThread.run(Native Method)
"AWT-EventQueue-0" (TID:0xee303d68, sys_thread_t:0x3f689c, state:CW) prio=5
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:309)
at java.awt.EventQueue.getNextEvent(EventQueue.java:114)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:44)
"CachedReference sweeper" (TID:0xee300d30, sys_thread_t:0xe08e4, state:CW) prio=9
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:309)
at java.lang.Runtime.waitForMemoryAdvice(Runtime.java:569)
at java.lang.ref.CachedReference$Sweeper.run(CachedReference.java:342)
at java.lang.Thread.run(Thread.java:484)
"Finalizer" (TID:0xee300368, sys_thread_t:0xc2e5c, state:CW) prio=8
at java.lang.Object.wait(Native Method)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:86)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:99)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:131)
"Reference handler" (TID:0xee300438, sys_thread_t:0xca35c, state:CW) prio=10
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:309)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:198)
"Async Garbage Collector" (TID:0xee3001f8, sys_thread_t:0xc5564, state:CW) prio=1
"Idle thread" (TID:0xee300240, sys_thread_t:0xc545c, state:R) prio=0
"Clock" (TID:0xee300088, sys_thread_t:0x8aea4, state:CW) prio=12
"main" (TID:0xee3000b0, sys_thread_t:0x209fc, state:CW) prio=5
Monitor Cache Dump:
sun.awt.motif.MToolkit@EE303DE8/EE36B130: owner "AWT-Motif" (0x440064, 1 entry)
Waiting to be notified:
"AWT-Input" (0x441de4)
Registered Monitor Dump:
utf8 hash table: <unowned>
JNI pinning lock: <unowned>
JNI global reference lock: <unowned>
BinClass lock: <unowned>
Class linking lock: <unowned>
Code rewrite lock: <unowned>
Heap lock: <unowned>
Monitor IO lock: <unowned>
Child death monitor: <unowned>
Event monitor: <unowned>
I/O monitor: <unowned>
Alarm monitor: <unowned>
Waiting to be notified:
"Clock" (0x8aea4)
Sbrk lock: <unowned>
Monitor cache expansion lock: <unowned>
Thread queue lock: <unowned>
Waiting to be notified:
"main" (0x209fc)
Monitor registry: owner "AWT-Motif" (0x440064, 1 entry)
Thread Alarm Q:
sys_thread_t 0xc5564 [Timeout in 49 ms]
Abort
---- Crash on Solaris 2.6 using JDK 1.1.5 ----
SIGSEGV 11* segmentation violation
si_signo [11]: SIGSEGV 11* segmentation violation
si_errno [0]: Error 0
si_code [1]: SEGV_MAPERR [addr: 0x4]
stackbase=EDF92000, stackpointer=EDF91668
Full thread dump:
"Image Fetcher 3" (TID:0xee6ed350, sys_thread_t:0xede71db8, state:CW) prio=8
sun.awt.image.ImageFetcher.nextImage(ImageFetcher.java:109)
sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:146)
sun.awt.image.ImageFetcher.run(ImageFetcher.java:127)
"AWT-Finalizer" (TID:0xee70c5b0, sys_thread_t:0xedea1db8, state:CW) prio=9
java.lang.Object.wait(Object.java)
sun.awt.AWTFinalizer.run(AWTFinalizer.java:48)
"TimerQueue" (TID:0xee70b668, sys_thread_t:0xedf01db8, state:CW) prio=4
com.sun.java.swing.TimerQueue.run(TimerQueue.java:235)
java.lang.Thread.run(Thread.java)
"Screen Updater" (TID:0xee70b598, sys_thread_t:0xedf31db8, state:CW) prio=4
java.lang.Object.wait(Object.java)
sun.awt.ScreenUpdater.nextEntry(ScreenUpdater.java:78)
sun.awt.ScreenUpdater.run(ScreenUpdater.java:98)
"AWT-Motif" (TID:0xee706ba0, sys_thread_t:0xedf91db8, state:R) prio=5
*current thread*
java.lang.Thread.run(Thread.java)
"AWT-Input" (TID:0xee706bc0, sys_thread_t:0xedfc1db8, state:CW) prio=5
"AWT-EventQueue-0" (TID:0xee706aa0, sys_thread_t:0xedff1db8, state:CW) prio=5
java.lang.Object.wait(Object.java)
java.awt.EventQueue.getNextEvent(EventQueue.java:119)
java.awt.EventDispatchThread.run(EventDispatchThread.java:56)
"Finalizer thread" (TID:0xee700220, sys_thread_t:0xee2c1db8, state:CW) prio=1
"Async Garbage Collector" (TID:0xee700268, sys_thread_t:0xee2f1db8, state:CW) prio=1
"Idle thread" (TID:0xee7002b0, sys_thread_t:0xee3c1db8, state:R) prio=0
"Clock" (TID:0xee700088, sys_thread_t:0xee3f1db8, state:CW) prio=12
"main" (TID:0xee7000b0, sys_thread_t:0x95fe0, state:CW) prio=5
Monitor Cache Dump:
sun.awt.AWTFinalizer@EE70C5B0/EE76C0B0: <unowned>
Waiting to be notified:
"AWT-Finalizer" (0xedea1db8)
sun.awt.motif.MToolkit@EE706B20/EE754FF8: owner "AWT-Motif" (0xedf91db8, 1
entry)
Waiting to be notified:
"AWT-Input" (0xedfc1db8)
sun.awt.ScreenUpdater@EE70B598/EE765DC8: <unowned>
Waiting to be notified:
"Screen Updater" (0xedf31db8)
com.sun.java.swing.TimerQueue@EE70B658/EE7686C0: <unowned>
Waiting to be notified:
"TimerQueue" (0xedf01db8)
<unknown key> (0xee2f1db8): <unowned>
Waiting to be notified:
"Async Garbage Collector" (0xee2f1db8)
java.awt.EventQueue@EE706AF0/EE7550E8: <unowned>
Waiting to be notified:
"AWT-EventQueue-0" (0xedff1db8)
java.util.Vector@EE708800/EE76C628: <unowned>
Waiting to be notified:
"Image Fetcher 3" (0xede71db8)
Registered Monitor Dump:
Thread queue lock: <unowned>
Waiting to be notified:
"main" (0x95fe0)
Name and type hash table lock: <unowned>
String intern lock: <unowned>
JNI pinning lock: <unowned>
JNI global reference lock: <unowned>
BinClass lock: <unowned>
Class loading lock: <unowned>
Java stack lock: <unowned>
Code rewrite lock: <unowned>
Heap lock: <unowned>
Has finalization queue lock: <unowned>
Finalize me queue lock: <unowned>
Waiting to be notified:
"Finalizer thread" (0xee2c1db8)
Monitor IO lock: <unowned>
Child death monitor: <unowned>
Event monitor: <unowned>
I/O monitor: <unowned>
Alarm monitor: <unowned>
Waiting to be notified:
"Clock" (0xee3f1db8)
Sbrk lock: <unowned>
Monitor registry: owner "AWT-Motif" (0xedf91db8, 1 entry)
Thread Alarm Q:
sys_thread_t 0xee2f1db8 [Timeout in 620 ms]
Abort - core dumped
Name: joT67522 Date: 01/08/98
My program worked fine on jdk1.1.1, (and IE4)
when i upgraded to jdk1.1.5, it crashed on the first mouse pick.
which does a removeAll and re-laysout the panels.
This example program will also crash,
but you may need to click the mouse rapidly
and possibly move while clicking. Sometimes crashes
after 5-10 clicks, other times may need a bunch,
it may be load-dependent. My more complex app crashes
reliably, without much effort.
I have a Sparc-2, running Solaris-2.4
This bug may be related to 4073905
TestBug.java:
import java.awt.*;
public class TestBug extends Panel {
boolean singleDisp = true;
LayoutManager gridLM = null;
LayoutManager borderLM = null;
static int kk = 50;
class dispPanel extends Panel {
dispPanel(Color c) {super(); setBackground(c);}
public Dimension preferredSize() {return new Dimension(200,200);}
// bug can be provoked without any paint(), but since the bug
// seems to be time dependent, this may help...
public void paint(Graphics g) {
Dimension s = size();
int x = s.width;
int y = s.height;
for(int i = 0; i<kk; i++)
for(int j = 0; j<kk; j++)
g.drawLine(i*x/kk,i*y/kk,j*x/kk,j*y/kk);
}
// in my actual app, code as simple as this will cause a crash...
// especially if mouse is moving during the click.
public void paint1(Graphics g) {
Dimension s = size();
int xtc = s.width/2-10;
g.setPaintMode(); // overwrite vs XOR mode
g.setColor(Color.green); // indicate NO DATA
g.drawString("Bug?", xtc, s.height-1);
g.setColor(Color.black);
g.drawLine(xtc, 0, xtc, s.height); // right edge mark
}
}
Panel disp1 = new dispPanel(Color.blue) ;
Panel disp2 = new dispPanel(Color.red) ;
Panel disp3 = new dispPanel(Color.green) ;
public TestBug() {
this.setBackground(Color.magenta);
if(gridLM == null) gridLM = new GridLayout(0,2,4,4);
if(borderLM==null) borderLM = new BorderLayout();
layoutDisplay(disp1);
}
public void layoutDisplay(Panel disp) {
removeAll();
if(singleDisp) { // toggle layouts
singleDisp = false;
setLayout(gridLM);
add(disp1); // in real app we add several Panels
add(disp2); // in real app we add several Panels
} else {
singleDisp = true;
setLayout(borderLM);
add("Center",disp); // can use disp3 here...
}
validate();
}
public boolean handleEvent(Event e) {
switch (e.id) {
case Event.MOUSE_DOWN:
if(e.target instanceof dispPanel) {
layoutDisplay((Panel)e.target);
return true;
}
default:
return false;
}
}
public static void main(String args[]) {
if (args.length>0) kk = Integer.parseInt(args[0]);
Frame mf = new Frame("TestBug");
mf.setSize(200,200);
mf.add (new TestBug());
mf.pack();
mf.show();
}
}
whitney<101> javac TestBug.java
Note: TestBug.java uses a deprecated API. Recompile with "-deprecation" for details.
1 warning
whitney<102> java TestBug
SIGSEGV 11* segmentation violation
si_signo [11]: SIGSEGV 11* segmentation violation
si_errno [0]: Error 0
si_code [1]: SEGV_MAPERR [addr: 0x4]
stackbase=EDFF1000, stackpointer=EDFEF7F8
Full thread dump:
"AWT-Finalizer" (TID:0xee306800, sys_thread_t:0xedf90db8, state:CW) prio=9
java.lang.Object.wait(Object.java)
sun.awt.AWTFinalizer.run(AWTFinalizer.java:48)
"Screen Updater" (TID:0xee306e30, sys_thread_t:0xedfc0db8, state:CW) prio=4
java.lang.Object.wait(Object.java)
sun.awt.ScreenUpdater.nextEntry(ScreenUpdater.java:78)
sun.awt.ScreenUpdater.run(ScreenUpdater.java:98)
"AWT-Motif" (TID:0xee304fa8, sys_thread_t:0xedff0db8, state:R) prio=5 *current thread*
java.lang.Thread.run(Thread.java)
"AWT-Input" (TID:0xee304d08, sys_thread_t:0xef030db8, state:MW) prio=5
"AWT-EventQueue-0" (TID:0xee304e70, sys_thread_t:0xef310db8, state:MW) prio=5
sun.awt.motif.MComponentPeer.initialize(MComponentPeer.java:69)
sun.awt.motif.MComponentPeer.<init>(MComponentPeer.java:126)
sun.awt.motif.MCanvasPeer.<init>(MCanvasPeer.java:35)
sun.awt.motif.MPanelPeer.<init>(MPanelPeer.java:29)
sun.awt.motif.MToolkit.createPanel(MToolkit.java:135)
java.awt.Panel.addNotify(Panel.java:76)
java.awt.Container.addImpl(Container.java:313)
java.awt.Container.add(Container.java:189)
TestBug.layoutDisplay(TestBug.java:55)
TestBug.handleEvent(TestBug.java:64)
java.awt.Component.postEvent(Component.java:1884)
java.awt.Component.postEvent(Component.java:1894)
java.awt.Component.dispatchEventImpl(Component.java:1776)
java.awt.Container.dispatchEventImpl(Container.java:939)
java.awt.Component.dispatchEvent(Component.java:1704)
java.awt.EventDispatchThread.run(EventDispatchThread.java:63)
"Finalizer thread" (TID:0xee300220, sys_thread_t:0xef360db8, state:CW) prio=1
"Async Garbage Collector" (TID:0xee300268, sys_thread_t:0xef390db8, state:R) prio=1
"Idle thread" (TID:0xee3002b0, sys_thread_t:0xef3c0db8, state:R) prio=0
"Clock" (TID:0xee300088, sys_thread_t:0xef3f0db8, state:CW) prio=12
"main" (TID:0xee3000b0, sys_thread_t:0x69290, state:CW) prio=5
Monitor Cache Dump:
sun.awt.motif.MToolkit@EE304DA0/EE34F868: owner "AWT-Motif" (0xedff0db8, 1 entry)
Waiting to enter:
"AWT-Input" (0xef030db8)
"AWT-EventQueue-0" (0xef310db8)
java.lang.Object@EE303DB8/EE34C9B0: owner "AWT-EventQueue-0" (0xef310db8, 1 entry)
<unknown key> (0xef390db8): owner "Async Garbage Collector" (0xef390db8, 1 entry)
sun.awt.AWTFinalizer@EE306800/EE357790: <unowned>
Waiting to be notified:
"AWT-Finalizer" (0xedf90db8)
sun.awt.ScreenUpdater@EE306E30/EE357470: <unowned>
Waiting to be notified:
"Screen Updater" (0xedfc0db8)
Registered Monitor Dump:
Thread queue lock: <unowned>
Waiting to be notified:
"main" (0x69290)
Name and type hash table lock: <unowned>
String intern lock: <unowned>
JNI pinning lock: <unowned>
JNI global reference lock: <unowned>
BinClass lock: <unowned>
Class loading lock: <unowned>
Java stack lock: <unowned>
Code rewrite lock: <unowned>
Heap lock: <unowned>
Has finalization queue lock: <unowned>
Finalize me queue lock: <unowned>
Waiting to be notified:
"Finalizer thread" (0xef360db8)
Monitor IO lock: <unowned>
Child death monitor: <unowned>
Event monitor: <unowned>
I/O monitor: <unowned>
Alarm monitor: <unowned>
Waiting to be notified:
"Clock" (0xef3f0db8)
Sbrk lock: <unowned>
Monitor registry: owner "AWT-Motif" (0xedff0db8, 1 entry)
Thread Alarm Q:
Abort (core dumped)
(Review ID: 22929)
======================================================================
Compile and run the enclosed TestBug.
It will display grid with a Red and Green panel.
On each mouse down, the Green Panel is replaced
(toggles) with a Blue Panel.
The results, running JDK1.1.5 on
Solaris-2.4 on a Sparc-5 are:
1. click the red panel, the green&blue panel toggles
the system does not [generally] crash.
Run TestBug again:
2.click the Green Panel, it is replaced by Blue panel.
click the Blue panel, JVM crashes.
3. run TestBug. click down ONLY on the green panel
wait a second, the release mouse button up,
panel toggles correctly to blue.
click down only on blue, it toggles to green,
wait and release mouse, no crash.
click down/up, once or twice, it will crash.
4. run TestBug. click the red panel several times,
let's pretend this gets the panel switching data
structures all greased up. now click on the Green
or blue panel, IT WORKS,over and over...
But if you click long enough and fast enough, i
suspect it will eventually crash.
I filed a report on this bug yesterday, with a
more complex test program, this simpler version,
actually crashes more reliably.
The program from which this is derived worked
without problems in JDK1.1.1, and IE4, when i
upgraded to jdk1.1.5 it immediately crashed.
[after i had deleted jdk1.1.1, so i have not
tried TestBug on other than jdk1.1.5]
TestBug.java:
import java.awt.*;
public class TestBug extends Panel {
class dispPanel extends Panel {
dispPanel(Color c) {super(); setBackground(c);}
public Dimension preferredSize() {return new Dimension(200,200);}
}
Panel dispRed = new dispPanel(Color.red) ;
Panel dispGrn = new dispPanel(Color.green) ;
Panel dispBlu = new dispPanel(Color.blue) ;
boolean addGrn = true;
LayoutManager gridLM = new GridLayout(0,2,4,4);
public TestBug() {
this.setBackground(Color.magenta);
setLayout(gridLM);
add(dispRed);
add(dispBlu);
layoutDisplay();
}
public void layoutDisplay() {
if(addGrn) { // toggle layout
remove(dispBlu);
add(dispGrn); // Red & Green
} else {
remove(dispGrn);
add(dispBlu); // Red & Blue
}
addGrn = !addGrn;
validate();
}
public boolean handleEvent(Event e) {
switch (e.id) {
case Event.MOUSE_DOWN:
if(e.target instanceof dispPanel) {
layoutDisplay();
return true;
}
default:
return false;
}
}
public static void main(String args[]) {
Frame mf = new Frame("TestBug");
mf.add ( new TestBug());
mf.pack();
mf.show();
}
}
whitney<75> java TestBug
SIGSEGV 11* segmentation violation
si_signo [11]: SIGSEGV 11* segmentation violation
si_errno [0]: Error 0
si_code [1]: SEGV_MAPERR [addr: 0x4]
stackbase=EDFF1000, stackpointer=EDFF0668
Full thread dump:
"AWT-Finalizer" (TID:0xee306558, sys_thread_t:0xedf90db8, state:CW) prio=9
java.lang.Object.wait(Object.java)
sun.awt.AWTFinalizer.run(AWTFinalizer.java:48)
"Screen Updater" (TID:0xee306e28, sys_thread_t:0xedfc0db8, state:CW) prio=4
java.lang.Object.wait(Object.java)
sun.awt.ScreenUpdater.nextEntry(ScreenUpdater.java:78)
sun.awt.ScreenUpdater.run(ScreenUpdater.java:98)
"AWT-Motif" (TID:0xee304fb8, sys_thread_t:0xedff0db8, state:R) prio=5 *current thread*
java.lang.Thread.run(Thread.java)
"AWT-Input" (TID:0xee304d20, sys_thread_t:0xef030db8, state:CW) prio=5
"AWT-EventQueue-0" (TID:0xee304d38, sys_thread_t:0xef310db8, state:CW) prio=5
java.lang.Object.wait(Object.java)
java.awt.EventQueue.getNextEvent(EventQueue.java:119)
java.awt.EventDispatchThread.run(EventDispatchThread.java:55)
"Finalizer thread" (TID:0xee300220, sys_thread_t:0xef360db8, state:CW) prio=1
"Async Garbage Collector" (TID:0xee300268, sys_thread_t:0xef390db8, state:CW) prio=1
"Idle thread" (TID:0xee3002b0, sys_thread_t:0xef3c0db8, state:R) prio=0
"Clock" (TID:0xee300088, sys_thread_t:0xef3f0db8, state:CW) prio=12
"main" (TID:0xee3000b0, sys_thread_t:0x69290, state:CW) prio=5
Monitor Cache Dump:
sun.awt.motif.MToolkit@EE304DB8/EE34FAB8: owner "AWT-Motif" (0xedff0db8, 1 entry)
Waiting to be notified:
"AWT-Input" (0xef030db8)
java.awt.EventQueue@EE304D88/EE34FBA8: <unowned>
Waiting to be notified:
"AWT-EventQueue-0" (0xef310db8)
sun.awt.AWTFinalizer@EE306558/EE357800: <unowned>
Waiting to be notified:
"AWT-Finalizer" (0xedf90db8)
<unknown key> (0xef390db8): <unowned>
Waiting to be notified:
"Async Garbage Collector" (0xef390db8)
sun.awt.ScreenUpdater@EE306E28/EE3574B8: <unowned>
Waiting to be notified:
"Screen Updater" (0xedfc0db8)
Registered Monitor Dump:
Thread queue lock: <unowned>
Waiting to be notified:
"main" (0x69290)
Name and type hash table lock: <unowned>
String intern lock: <unowned>
JNI pinning lock: <unowned>
JNI global reference lock: <unowned>
BinClass lock: <unowned>
Class loading lock: <unowned>
Java stack lock: <unowned>
Code rewrite lock: <unowned>
Heap lock: <unowned>
Has finalization queue lock: <unowned>
Finalize me queue lock: <unowned>
Waiting to be notified:
"Finalizer thread" (0xef360db8)
Monitor IO lock: <unowned>
Child death monitor: <unowned>
Event monitor: <unowned>
I/O monitor: <unowned>
Alarm monitor: <unowned>
Waiting to be notified:
"Clock" (0xef3f0db8)
Sbrk lock: <unowned>
Monitor registry: owner "AWT-Motif" (0xedff0db8, 1 entry)
Thread Alarm Q:
sys_thread_t 0xef390db8 [Timeout in 493 ms]
Abort (core dumped)
whitney<76>
=====================================================================
Another report of this problem, sheri.good@Eng 1998-01-27. This
bug appears to be a regression from 1.1.4 to 1.1.5.
This bug happens on JDK 1.1.5 and JDK 1.2. Can not get it to
crash in 1.1.4
Current Environment:
1. Ultra Sparc I, 128MBytes RAM
2. Solaris 2.6
3. JRE/JDK 1.2 (happens on JDK 1.15 also)
To compile program:
Here is the program that can crash AWT easily.
To compile it :
javac awtTest.java
To run it:
java awtTest
On the window that comes up, click "OK" button, that will pop up another
dialog. On that dialog, hold the mouse button over cancel button and then
while releasing it, click the button also. The program will crash. This is
using JDK 1.1.5
-------- begin included program ----------
import java.awt.*;
import java.awt.event.*;
import java.lang.*;
import java.util.*;
public class awtTest extends Frame implements ActionListener {
Button bOk;
Button bCancel;
public awtTest() {
setTitle("AWT Test");
setResizable(false);
Panel panel = new Panel(); // panel for whole window
panel.setLayout(new BorderLayout());
Panel bpanel = new Panel(); // panel for whole window
bpanel.setLayout(new FlowLayout(FlowLayout.CENTER, 20, 5));
add("Center", panel);
panel.add("Center", new Label("This is AWT test"));
bOk = new Button("OK");
bpanel.add(bOk);
bOk.addActionListener(this);
bCancel = new Button("Cancel");
bpanel.add(bCancel);
bCancel.addActionListener(this);
add("South", bpanel);
pack();
}
public static void main(String []args) {
Frame f = new awtTest();
f.setResizable(false);
f.show();
}
public void okCB() {
awtDialog ad = new awtDialog(this);
}
public void cancelCB() {
System.exit(0);
}
public void actionPerformed (ActionEvent evt) {
if(evt.getActionCommand().equals("OK"))
okCB();
else if(evt.getActionCommand().equals("Cancel")) {
cancelCB();
}
}
}
class awtDialog extends Dial