Bug 47143 - OutOfMemoryError extracting pictures from Escher in Excel file
Summary: OutOfMemoryError extracting pictures from Escher in Excel file
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.5-dev
Hardware: PC Windows Vista
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-03 16:59 UTC by Trejkaz (pen name)
Modified: 2009-06-20 04:22 UTC (History)
1 user (show)



Attachments
Problem file (706.50 KB, application/octet-stream)
2009-05-03 16:59 UTC, Trejkaz (pen name)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Trejkaz (pen name) 2009-05-03 16:59:21 UTC
Created attachment 23602 [details]
Problem file

Attached Excel file gives the following OOME when getting all pictures:

java.lang.OutOfMemoryError: Java heap space
        at org.apache.poi.ddf.UnknownEscherRecord.fillFields(UnknownEscherRecord.java:76)
        at org.apache.poi.ddf.EscherContainerRecord.fillFields(EscherContainerRecord.java:56)
        at org.apache.poi.ddf.EscherContainerRecord.fillFields(EscherContainerRecord.java:56)
        at org.apache.poi.hssf.record.AbstractEscherHolderRecord.convertToEscherRecords(AbstractEscherHolderRecord.java:108)
        at org.apache.poi.hssf.record.AbstractEscherHolderRecord.decode(AbstractEscherHolderRecord.java:348)
        at org.apache.poi.hssf.usermodel.HSSFWorkbook.getAllPictures(HSSFWorkbook.java:1521)
Comment 1 Yegor Kozlov 2009-06-20 04:22:42 UTC
Fixed in r786793

The culprit was EscherMetafileBlip. This class returned incorrect record size breaking reading and causing OOM. Should work now.

Yegor