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

Dominik Stadler <dominik.stad...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #3 from Dominik Stadler <dominik.stad...@gmx.at> ---
I added a quick "reproducer" to https://github.com/centic9/poi-reproduce and
running it on 5.2.0 - 5.4.0 shows that only 5.2.1 cannot create a slide-show
with 64m of heap memory, all other versions do work.

However with only 128m heap memory also 5.2.1 works. So I cannot reproduce your
problem of multiple GB of allocation needed with the single-line reproducer
that you state.

Please try with a newer version to see if this helps. Also reduce your
test-case as much as possible, if there are still other things done, they can
have a side-effect.

If you can produce a self-sufficient test-case which still shows the problem,
we can take a closer look.

-----------------
for i in 5.2.0 5.2.1 5.2.2 5.2.3 5.2.4 5.2.5 5.3.0 5.4.0;do ./gradlew
runWriteSlides -PpoiVersion=$i;done

> Task :runWriteSlides

Creating SlideShow for version 5.2.0 and Java 17.0.13
Memory before total/max/free: 64m/64m/61m
Slides: 0
Memory when allocated total/max/free: 64m/64m/55m
Memory after total/max/free: 64m/64m/55m

BUILD SUCCESSFUL in 2s
3 actionable tasks: 2 executed, 1 up-to-date

> Task :runWriteSlides FAILED

Creating SlideShow for version 5.2.1 and Java 17.0.13
Memory before total/max/free: 64m/64m/61m
java.lang.OutOfMemoryError: Java heap space
Dumping heap to /tmp/java_pid3701570.hprof ...
Heap dump file created [8982380 bytes in 0,026 secs]
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at org.apache.commons.io.IOUtils.byteArray(IOUtils.java:338)
        at
org.apache.commons.io.output.AbstractByteArrayOutputStream.needNewBuffer(AbstractByteArrayOutputStream.java:104)
        at
org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream.<init>(UnsynchronizedByteArrayOutputStream.java:51)
        at org.apache.poi.util.IOUtils.toByteArray(IOUtils.java:205)
        at
org.apache.poi.util.IOUtils.toByteArrayWithMaxLength(IOUtils.java:191)
        at
org.apache.poi.openxml4j.util.ZipArchiveFakeEntry.<init>(ZipArchiveFakeEntry.java:81)
        at
org.apache.poi.openxml4j.util.ZipInputStreamZipEntrySource.<init>(ZipInputStreamZipEntrySource.java:98)
        at org.apache.poi.openxml4j.opc.ZipPackage.<init>(ZipPackage.java:132)
        at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:312)
        at
org.apache.poi.xslf.usermodel.XMLSlideShow.empty(XMLSlideShow.java:146)
        at
org.apache.poi.xslf.usermodel.XMLSlideShow.<init>(XMLSlideShow.java:105)
        at org.dstadler.poi.TestXMLSlideShow.main(TestXMLSlideShow.java:19)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':runWriteSlides'.
> Process 'command '/usr/lib/jvm/java-17-openjdk-amd64/bin/java'' finished with 
> non-zero exit value 1

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 1s
3 actionable tasks: 2 executed, 1 up-to-date

> Task :runWriteSlides

Creating SlideShow for version 5.2.2 and Java 17.0.13
Memory before total/max/free: 64m/64m/61m
Slides: 0
Memory when allocated total/max/free: 64m/64m/54m
Memory after total/max/free: 64m/64m/54m

BUILD SUCCESSFUL in 1s
3 actionable tasks: 2 executed, 1 up-to-date

> Task :runWriteSlides

Creating SlideShow for version 5.2.3 and Java 17.0.13
Memory before total/max/free: 64m/64m/61m
Slides: 0
Memory when allocated total/max/free: 64m/64m/53m
Memory after total/max/free: 64m/64m/53m

BUILD SUCCESSFUL in 1s
3 actionable tasks: 2 executed, 1 up-to-date

> Task :runWriteSlides

Creating SlideShow for version 5.2.4 and Java 17.0.13
Memory before total/max/free: 64m/64m/61m
Slides: 0
Memory when allocated total/max/free: 64m/64m/53m
Memory after total/max/free: 64m/64m/53m

BUILD SUCCESSFUL in 1s
3 actionable tasks: 2 executed, 1 up-to-date

> Task :runWriteSlides

Creating SlideShow for version 5.2.5 and Java 17.0.13
Memory before total/max/free: 64m/64m/61m
Slides: 0
Memory when allocated total/max/free: 64m/64m/52m
Memory after total/max/free: 64m/64m/52m

BUILD SUCCESSFUL in 2s
3 actionable tasks: 2 executed, 1 up-to-date

> Task :runWriteSlides

Creating SlideShow for version 5.3.0 and Java 17.0.13
Memory before total/max/free: 64m/64m/61m
Slides: 0
Memory when allocated total/max/free: 64m/64m/52m
Memory after total/max/free: 64m/64m/52m

BUILD SUCCESSFUL in 1s
3 actionable tasks: 2 executed, 1 up-to-date

> Task :runWriteSlides

Creating SlideShow for version 5.4.0 and Java 17.0.13
Memory before total/max/free: 64m/64m/61m
Slides: 0
Memory when allocated total/max/free: 64m/64m/51m
Memory after total/max/free: 64m/64m/51m

BUILD SUCCESSFUL in 1s
3 actionable tasks: 2 executed, 1 up-to-date

-- 
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