Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7389A79A7 for ; Sat, 3 Dec 2011 16:41:02 +0000 (UTC) Received: (qmail 67785 invoked by uid 500); 3 Dec 2011 16:41:01 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 67719 invoked by uid 500); 3 Dec 2011 16:41:01 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 67710 invoked by uid 99); 3 Dec 2011 16:41:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Dec 2011 16:41:01 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Dec 2011 16:41:00 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id A6ADBC3848 for ; Sat, 3 Dec 2011 16:40:40 +0000 (UTC) Date: Sat, 3 Dec 2011 16:40:40 +0000 (UTC) From: "Damjan Jovanovic (Resolved) (JIRA)" To: issues@commons.apache.org Message-ID: <658228049.37583.1322930440684.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1735210600.4702.1309419268516.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (SANSELAN-53) Bug in Sanselan.getImageInfo(File) with certain JPEGs causing java.lang.OutOfMemoryError or java.lang.NegativeArraySizeException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SANSELAN-53?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Damjan Jovanovic resolved SANSELAN-53. -------------------------------------- Resolution: Fixed I've worked around even NegativeArraySizeException in commit 1209945. Resolving fixed. > Bug in Sanselan.getImageInfo(File) with certain JPEGs causing java.lang.OutOfMemoryError or java.lang.NegativeArraySizeException > -------------------------------------------------------------------------------------------------------------------------------- > > Key: SANSELAN-53 > URL: https://issues.apache.org/jira/browse/SANSELAN-53 > Project: Commons Sanselan > Issue Type: Bug > Affects Versions: 0.94-incubator > Environment: Windows, Unix > Sun Java JVM (multiple versions) > Reporter: Dominic Early > Attachments: NegativeArraySizeException.jpg, OutOfMemoryError.jpg, SanselanTest.java, SanselanTest.java > > > In order to extract JPEG image dimensions, Apache Commons Sanselan (0.97) was used as follows: > File imgfile = new File("./test.jpg"); > org.apache.sanselan.Sanselan.getImageInfo(imgfile); > For most JPEG images, this code works as expected. However with specific JPEG files, the call to getImageInfo() causes a repeatable java.lang.OutOfMemoryError or java.lang.NegativeArraySizeException - depending upon the input JPEG file. The same files can be processed with javax.imageio.ImageReader without such issues. > The OutOfMemoryError is especially serious as it may cause JVM to fail. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira