Bug 46182 - PowerPointExtractor immediately throws OutOfMemoryError
Summary: PowerPointExtractor immediately throws OutOfMemoryError
Alias: None
Product: POI
Classification: Unclassified
Component: HSLF (show other bugs)
Version: 3.2-dev
Hardware: PC All
: P1 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL: ftp://www.workgroupsolutions.com/pub/...
Depends on:
Reported: 2008-11-10 18:44 UTC by Charlie Hubbard
Modified: 2008-11-11 02:07 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Charlie Hubbard 2008-11-10 18:44:17 UTC
Trying to extract the text from a power point presentation throws an OutOfMemoryError immediately.  Trying to increase the Heap proved useless.  Trying to create a VM of 2Gigs fails because the VM can't allocate enough space, and anything smaller still provides an OutOfMemoryError.

Here is the following code being executed:

public class Test {
    public static void main(String[] args) throws Exception{
        try {
            PowerPointExtractor _extractor = new PowerPointExtractor(new FileInputStream("Presentation - Spani#113D94.ppt"));
            String _text = _extractor.getText();
        } catch( Throwable e ) {
            System.out.println( Runtime.getRuntime().freeMemory() + " free out of " + Runtime.getRuntime().totalMemory() );
Comment 1 Charlie Hubbard 2008-11-10 18:54:30 UTC
The expectation would be that it would parse correctly given that this powerpoint presentation is only 5MB so it seems like even given 20MB of RAM it could parse it without a problem.  This file won't even parse if you give it 1 Gig!  If you can't parse it then I would expect some more predictable exception to thrown rather than OutOfMemory.
Comment 2 Yegor Kozlov 2008-11-11 02:07:36 UTC
Fixed in r713009