You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sanselan-dev@incubator.apache.org by "Philippe Gassmann (JIRA)" <ji...@apache.org> on 2008/05/23 15:27:57 UTC
[jira] Created: (SANSELAN-3) OutOfMemoryError while loading
metadata of a jpeg image
OutOfMemoryError while loading metadata of a jpeg image
-------------------------------------------------------
Key: SANSELAN-3
URL: https://issues.apache.org/jira/browse/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(ByteSourceArray.java:51)
at org.cmc.sanselan.formats.tiff.TiffField.fillInValue(TiffField.java:356)
at org.cmc.sanselan.formats.tiff.TiffReader.readDirectory(TiffReader.java:164)
at org.cmc.sanselan.formats.tiff.TiffReader.readDirectory(TiffReader.java:105)
at org.cmc.sanselan.formats.tiff.TiffReader.readDirectories(TiffReader.java:96)
at org.cmc.sanselan.formats.tiff.TiffReader.read(TiffReader.java:416)
at org.cmc.sanselan.formats.tiff.TiffReader.readContents(TiffReader.java:406)
at org.cmc.sanselan.formats.tiff.TiffImageParser.getMetadata(TiffImageParser.java:127)
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.
[jira] Commented: (SANSELAN-3) OutOfMemoryError while loading
metadata of a jpeg image
Posted by "charles m chen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SANSELAN-3?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12599686#action_12599686 ]
charles m chen commented on SANSELAN-3:
---------------------------------------
I committed a small fix around this issue today:
Basically, the Nikon D40x (or whatever software last edited this image) is writing invalid EXIF metadata to the JPG. The TIFF structure of the EXIF metadata included: a TIFF field with a tag of 0 as well as a TIFF directory with an invalid "next directory offset" value.
SVN comment:
Small fix around parsing of invalid TIFF metadata in JPEG files. Added a "strict" flag to the parameter sets of certain read methods. When not in strict mode, Sanselan will ignore minor problems in image files that it parses. Sanselan now defaults to strict=false.
see: https://issues.apache.org/jira/browse/SANSELAN-3
> OutOfMemoryError while loading metadata of a jpeg image
> -------------------------------------------------------
>
> Key: SANSELAN-3
> URL: https://issues.apache.org/jira/browse/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(ByteSourceArray.java:51)
> at org.cmc.sanselan.formats.tiff.TiffField.fillInValue(TiffField.java:356)
> at org.cmc.sanselan.formats.tiff.TiffReader.readDirectory(TiffReader.java:164)
> at org.cmc.sanselan.formats.tiff.TiffReader.readDirectory(TiffReader.java:105)
> at org.cmc.sanselan.formats.tiff.TiffReader.readDirectories(TiffReader.java:96)
> at org.cmc.sanselan.formats.tiff.TiffReader.read(TiffReader.java:416)
> at org.cmc.sanselan.formats.tiff.TiffReader.readContents(TiffReader.java:406)
> at org.cmc.sanselan.formats.tiff.TiffImageParser.getMetadata(TiffImageParser.java:127)
> 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.
[jira] Updated: (SANSELAN-3) OutOfMemoryError while loading
metadata of a jpeg image
Posted by "Philippe Gassmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SANSELAN-3?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Philippe Gassmann updated SANSELAN-3:
-------------------------------------
Attachment: 2127422194_4734e30dcb_o.jpg
Uploaded the guilty picture...
> OutOfMemoryError while loading metadata of a jpeg image
> -------------------------------------------------------
>
> Key: SANSELAN-3
> URL: https://issues.apache.org/jira/browse/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(ByteSourceArray.java:51)
> at org.cmc.sanselan.formats.tiff.TiffField.fillInValue(TiffField.java:356)
> at org.cmc.sanselan.formats.tiff.TiffReader.readDirectory(TiffReader.java:164)
> at org.cmc.sanselan.formats.tiff.TiffReader.readDirectory(TiffReader.java:105)
> at org.cmc.sanselan.formats.tiff.TiffReader.readDirectories(TiffReader.java:96)
> at org.cmc.sanselan.formats.tiff.TiffReader.read(TiffReader.java:416)
> at org.cmc.sanselan.formats.tiff.TiffReader.readContents(TiffReader.java:406)
> at org.cmc.sanselan.formats.tiff.TiffImageParser.getMetadata(TiffImageParser.java:127)
> 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.
[jira] Resolved: (SANSELAN-3) OutOfMemoryError while loading
metadata of a jpeg image
Posted by "Charles Matthew Chen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SANSELAN-3?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Charles Matthew Chen resolved SANSELAN-3.
-----------------------------------------
Resolution: Fixed
Assignee: Charles Matthew Chen (was: Carsten Ziegeler)
Resolved, see comments.
> OutOfMemoryError while loading metadata of a jpeg image
> -------------------------------------------------------
>
> Key: SANSELAN-3
> URL: https://issues.apache.org/jira/browse/SANSELAN-3
> Project: Sanselan
> Issue Type: Bug
> Reporter: Philippe Gassmann
> Assignee: Charles Matthew Chen
> 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(ByteSourceArray.java:51)
> at org.cmc.sanselan.formats.tiff.TiffField.fillInValue(TiffField.java:356)
> at org.cmc.sanselan.formats.tiff.TiffReader.readDirectory(TiffReader.java:164)
> at org.cmc.sanselan.formats.tiff.TiffReader.readDirectory(TiffReader.java:105)
> at org.cmc.sanselan.formats.tiff.TiffReader.readDirectories(TiffReader.java:96)
> at org.cmc.sanselan.formats.tiff.TiffReader.read(TiffReader.java:416)
> at org.cmc.sanselan.formats.tiff.TiffReader.readContents(TiffReader.java:406)
> at org.cmc.sanselan.formats.tiff.TiffImageParser.getMetadata(TiffImageParser.java:127)
> 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.