ICEpdf
  1. ICEpdf
  2. PDF-79

Doing a "Select All" in some documents results in a NPE being thrown.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0 - Beta
    • Fix Version/s: 4.0 - Beta, 4.0
    • Component/s: Core/Parsing, Viewer RI
    • Labels:
      None
    • Environment:
      ICEpdf trunk as of rev. 19671.

      Description

      Performing a "Select All" operation while viewing the attached pdf document throws the following exception in the console:

      Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
              at java.awt.geom.GeneralPath.<init>(GeneralPath.java:137)
              at org.icepdf.core.pobjects.graphics.text.LineText.getGeneralPath(LineText.java:43)
              at org.icepdf.core.views.common.TextSelectionPageHandler.paintSelectedText(TextSelectionPageHandler.java:594)
              at org.icepdf.core.views.swing.PageViewComponentImpl.paintComponent(PageViewComponentImpl.java:422)
              at javax.swing.JComponent.paint(JComponent.java:1006)
              at javax.swing.JComponent.paintChildren(JComponent.java:843)
              at javax.swing.JComponent.paint(JComponent.java:1015)
              at org.icepdf.ri.common.views.PageViewDecorator.paint(PageViewDecorator.java:157)
              at javax.swing.JComponent.paintChildren(JComponent.java:843)
              at javax.swing.JComponent.paint(JComponent.java:1015)
              at javax.swing.JComponent.paintChildren(JComponent.java:843)
              at javax.swing.JComponent.paint(JComponent.java:1015)
              at javax.swing.JComponent.paintChildren(JComponent.java:843)
              at javax.swing.JComponent.paint(JComponent.java:1015)
              at javax.swing.JViewport.paint(JViewport.java:728)
              at javax.swing.JComponent._paintImmediately(JComponent.java:4890)
              at javax.swing.JComponent.paintImmediately(JComponent.java:4676)
              at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:477)
              at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:114)
              at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
              at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

        Activity

        Hide
        Ken Fyten added a comment -

        Test document (nice truck, BTW...).

        Show
        Ken Fyten added a comment - Test document (nice truck, BTW...).
        Hide
        Patrick Corless added a comment -

        It's not supposed to happen but empty text was inserted into the data structure. Should be an easy fix one the the annotation work is completed.

        Show
        Patrick Corless added a comment - It's not supposed to happen but empty text was inserted into the data structure. Should be an easy fix one the the annotation work is completed.
        Hide
        Patrick Corless added a comment -

        The document in question has some empty text tokens which was causing our bounds calculation on LineText to fail. Add a simple null pointer check and all is good.

        Show
        Patrick Corless added a comment - The document in question has some empty text tokens which was causing our bounds calculation on LineText to fail. Add a simple null pointer check and all is good.

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Ken Fyten
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: