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

"IIOException: Field data is past end-of-stream" when calling TIFFImageReader.read()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • client-libs

      Tested on Ubuntu 14.04 Linux with current (09 Dec.) build of client repository.

      Please compile/run 'LoadTest.java' and try to load the image attached.

      Output:
      == Loading 3755b21390a93c1474aef88f4162de17.tif ==
      NOK: read() Field data is past end-of-stream
      javax.imageio.IIOException: Field data is past end-of-stream
              at com.sun.imageio.plugins.tiff.TIFFIFD.initialize(TIFFIFD.java:520)
              at com.sun.imageio.plugins.tiff.TIFFImageMetadata.initializeFromStream(TIFFImageMetadata.java:87)
              at com.sun.imageio.plugins.tiff.TIFFImageReader.readMetadata(TIFFImageReader.java:306)
              at com.sun.imageio.plugins.tiff.TIFFImageReader.seekToImage(TIFFImageReader.java:280)
              at com.sun.imageio.plugins.tiff.TIFFImageReader.prepareRead(TIFFImageReader.java:921)
              at com.sun.imageio.plugins.tiff.TIFFImageReader.read(TIFFImageReader.java:1096)
              at javax.imageio.ImageReader.read(ImageReader.java:939)
              at LoadTest.Load(LoadTest.java:57)
              at LoadTest.main(LoadTest.java:76)

      But the image could be loaded using, e.g., GNOME Image Viewer and even old (JAI-based) java code. The issue is also reproducible on Mac OS X 10.10.

            bpb Brian Burkhalter
            avstepan Alexander Stepanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: