ICEpdf
  1. ICEpdf
  2. PDF-673

NullPointerException at DrawDrawCmd.paintOperand

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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.

        Activity

        Hide
        Patrick Corless added a comment -

        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.

        Show
        Patrick Corless added a comment - 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.
        Hide
        Patrick Corless added a comment -

        Check in a fix on the trunk and 5.0.1 branch.

        Show
        Patrick Corless added a comment - Check in a fix on the trunk and 5.0.1 branch.

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: