ICEpdf
  1. ICEpdf
  2. PDF-959

NullPointerException at AbstractWidgetAnnotation.renderAppearanceStream

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.0.1, 6.0.2
    • Fix Version/s: 6.1
    • Component/s: Core/Rendering
    • Labels:
      None
    • Environment:
      ICEpdf 6

      Description

      When rendering the provided PDF file the following NPE is thrown. This NPE isn't thrown with the 5.1.2 P0X releases just the recent 6.0.0, 6.0.1, and 6.0.2 releases.

      Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
      at org.icepdf.core.pobjects.annotations.AbstractWidgetAnnotation.renderAppearanceStream(AbstractWidgetAnnotation.java:114)
      at org.icepdf.core.pobjects.annotations.Annotation.render(Annotation.java:1270)
      at org.icepdf.ri.common.views.PageViewComponentImpl.paintAnnotations(PageViewComponentImpl.java:544)
      at org.icepdf.ri.common.views.PageViewComponentImpl.paintComponent(PageViewComponentImpl.java:473)
      at javax.swing.JComponent.paint(JComponent.java:1054)
      at javax.swing.JLayeredPane.paint(JLayeredPane.java:585)
      at javax.swing.JComponent.paintChildren(JComponent.java:887)
      at javax.swing.JComponent.paint(JComponent.java:1063)
      at org.icepdf.ri.common.views.PageViewDecorator.paint(PageViewDecorator.java:140)
      at javax.swing.JComponent.paintChildren(JComponent.java:887)
      at javax.swing.JComponent.paint(JComponent.java:1063)
      at javax.swing.JComponent.paintToOffscreen(JComponent.java:5219)
      at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1529)
      at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1452)
      at javax.swing.RepaintManager.paint(RepaintManager.java:1249)
      at javax.swing.JComponent._paintImmediately(JComponent.java:5167)
      at javax.swing.JComponent.paintImmediately(JComponent.java:4978)
      at javax.swing.RepaintManager$3.run(RepaintManager.java:808)
      at javax.swing.RepaintManager$3.run(RepaintManager.java:796)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:796)
      at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:769)
      at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:718)
      at javax.swing.RepaintManager.access$1100(RepaintManager.java:62)
      at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1677)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
      at java.awt.EventQueue.access$200(EventQueue.java:103)
      at java.awt.EventQueue$3.run(EventQueue.java:694)
      at java.awt.EventQueue$3.run(EventQueue.java:692)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
      Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
      at org.icepdf.core.pobjects.annotations.AbstractWidgetAnnotation.renderAppearanceStream(AbstractWidgetAnnotation.java:114)
      at org.icepdf.core.pobjects.annotations.Annotation.render(Annotation.java:1270)
      at org.icepdf.ri.common.views.PageViewComponentImpl.paintAnnotations(PageViewComponentImpl.java:544)
      at org.icepdf.ri.common.views.PageViewComponentImpl.paintComponent(PageViewComponentImpl.java:473)
      at javax.swing.JComponent.paint(JComponent.java:1054)
      at javax.swing.JLayeredPane.paint(JLayeredPane.java:585)
      at javax.swing.JComponent.paintChildren(JComponent.java:887)
      at javax.swing.JComponent.paint(JComponent.java:1063)
      at org.icepdf.ri.common.views.PageViewDecorator.paint(PageViewDecorator.java:140)
      at javax.swing.JComponent.paintChildren(JComponent.java:887)
      at javax.swing.JComponent.paint(JComponent.java:1063)
      at javax.swing.JComponent.paintToOffscreen(JComponent.java:5219)
      at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1529)
      at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1452)
      at javax.swing.RepaintManager.paint(RepaintManager.java:1249)
      at javax.swing.JComponent._paintImmediately(JComponent.java:5167)
      at javax.swing.JComponent.paintImmediately(JComponent.java:4978)
      at javax.swing.RepaintManager$3.run(RepaintManager.java:808)
      at javax.swing.RepaintManager$3.run(RepaintManager.java:796)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:796)
      at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:769)
      at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:718)
      at javax.swing.RepaintManager.access$1100(RepaintManager.java:62)
      at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1677)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
      at java.awt.EventQueue.access$200(EventQueue.java:103)
      at java.awt.EventQueue$3.run(EventQueue.java:694)
      at java.awt.EventQueue$3.run(EventQueue.java:692)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

        Activity

        Arran Mccullough created issue -
        Hide
        Patrick Corless added a comment -

        The issue is related to our new support of form widgets. In particular with the AbstractWidgetAnnotation class. There are a couple digital signature placeholder fields on the page that do not have an appearance stream which is the root of the null pointer exception and painting errors.

        I have small null pointer check for this corner case and hopefully soon we'll be able to add the signature if needed.

        Show
        Patrick Corless added a comment - The issue is related to our new support of form widgets. In particular with the AbstractWidgetAnnotation class. There are a couple digital signature placeholder fields on the page that do not have an appearance stream which is the root of the null pointer exception and painting errors. I have small null pointer check for this corner case and hopefully soon we'll be able to add the signature if needed.
        Patrick Corless made changes -
        Field Original Value New Value
        Fix Version/s 6.1 [ 12070 ]
        Hide
        Patrick Corless added a comment -

        Marking as fixed.

        Show
        Patrick Corless added a comment - Marking as fixed.
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #46959 Tue Jan 12 08:09:39 MST 2016 patrick.corless PDF-959 added check for missing appearance stream in widget annotations.
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-6.0.0_P01/icepdf/core/src/org/icepdf/core/pobjects/annotations/AbstractWidgetAnnotation.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #46960 Tue Jan 12 08:09:48 MST 2016 patrick.corless PDF-959 added check for missing appearance stream in widget annotations.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/annotations/AbstractWidgetAnnotation.java
        Patrick Corless made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: