-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.3.0
-
x86
-
windows_nt
Name: skT45625 Date: 05/19/2000
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
/*
Test program demonstrating a VM hangup on multiprocessor
Intel machines
This program executes properly on all PCs in our
department having a single processor.
It causes the VM to sleep forever when executed on
a DELL server with 4 Xeon processors.
The file "open.gif" referred to in this program is the 'open' icon
provided in many of SUN's java sources. The bug is however
independent of the icon chosen.
*/
import java.awt.*;
import javax.swing.*;
import java.net.*;
import java.util.*;
public class IcoTest
{
public static void main(String args[])
{
System.out.println("--> started ...");
int iconSize = 16;
String file = "open.gif";
for(int i=0; i<50; i++)
{
loadImageIcon(file, "", iconSize);
}
System.out.println("--> done.");
System.exit(0);
}
//---------------------------------------------------------------
public static ImageIcon loadImageIcon(
String filename, String description, int scale)
{
ImageIcon ico = new ImageIcon(filename, description);
Image image = ico.getImage();
// scale the icons to the desired size
// The next 2 lines are critical: they cause the hangup
image = image.getScaledInstance(scale, scale,
Image.SCALE_SMOOTH);
ico = new ImageIcon(image, description);
return ico;
}
//---------------------------------------------------------------
}
(Review ID: 105107)
======================================================================
- duplicates
-
JDK-4332685 AbstractButton.getDisabledIcon can cause the VM to hang! (dual-processor box)
- Closed