JDK-4339789 : JVM falls asleep when creating ImageIcons on multiprocessor machine
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.3.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_nt
  • CPU: x86
  • Submitted: 2000-05-19
  • Updated: 2000-09-15
  • Resolved: 2000-09-15
Related Reports
Duplicate :  
Description

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) 
======================================================================

Comments
WORK AROUND Name: skT45625 Date: 05/19/2000 none ======================================================================
11-06-2004

EVALUATION I am reassigning this to 2D, as I believe this is a duplicate of 4332685 that Dmitri fixed. scott.violet@eng 2000-09-15 I've verified that this is a duplicate of 4332685: when run on multi-cpu machine t hangs at the same place when run on the workspace w/o the fix for 4332685 (Kestrel Win32, build build 1.3.0). It does not manifest neither on Kestrel Solaris nor Merlin-beta (1.4.0beta-b32) dmitri.trembovetski@eng 2000-09-15
15-09-2000