JDK-4821108 : IIOException thrown when reading PNG images
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.imageio
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_7
  • CPU: sparc
  • Submitted: 2003-02-20
  • Updated: 2003-03-11
  • Resolved: 2003-03-11
Related Reports
Duplicate :  
Description
on solaris 5.7:

tested using latest Mantis promoted build.

When reading a PNG image via http, sometimes IIOException is thrown, sometimes it doesn't.

The following  testcase is attached.

/java/re/jdk/1.4.2/promoted/latest/binaries/solaris-sparc/bin/java -Xmx500m -Xms100m -jar CinPrint.jar http://javaweb.sfbay/~ngthomas/kolotyluk/stefan_full_rgba.png
Constructing CinPrintFrame...
raw image source = http://javaweb.sfbay/~ngthomas/kolotyluk/stefan_full_rgba.png
loading image...
javax.imageio.IIOException: Unknown row filter type (= 14)!
        at com.sun.imageio.plugins.png.PNGImageReader.decodePass(PNGImageReader.java:1196)
        at com.sun.imageio.plugins.png.PNGImageReader.decodeImage(PNGImageReader.java:1287)
        at com.sun.imageio.plugins.png.PNGImageReader.readImage(PNGImageReader.java:1362)
        at com.sun.imageio.plugins.png.PNGImageReader.read(PNGImageReader.java:1530)
        at javax.imageio.ImageReader.read(ImageReader.java:919)
        at CinPrintFrame.getBufferedImage(CinPrintFrame.java:310)
        at CinPrintFrame.<init>(CinPrintFrame.java:75)
        at CinPrint.main(CinPrint.java:116)
Error reading PNG image data: Retrying image loading!
loading image...
image loaded.
raw image width  = 162
raw image height = 150
drawing screen image...
CinPrintFrame constructed...
scale = 0.4046875
exiting...


I tried on WinNT and XP home, cannot reproduce the problem.


###@###.### 2003-02-19

tried without the -Xmx500m -Xms100m arguments, same problem.  customer used the specific heap sizes because they said they need it for their application.  they need to load PNG images that are 40+mb in sizes.

###@###.### 2003-02-19

Comments
EVALUATION Need to investigate for tiger. ###@###.### 2003-02-24 > On a similar way, I started running my software on our production server > and found a similar but more alarming problem that's worth passing on to > the imagIO team, especially the PNG people. When I use a browser from my > lab at home, and use an applet to load a JPG image - fine. When I try to > load a PNG image with the same applet it throws a ZipException every > time, looping through retries forever. From what I see in the console > it's always throwing a ZipException. > > You can try the production server at http://reid.actinc.bc.ca:8080/www > (note this is a restricted development site). The anonymous ftp support > is not enable on this server. additional testcase from the customer. ###@###.### 2003-02-26 Name: abR10136 Date: 03/07/2003 This problem is easily reproducible with MS IIS and recent tiger builds (for instance 1.5.0b02) (and it is very hard to reproduce with Apache). However it is not reproducible on current devel build from Tiger workspace. On other hand observed symtopms are not stable - in some cases i see "javax.imageio.IIOException: Unknown row filter type" error in others - "java.util.zip.ZipException: incomplete literal/length tree". Therefore it looks like the problem is caused by broken input stream for image. Described problem occurs only when we do not use ImageIO cache (i.e. ImageIO.setUseCache(false);) Therefore problem is related to MemoryCacheImageInputStream. Similar problem was recently fixed as part of 4764639. Fix is integrated into current workspace and this is why I can not reproduce problem reported here with devel build. I also checked that rollback of patch for 4764639 resurrect the problem. So I conclude this bug is duplicate of 4764639. ======================================================================
21-08-2004

WORK AROUND customer suggested work around: reload the image again until it loads properly and does not throw exception.
21-08-2004