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 A373091C7 for ; Sat, 18 Feb 2012 07:02:21 +0000 (UTC) Received: (qmail 26261 invoked by uid 500); 18 Feb 2012 07:02:21 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 26069 invoked by uid 500); 18 Feb 2012 07:02:21 -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 26061 invoked by uid 99); 18 Feb 2012 07:02:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Feb 2012 07:02:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_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, 18 Feb 2012 07:02:20 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id F39311AEFB3 for ; Sat, 18 Feb 2012 07:01:59 +0000 (UTC) Date: Sat, 18 Feb 2012 07:01:59 +0000 (UTC) From: "Damjan Jovanovic (Commented) (JIRA)" To: issues@commons.apache.org Message-ID: <1886158656.53697.1329548519999.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <300721716.50762.1329488399812.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (SANSELAN-63) Faulty image will be locked on the file system 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-63?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13210853#comment-13210853 ] Damjan Jovanovic commented on SANSELAN-63: ------------------------------------------ This probably happens because BmpImageParser.getImageInfo() calls byteSource.getInputStream() and never closes it, thus leaking that InputStream. It's easy to fix with a try/finally around that one line of code, but the entire project should be audited for such leaks. > Faulty image will be locked on the file system > ---------------------------------------------- > > Key: SANSELAN-63 > URL: https://issues.apache.org/jira/browse/SANSELAN-63 > Project: Commons Sanselan > Issue Type: Bug > Affects Versions: 0.97 > Environment: Windows 7, Java 1.7.0.1, 0.97-Incubator > Reporter: Adrian Moerchen > Attachments: 380440_295155317172029_185275861493309_985773_37867068_n.bmp > > > The attached image is somehow corrupt (it still can be opened with IrfanView). > Trying to read the image information with {{Sanselan.getImageInfo(file)}} results in an IOException. > After this the image is still locked on the file system, and can't be deleted for example. I expected it to be immediately get unlocked on the file system, after the error occured. -- 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