Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4339789

JVM falls asleep when creating ImageIcons on multiprocessor machine

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P4
    • None
    • 1.3.0
    • client-libs
    • 2d
    • x86
    • windows_nt

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

      Attachments

        Issue Links

          Activity

            People

              tdv Dmitri Trembovetski (Inactive)
              skondamasunw Suresh Kondamareddy (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: