[Bug 64806] New: draw method hangs on slide of attached PowerPoint file

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 64806] New: draw method hangs on slide of attached PowerPoint file

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=64806

            Bug ID: 64806
           Summary: draw method hangs on slide of attached PowerPoint file
           Product: POI
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: critical
          Priority: P2
         Component: POI Overall
          Assignee: [hidden email]
          Reporter: [hidden email]
  Target Milestone: ---

Created attachment 37498
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37498&action=edit
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)

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 64806] draw method hangs on slide of attached PowerPoint file

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=64806

Andreas Beeker <[hidden email]> changed:

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

--- Comment #1 from Andreas Beeker <[hidden email]> ---
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?

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 64806] draw method hangs on slide of attached PowerPoint file

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=64806

Andreas Beeker <[hidden email]> changed:

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

--- Comment #1 from Andreas Beeker <[hidden email]> ---
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?

--- Comment #2 from Andreas Beeker <[hidden email]> ---
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?

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 64806] draw method hangs on slide of attached PowerPoint file

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=64806

--- Comment #3 from Eric Schoen <[hidden email]> ---
Java 8.  Oracle Java 1.8.0_161-b12 on a Mac hangs effectively forever.  I gave
up after an hour.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 64806] draw method hangs on slide of attached PowerPoint file

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=64806

--- Comment #4 from Eric Schoen <[hidden email]> ---
I should add we've also tried this under OpenJDK 1.8.0_252-b09 on CentOS and
seen the same effectively infinite hand.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 64806] draw method hangs on slide of attached PowerPoint file

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=64806

Andreas Beeker <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEEDINFO                    |RESOLVED

--- Comment #5 from Andreas Beeker <[hidden email]> ---
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

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]