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

OutOfMemoryError when reading a 17KB corrupted TIFF image

    XMLWordPrintable

    Details

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

      Description

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

      Output:
      == Loading m1-2743db7c68f091ddc61dcd582febff2d.tif ==
      NOK: read() Java heap space
      java.lang.OutOfMemoryError: Java heap space
              at com.sun.imageio.plugins.tiff.TIFFIFD.readFieldValue(TIFFIFD.java:244)
              at com.sun.imageio.plugins.tiff.TIFFIFD.initialize(TIFFIFD.java:532)
              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:59)
              at LoadTest.main(LoadTest.java:78)
              
      (-Xmx does not help).

      The image is undoubtedly corrupted, but is that Error appropriate here?

      Reproducible on Mac OS X 10.10 and Ubuntu 14.04 Linux with recent (09 Dec.) build of client repository.

      The image is a part of 'imagetestsuite' (https://code.google.com/p/imagetestsuite/downloads/list)

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: