incubator-sanselan-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe Gassmann (JIRA)" <>
Subject [jira] Created: (SANSELAN-3) OutOfMemoryError while loading metadata of a jpeg image
Date Fri, 23 May 2008 15:27:57 GMT
OutOfMemoryError while loading metadata of a jpeg image

                 Key: SANSELAN-3
             Project: Sanselan
          Issue Type: Bug
            Reporter: Philippe Gassmann
            Assignee: Carsten Ziegeler
            Priority: Blocker
         Attachments: 2127422194_4734e30dcb_o.jpg

the code executed : 

IImageMetadata metadata = Sanselan.getMetadata(new File(sourcePath));

the stacktrace : 

java.lang.OutOfMemoryError: Java heap space
at org.cmc.sanselan.common.byteSources.ByteSourceArray.getBlock(
at org.cmc.sanselan.formats.tiff.TiffField.fillInValue(
at org.cmc.sanselan.formats.tiff.TiffReader.readDirectory(
at org.cmc.sanselan.formats.tiff.TiffReader.readDirectory(
at org.cmc.sanselan.formats.tiff.TiffReader.readDirectories(
at org.cmc.sanselan.formats.tiff.TiffReader.readContents(
at org.cmc.sanselan.formats.tiff.TiffImageParser.getMetadata(

In the method fillInValue, the method getBlock is called with a length of more than 1,300,000,000
thus resulting in an OOME (the method tries to allocate a byte array of more than 1.3 gigabytes)

I will attach the guilty picture that triggers this issue

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message