ICEpdf
  1. ICEpdf
  2. PDF-735

NPE if set toolbar visible while loading heavy document

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.5
    • Fix Version/s: 5.0.6_P01, 5.0.7
    • Component/s: API
    • Labels:
      None
    • Environment:
      - Windows 7 64bit
      - JDK/JRE 7 update 51

      Description

      controller.setToolBarVisible()

      When loading a PDF file, if I change the visibility of the toolbar using this method, I will get a NullPointerException.

      java.lang.NullPointerException
      at org.icepdf.core.pobjects.Document.getPageTree(Document.java:1204)
      at org.icepdf.ri.common.SwingController.getPageTree(SwingController.java:3232)
      at org.icepdf.ri.common.SwingController.reflectStateInComponents(SwingController.java:1046)
      at org.icepdf.ri.common.SwingController.setToolBarVisible(SwingController.java:2806)

        Activity

        Nghia Tran created issue -
        Patrick Corless made changes -
        Field Original Value New Value
        Fix Version/s 5.0.6_P01 [ 11471 ]
        Hide
        Patrick Corless added a comment -

        I've added some code protection in the Document class as well as the Swing Controller. Should help avoid this issue in the future.

        Show
        Patrick Corless added a comment - I've added some code protection in the Document class as well as the Swing Controller. Should help avoid this issue in the future.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #40880 Thu Apr 24 14:19:07 MDT 2014 patrick.corless PDF-735 added code protection for null pointer that can occur when hiding the toolbar before the document is loaded.
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/Document.java
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/viewer/src/org/icepdf/ri/common/SwingController.java
        Hide
        Patrick Corless added a comment -

        Marking as resolved.

        Show
        Patrick Corless added a comment - Marking as resolved.
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Patrick Corless made changes -
        Fix Version/s 5.0.7 [ 11470 ]
        Patrick Corless made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Nghia Tran
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: