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

Exceptions from TIFFImageReader.read() when loading bit depth test images

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: client-libs
    • Labels:

      Backports

        Description

        Please try to load the attached images with 'LoadTest.java' from JDK-8144997.

        Output:
        == Loading flower-minisblack-06.tif ==
        NOK: read() Bad value for bits!
        java.lang.IllegalArgumentException: Bad value for bits!
                at javax.imageio.ImageTypeSpecifier$Grayscale.<init>(ImageTypeSpecifier.java:584)
                at javax.imageio.ImageTypeSpecifier.createGrayscale(ImageTypeSpecifier.java:685)
                at com.sun.imageio.plugins.tiff.TIFFDecompressor.getRawImageTypeSpecifier(TIFFDecompressor.java:1126)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.getImageTypes(TIFFImageReader.java:703)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.prepareRead(TIFFImageReader.java:936)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.read(TIFFImageReader.java:1096)
                at javax.imageio.ImageReader.read(ImageReader.java:939)
                at LoadTest.Load(LoadTest.java:59)
                at LoadTest.main(LoadTest.java:78)

        == Loading flower-minisblack-10.tif ==
        NOK: read() Bad value for bits!
        java.lang.IllegalArgumentException: Bad value for bits!
                at javax.imageio.ImageTypeSpecifier$Grayscale.<init>(ImageTypeSpecifier.java:584)
                at javax.imageio.ImageTypeSpecifier.createGrayscale(ImageTypeSpecifier.java:685)
                at com.sun.imageio.plugins.tiff.TIFFDecompressor.getRawImageTypeSpecifier(TIFFDecompressor.java:1126)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.getImageTypes(TIFFImageReader.java:703)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.prepareRead(TIFFImageReader.java:936)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.read(TIFFImageReader.java:1096)
                at javax.imageio.ImageReader.read(ImageReader.java:939)
                at LoadTest.Load(LoadTest.java:59)
                at LoadTest.main(LoadTest.java:78)

        == Loading flower-minisblack-12.tif ==
        NOK: read() Bad value for bits!
        java.lang.IllegalArgumentException: Bad value for bits!
                at javax.imageio.ImageTypeSpecifier$Grayscale.<init>(ImageTypeSpecifier.java:584)
                at javax.imageio.ImageTypeSpecifier.createGrayscale(ImageTypeSpecifier.java:685)
                at com.sun.imageio.plugins.tiff.TIFFDecompressor.getRawImageTypeSpecifier(TIFFDecompressor.java:1126)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.getImageTypes(TIFFImageReader.java:703)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.prepareRead(TIFFImageReader.java:936)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.read(TIFFImageReader.java:1096)
                at javax.imageio.ImageReader.read(ImageReader.java:939)
                at LoadTest.Load(LoadTest.java:59)
                at LoadTest.main(LoadTest.java:78)

        == Loading flower-minisblack-14.tif ==
        NOK: read() Bad value for bits!
        java.lang.IllegalArgumentException: Bad value for bits!
                at javax.imageio.ImageTypeSpecifier$Grayscale.<init>(ImageTypeSpecifier.java:584)
                at javax.imageio.ImageTypeSpecifier.createGrayscale(ImageTypeSpecifier.java:685)
                at com.sun.imageio.plugins.tiff.TIFFDecompressor.getRawImageTypeSpecifier(TIFFDecompressor.java:1126)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.getImageTypes(TIFFImageReader.java:703)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.prepareRead(TIFFImageReader.java:936)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.read(TIFFImageReader.java:1096)
                at javax.imageio.ImageReader.read(ImageReader.java:939)
                at LoadTest.Load(LoadTest.java:59)
                at LoadTest.main(LoadTest.java:78)

        == Loading flower-minisblack-24.tif ==
        NOK: read() Bad value for bits!
        java.lang.IllegalArgumentException: Bad value for bits!
                at javax.imageio.ImageTypeSpecifier$Grayscale.<init>(ImageTypeSpecifier.java:584)
                at javax.imageio.ImageTypeSpecifier.createGrayscale(ImageTypeSpecifier.java:685)
                at com.sun.imageio.plugins.tiff.TIFFDecompressor.getRawImageTypeSpecifier(TIFFDecompressor.java:1126)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.getImageTypes(TIFFImageReader.java:703)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.prepareRead(TIFFImageReader.java:936)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.read(TIFFImageReader.java:1096)
                at javax.imageio.ImageReader.read(ImageReader.java:939)
                at LoadTest.Load(LoadTest.java:59)
                at LoadTest.main(LoadTest.java:78)

        == Loading flower-rgb-contig-12.tif ==
        NOK: read() 22725
        java.lang.ArrayIndexOutOfBoundsException: 22725
                at com.sun.imageio.plugins.tiff.TIFFDecompressor.decode(TIFFDecompressor.java:2802)
                at com.sun.imageio.plugins.tiff.TIFFNullDecompressor.decode(TIFFNullDecompressor.java:93)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.decodeTile(TIFFImageReader.java:1080)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.read(TIFFImageReader.java:1283)
                at javax.imageio.ImageReader.read(ImageReader.java:939)
                at LoadTest.Load(LoadTest.java:59)
                at LoadTest.main(LoadTest.java:78)

        == Loading flower-rgb-contig-14.tif ==
        NOK: read() 22729
        java.lang.ArrayIndexOutOfBoundsException: 22729
                at com.sun.imageio.plugins.tiff.TIFFDecompressor.decode(TIFFDecompressor.java:2802)
                at com.sun.imageio.plugins.tiff.TIFFNullDecompressor.decode(TIFFNullDecompressor.java:93)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.decodeTile(TIFFImageReader.java:1080)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.read(TIFFImageReader.java:1283)
                at javax.imageio.ImageReader.read(ImageReader.java:939)
                at LoadTest.Load(LoadTest.java:59)
                at LoadTest.main(LoadTest.java:78)

        == Loading flower-rgb-contig-24.tif ==
        NOK: read() 1482184792
        java.lang.ArrayIndexOutOfBoundsException: 1482184792
                at com.sun.imageio.plugins.tiff.TIFFDecompressor.decode(TIFFDecompressor.java:2802)
                at com.sun.imageio.plugins.tiff.TIFFNullDecompressor.decode(TIFFNullDecompressor.java:93)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.decodeTile(TIFFImageReader.java:1080)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.read(TIFFImageReader.java:1283)
                at javax.imageio.ImageReader.read(ImageReader.java:939)
                at LoadTest.Load(LoadTest.java:59)
                at LoadTest.main(LoadTest.java:78)

        == Loading flower-rgb-planar-12.tif ==
        NOK: read() 22725
        java.lang.ArrayIndexOutOfBoundsException: 22725
                at com.sun.imageio.plugins.tiff.TIFFDecompressor.decode(TIFFDecompressor.java:2802)
                at com.sun.imageio.plugins.tiff.TIFFNullDecompressor.decode(TIFFNullDecompressor.java:93)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.decodeTile(TIFFImageReader.java:1080)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.read(TIFFImageReader.java:1274)
                at javax.imageio.ImageReader.read(ImageReader.java:939)
                at LoadTest.Load(LoadTest.java:59)
                at LoadTest.main(LoadTest.java:78)

        == Loading flower-rgb-planar-14.tif ==
        NOK: read() 22729
        java.lang.ArrayIndexOutOfBoundsException: 22729
                at com.sun.imageio.plugins.tiff.TIFFDecompressor.decode(TIFFDecompressor.java:2802)
                at com.sun.imageio.plugins.tiff.TIFFNullDecompressor.decode(TIFFNullDecompressor.java:93)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.decodeTile(TIFFImageReader.java:1080)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.read(TIFFImageReader.java:1274)
                at javax.imageio.ImageReader.read(ImageReader.java:939)
                at LoadTest.Load(LoadTest.java:59)
                at LoadTest.main(LoadTest.java:78)

        == Loading flower-rgb-planar-24.tif ==
        NOK: read() 1381521496
        java.lang.ArrayIndexOutOfBoundsException: 1381521496
                at com.sun.imageio.plugins.tiff.TIFFDecompressor.decode(TIFFDecompressor.java:2802)
                at com.sun.imageio.plugins.tiff.TIFFNullDecompressor.decode(TIFFNullDecompressor.java:93)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.decodeTile(TIFFImageReader.java:1080)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.read(TIFFImageReader.java:1274)
                at javax.imageio.ImageReader.read(ImageReader.java:939)
                at LoadTest.Load(LoadTest.java:59)
                at LoadTest.main(LoadTest.java:78)


        All the images could be loaded with Preview 8.0 (Mac OS X 10.10)

        JDK used: build of the current (Dec. 09) state of the client repository.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                bpb Brian Burkhalter
                Reporter:
                avstepan Alexander Stepanov
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: