Summary: | draw method hangs on slide of attached PowerPoint file | ||
---|---|---|---|
Product: | POI | Reporter: | Eric Schoen <ejschoen> |
Component: | POI Overall | Assignee: | POI Developers List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | critical | ||
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | All | ||
Bug Depends on: | |||
Bug Blocks: | 65314 | ||
Attachments: | File that hangs when rendering |
I've rendered it with Java 8 and it took ~27 sec. hanging several times in the stack you've mentioned, because of some bad scaling values. Then I've tried Java 14 and it took ~2 sec. Which Java version are you using? I've rendered it with Java 8 and it took ~27 sec. hanging several times in the stack you've mentioned, because of some bad scaling values. Then I've tried Java 14 and it took ~2 sec. Which Java version are you using? Java 8. Oracle Java 1.8.0_161-b12 on a Mac hangs effectively forever. I gave up after an hour. I should add we've also tried this under OpenJDK 1.8.0_252-b09 on CentOS and seen the same effectively infinite hand. Although when running this on OpenJDK (build 1.8.0_265-8u265-b01-0ubuntu2~20.04-b01) it took 52sec, you might want to enable the marlin engine. see https://github.com/AdoptOpenJDK/openjdk-build/issues/716 for details tl;dr: * download the jar from https://github.com/bourgesl/marlin-renderer/releases/tag/v0_9_4_3 * add -Dsun.java2d.renderer=org.marlin.pisces.MarlinRenderingEngine -Xbootclasspath/a:<path>/marlin-0.9.4.3-Unsafe.jar or if you are updating to u262 and later you can use: -Dsun.java2d.renderer=sun.java2d.marlin.MarlinRenderingEngine |
Created attachment 37498 [details] File that hangs when rendering We're running into an infinite loop trying to render the HWMF on the attached slide java.lang.Thread.State: RUNNABLE at sun.dc.pr.PathDasher.appendLine(Native Method) at sun.dc.DuctusRenderingEngine.feedConsumer(DuctusRenderingEngine.java:281) at sun.dc.DuctusRenderingEngine.strokeTo(DuctusRenderingEngine.java:158) at sun.java2d.pipe.LoopPipe.getStrokeSpans(LoopPipe.java:278) at sun.java2d.pipe.LoopPipe.draw(LoopPipe.java:201) at sun.java2d.pipe.PixelToParallelogramConverter.draw(PixelToParallelogramConverter.java:148) at sun.java2d.pipe.ValidatePipe.draw(ValidatePipe.java:154) at sun.java2d.SunGraphics2D.draw(SunGraphics2D.java:2497) at org.apache.poi.hwmf.draw.HwmfGraphics.draw(HwmfGraphics.java:170) at org.apache.poi.hemf.record.emfplus.HemfPlusDraw$EmfPlusDrawPath.draw(HemfPlusDraw.java:220) at org.apache.poi.hemf.draw.HemfGraphics.draw(HemfGraphics.java:123) at org.apache.poi.hemf.record.emf.HemfComment$EmfCommentDataPlus$$Lambda$438/534949923.accept(Unknown Source) at java.util.ArrayList.forEach(ArrayList.java:1257) at org.apache.poi.hemf.record.emf.HemfComment$EmfCommentDataPlus.draw(HemfComment.java:307) at org.apache.poi.hemf.record.emf.HemfComment$EmfComment.draw(HemfComment.java:128) at org.apache.poi.hemf.draw.HemfGraphics.draw(HemfGraphics.java:107) at org.apache.poi.hemf.usermodel.HemfPicture.draw(HemfPicture.java:179) at org.apache.poi.hemf.draw.HemfImageRenderer.drawImage(HemfImageRenderer.java:117) at org.apache.poi.sl.draw.DrawPictureShape.drawContent(DrawPictureShape.java:64) at org.apache.poi.sl.draw.DrawSimpleShape.draw(DrawSimpleShape.java:107) at org.apache.poi.sl.draw.DrawSheet.draw(DrawSheet.java:71) at org.apache.poi.sl.draw.DrawSlide.draw(DrawSlide.java:41) at org.apache.poi.xslf.usermodel.XSLFSlide.draw(XSLFSlide.java:373)