https://bz.apache.org/bugzilla/show_bug.cgi?id=59058

            Bug ID: 59058
           Summary: OOM when opening OPCPackage with File but not with
                    InputStream (TIKA-1866)
           Product: POI
           Version: unspecified
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: OPC
          Assignee: dev@poi.apache.org
          Reporter: talli...@mitre.org

Shawn Johnson recently posted a smallish docx file on TIKA-1866 that causes an
OOM.

WARNING: trying to parse this file in Intellij caused a system crash and
required a hard reboot on Windows.

I can reproduce this in pure POI with the following:

        OPCPackage pkg = OPCPackage.open(path)
        System.out.println("before creating extractor");
        POIXMLTextExtractor poiExtractor =
ExtractorFactory.createExtractor(pkg);
        System.out.println("finished creating extractor");

The OOM happens during createExtractor, and I never hit the second println.

However, there is no OOM with:

        OPCPackage pkg = OPCPackage.open(Files.newInputStream(path));
        System.out.println("before creating extractor");
        POIXMLTextExtractor poiExtractor =
ExtractorFactory.createExtractor(pkg);
        System.out.println("finished creating extractor");

Any idea what might cause the different treatment?

Java 1.8.0_72 on Windows.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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

Reply via email to