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

PIT: VM crashes when resizing a frame while images are being loaded

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 6
    • 6
    • client-libs
    • 2d
    • mustang
    • x86
    • windows_xp
    • Verified

      I have written an application in ImageIO where 3 images are read from a file and rendered on the screen one after the other, in separate threads. I am using one gif, one jpg and one png image. The images are rendered to a canvas added to the frame. I am trying to resize the frame when the images are being loaded one after the other and the VM crashes.

      This is reproducible only on Win32 platforms (tested with WinXP), only in the following PIT build:

      java version "2d.pit-jcg-win-01-2004-08-27.mustang"
      Java(TM) 2 Runtime Environment, Standard Edition (build 2d.pit-jcg-win-01-2004-08-27.mustang)
      Java HotSpot(TM) Client VM (build 1.5.0-rc-b63, mixed mode)

      This is not reproducible on earlier builds. I tested with Tiger-rc (b63) and this is not reproducible.

      I have attached a sample test. Execute the sample test as follows.

      1. java BufferedFCIISTest
      2. You would get a Frame with a 'Load' button.
      3. Click the load button.
      4. You would see the images being loaded on to the frame.
      5. Resize the frame couple of times when the images are being loaded.
      (make sure resizing is done when image loading happens. Resizing afterwards will have no effect).

      If you see a VM crash, the bug is reproduced. I have also attached the log file created at the time of crash. When I looked at it more closely, the crash actually happens at the following line of code:

      sun.java2d.SurfaceData.setNeedsBackup(Z)V+27
      sun.awt.image.CachingSurfaceManager.copyDefaultToAccelerated()V+197
      sun.awt.image.CachingSurfaceManager.validate(Ljava/awt/GraphicsConfiguration;)V+105
      .....

      I looked into the web-revs for the bug fixes in this PIT build and I noticed that the following bug fix has made some changes to the above method:

      5042126: Managed Images: non-default surfaces do not get updated.
      http://javaweb.sfbay/jcg/1.6.0-mustang/2D/5042126

      So I think this has been introduced due to the above fix.
      --------------------------------------------------------------------------------

      The bug is actually reproducible on all platforms - see eval. for more info.

      ###@###.### 2004-09-02

            tdv Dmitri Trembovetski (Inactive)
            smandalisunw Srinivas Mandalika (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: