Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 5.0.4
-
Fix Version/s: 5.0.5
-
Component/s: Core/Parsing
-
Labels:None
-
Environment:All
-
Salesforce Case Reference:
Description
When rendering the provided PDF file the following NPE is thrown:
java.lang.NullPointerException
at org.icepdf.core.pobjects.graphics.commands.DrawDrawCmd.paintOperand(DrawDrawCmd.java:39)
at org.icepdf.core.pobjects.graphics.Shapes.paint(Shapes.java:136)
at org.icepdf.core.pobjects.graphics.commands.ShapesDrawCmd.paintOperand(ShapesDrawCmd.java:54)
at org.icepdf.core.pobjects.graphics.Shapes.paint(Shapes.java:136)
at org.icepdf.core.pobjects.Page.paintPageContent(Page.java:543)
at org.icepdf.core.pobjects.Page.paint(Page.java:500)
at org.icepdf.ri.common.views.PageViewComponentImpl.createBufferedPageImage(PageViewComponentImpl.java:843)
at org.icepdf.ri.common.views.PageViewComponentImpl.access$400(PageViewComponentImpl.java:74)
at org.icepdf.ri.common.views.PageViewComponentImpl$PagePainter.run(PageViewComponentImpl.java:992)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
The error doesn't seem to cause any functional impact though.
java.lang.NullPointerException
at org.icepdf.core.pobjects.graphics.commands.DrawDrawCmd.paintOperand(DrawDrawCmd.java:39)
at org.icepdf.core.pobjects.graphics.Shapes.paint(Shapes.java:136)
at org.icepdf.core.pobjects.graphics.commands.ShapesDrawCmd.paintOperand(ShapesDrawCmd.java:54)
at org.icepdf.core.pobjects.graphics.Shapes.paint(Shapes.java:136)
at org.icepdf.core.pobjects.Page.paintPageContent(Page.java:543)
at org.icepdf.core.pobjects.Page.paint(Page.java:500)
at org.icepdf.ri.common.views.PageViewComponentImpl.createBufferedPageImage(PageViewComponentImpl.java:843)
at org.icepdf.ri.common.views.PageViewComponentImpl.access$400(PageViewComponentImpl.java:74)
at org.icepdf.ri.common.views.PageViewComponentImpl$PagePainter.run(PageViewComponentImpl.java:992)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
The error doesn't seem to cause any functional impact though.
There is a funny corner case here where the clip isn't being set before a draw command is called. Added a check for the null clips and will paint the shape regardless of intersection. Also update the image drawing command to fire an page painter event to help insure the page is repainted for a long running image proxy.