Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-162

Opening a sheet on the Display causes a NullPointerException

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3
    • Component/s: wtk
    • Labels:
      None

      Description

      Sheet has an open(Display) override, so it looks like we try to support this case, but if you do it, you get an exception. What's worse is that if you get this exception in your startup method, then you can't close the host frame using the close button - you have to kill the Java process.

      java.lang.NullPointerException
      at org.apache.pivot.wtk.skin.terra.TerraSheetSkin.windowOpened(TerraSheetSkin.java:361)
      at org.apache.pivot.wtk.Window$WindowStateListenerList.windowOpened(Window.java:150)
      at org.apache.pivot.wtk.Window.open(Window.java:435)
      at org.apache.pivot.wtk.Sheet.open(Sheet.java:111)
      at org.apache.pivot.wtk.ScriptApplication.startup(ScriptApplication.java:50)
      at org.apache.pivot.wtk.DesktopApplicationContext$HostFrame.processWindowEvent(DesktopApplicationContext.java:76)
      at java.awt.Window.processEvent(Window.java:1820)
      at java.awt.Component.dispatchEventImpl(Component.java:4630)
      at java.awt.Container.dispatchEventImpl(Container.java:2099)
      at java.awt.Window.dispatchEventImpl(Window.java:2475)
      at java.awt.Component.dispatchEvent(Component.java:4460)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

      ...

      java.lang.NullPointerException
      at org.apache.pivot.wtk.skin.terra.TerraSheetSkin.previewSheetClose(TerraSheetSkin.java:379)
      at org.apache.pivot.wtk.Sheet$SheetStateListenerList.previewSheetClose(Sheet.java:35)
      at org.apache.pivot.wtk.Sheet.close(Sheet.java:146)
      at org.apache.pivot.wtk.Sheet.close(Sheet.java:141)
      at org.apache.pivot.wtk.ScriptApplication.shutdown(ScriptApplication.java:55)
      at org.apache.pivot.wtk.DesktopApplicationContext.exit(DesktopApplicationContext.java:160)
      at org.apache.pivot.wtk.DesktopApplicationContext$HostFrame.processWindowEvent(DesktopApplicationContext.java:92)
      at java.awt.Window.processEvent(Window.java:1820)
      at java.awt.Component.dispatchEventImpl(Component.java:4630)
      at java.awt.Container.dispatchEventImpl(Container.java:2099)
      at java.awt.Window.dispatchEventImpl(Window.java:2475)
      at java.awt.Component.dispatchEvent(Component.java:4460)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

        Attachments

          Activity

            People

            • Assignee:
              gbrown Gregory K. Brown
              Reporter:
              tvolkert Todd Volkert
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: