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

AFTER PIXELSTORE FOR IMAGES LOADED FROM JARS IS GC'D, IMAGE CAN'T BE RECREATED

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.1.7
    • 1.1.3, 1.1.4
    • tools
    • jar
    • b01
    • generic, x86, sparc
    • generic, solaris_2.5.1, windows_nt
    • Not verified



        Name: diC59631 Date: 10/01/97


        We are licensee (Oracle Corp.)
        Oracle bug #55547

        All AWT Images loaded from InputStreams keep a backing store of
        their data in a "PixelStore" object. These objects extend
        sun.misc.Ref, so that the garbage collector treats their line data
        as weakly referenced, and it will free up this line data when
        memory gets tight.
        When this happens, the sun.awt.image.InputStreamImageSource
        must re-create itself from its input stream.
        For images loaded from an URL, the getDecoder() method creates
        a new InputStream object from the URL, so this attempt to
        re-load the image works just fine.
        When the getDecoder() method is called for a sun.tools.jar.JarImageSource,
        however, the same input stream that was initially used to read
        the image is re-used. But since it's already been used, the input
        stream now points to the end of its stream, and any further attempts
        to read from it just result in EOF error codes being returned.
        It's impossible to write a simple test case - the problem only
        occurs in very large applications that start unloading images.
        However, this is the root cause of several showstopper Apps
        bugs, including 524099, 532182, and others.

        You can repro the bug by running Oracle Apps:

        1) appletviewer http://YOUR-ORACLE-APPS-SERVER-HERE/apps/COMWB161.html
        2) User GLOBAL, password GLOBAL16
        3) Select GL Manager GUI US1
        4) Select Journals:Enter
        5) When Find Journals and Enter Journals come up, take a look
          at the toolbar - some of its items should be blank. You may
          need to switch to the Enter Journals window, or switch
          to the Enter Journals window and enter a query to get it to
          repro. The exact point at which the bug repros varies from
          machine to machine.
        ======================================================================

              zlisunw Zhenghua Li (Inactive)
              dindrigo Daniel Indrigo (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: