ICEpdf
  1. ICEpdf
  2. PDF-1235

SwingController isAnnotationUtilityPaneVisible is generating null pointer

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.3
    • Fix Version/s: 6.3.1
    • Component/s: Viewer RI
    • Labels:
      None
    • Environment:
      viewer

      Description

      A community member has pointed out that when build the viewer component example and manual set the PropertiesManager.PROPERTY_SHOW_UTILITYPANE_ANNOTATION they are getting a null pointer exception.

        Activity

        Hide
        Patrick Corless added a comment -

        The error is coming from an incorrectly protect call to annotationPanelisVisible(). in the isAnnotationUtilityPaneVisible() method. Once this it is properly protected the viewer loads.

        I think the likely cause was that the annotation was set into invisible via the properties which get the swingController in the state that causes the null pointer.

        Show
        Patrick Corless added a comment - The error is coming from an incorrectly protect call to annotationPanelisVisible(). in the isAnnotationUtilityPaneVisible() method. Once this it is properly protected the viewer loads. I think the likely cause was that the annotation was set into invisible via the properties which get the swingController in the state that causes the null pointer.
        Hide
        Patrick Corless added a comment -

        It also should be noted the the properties manager persists the state of any property in 6.3. On first load org.icepdf.ri.viewer.res.ICEpdfDefault.properties is used. If a customer viewer state is preferred it may be easier to update the properties file instead of directly manipulating the PropertiesManager.

        Also the properties Manager can be reset and the next use of the Viewer will restore the defaults.

        PropertiesManager properties = PropertiesManager.getInstance();
        properties.getPreferences().clear();

        Show
        Patrick Corless added a comment - It also should be noted the the properties manager persists the state of any property in 6.3. On first load org.icepdf.ri.viewer.res.ICEpdfDefault.properties is used. If a customer viewer state is preferred it may be easier to update the properties file instead of directly manipulating the PropertiesManager. Also the properties Manager can be reset and the next use of the Viewer will restore the defaults. PropertiesManager properties = PropertiesManager.getInstance(); properties.getPreferences().clear();
        Hide
        Patrick Corless added a comment -

        Marking as fixed.

        Show
        Patrick Corless added a comment - Marking as fixed.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: