Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2017199 | 1.2.0 | Zhenghua Li | P2 | Resolved | Fixed | 1.2fcs |
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.
======================================================================
- backported by
-
JDK-2017199 AFTER PIXELSTORE FOR IMAGES LOADED FROM JARS IS GC'D, IMAGE CAN'T BE RECREATED
- Resolved
- duplicates
-
JDK-4083113 resconstitute fails for images loaded from jar files
- Closed
-
JDK-4085312 JarImageSource only works once
- Closed