poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 48134] New: ImageIO Image left open when using Picture.resize() method.
Date Thu, 05 Nov 2009 03:48:11 GMT

           Summary: ImageIO Image left open when using Picture.resize()
           Product: POI
           Version: 3.5-FINAL
          Platform: PC
        OS/Version: Windows Vista
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: jrlambs@yahoo.com


When calling the Picture.resize() function after adding a picture to a
spreadsheet the file reference used by the imageio package is being left open.

How to repeat:  
1) Use Quick Start Code for inserting an image in an Excel sheet.
2) Run the code, having it pause just after calling the "resize" function.
3) Check the temp directory on your system.. a file is present called
4) Allow the program to Continue/End.  (The file is now gone)

I have a J2EE project which generates spreadsheets and embeds images in them. 
Each time a spreadsheet is generated a new "imageio" file is generated and held
open by the java server process.  After generating enough spreadsheets the java
process runs out of possible file handles.  The only way to release the hold
on/remove the imageio files int he temp directory is to shut down the server
and restart it.  When java ends, the files are released.

I believe the bug is located in the getImageDimension() function in the
HSSFPicture.java file.  This function opens an ImageIO Image to get its
dimension but never closes it.  

I've tried both version 3.2 and 3.5 and the bug is present in both.

Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org

View raw message