ICEpdf
  1. ICEpdf
  2. PDF-253

SwingController thowing null pointer exception on print.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.3
    • Fix Version/s: 4.1.4
    • Component/s: Viewer RI
    • Labels:
      None
    • Environment:
      any
    • Assignee Priority:
      P1
    • Workaround Description:
      Hide
      Create a new instance of the properties manager.
      PropertiesManager properties =
                       new PropertiesManager(System.getProperties(),
                               ResourceBundle.getBundle(PropertiesManager.DEFAULT_MESSAGE_BUNDLE));
       SwingController controller = new SwingController();
       SwingViewBuilder factory = new SwingViewBuilder(controller, properties);
      Show
      Create a new instance of the properties manager. PropertiesManager properties =                  new PropertiesManager(System.getProperties(),                          ResourceBundle.getBundle(PropertiesManager.DEFAULT_MESSAGE_BUNDLE));  SwingController controller = new SwingController();  SwingViewBuilder factory = new SwingViewBuilder(controller, properties);

      Description

      The Swing controller when used as a component throws this exception.

      Exception in thread "Thread-5" java.lang.NullPointerException
      at org.icepdf.ri.common.SwingController.savePrinterProperties(SwingController.java:2653)
      at org.icepdf.ri.common.SwingController.initialisePrinting(SwingController.java:2599)
      at org.icepdf.ri.common.SwingController.access$400(SwingController.java:103)
      at org.icepdf.ri.common.SwingController$3.run(SwingController.java:2549)
      at java.lang.Thread.run(Unknown Source)

      There is a pretty simple work around but I would rather that the defautl SwingViewBuilder would create a new isntance of the properites manager or alternatively do a check for the null manager.

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23968 Tue Feb 15 14:53:26 MST 2011 patrick.corless PDF-253 fixed an issue with b and B tokens where stroking was incorrectly happening before fill, the opposite is true.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/util/ContentParser.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23889 Wed Feb 02 11:58:19 MST 2011 patrick.corless PDF-253 added check for a null properties manager when saving the printer properties which corrects instances when a property manager may not exist like the component example.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/SwingController.java

          People

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

            Dates

            • Created:
              Updated:
              Resolved: