Pivot
  1. Pivot
  2. PIVOT-157

Exceptions thrown during application launch can block application shutdown

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.3
    • Component/s: wtk
    • Labels:
      None
    • Environment:
      Windows XP, but maybe also on others O.S. could happen

      Description

      I've just tried to run the new JSONViever, but only downloading the 2
      files (.java commented some Override statements and .wtkx).
      When run from Eclipse i got the following exception:

      (Ok, i know this is not a right environment for tests, I'm sure that
      after synchronizing all, works)

      org.apache.pivot.serialization.SerializationException: Either src or
      language is required for the wtkx:script tag.
      at org.apache.pivot.wtkx.WTKXSerializer.readObject(WTKXSerializer.java:750)
      at org.apache.pivot.wtkx.WTKXSerializer.readObject(WTKXSerializer.java:299)
      at org.apache.pivot.wtkx.WTKXSerializer.readObject(WTKXSerializer.java:287)
      at org.apache.pivot.wtkx.WTKXSerializer.readObject(WTKXSerializer.java:274)
      at org.apache.pivot.tools.json.JSONViewer.startup(JSONViewer.java:52)
      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:4583)
      at java.awt.Container.dispatchEventImpl(Container.java:2099)
      at java.awt.Window.dispatchEventImpl(Window.java:2475)
      at java.awt.Component.dispatchEvent(Component.java:4413)
      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)

      But the real problem is that after this i can't close the application clicking the close icon (i have to kill the process from Eclipse).

      So my real question is:
      is it possible to change the closing of Desktop Applications (maybe inside DesktopApplicationContext), to ensure that our applications could be closed, also in case of strange errors (without having to kill process manually) ?

      I'm available to do other tests for this strange case.

      Thanks,
      Sandro

        Activity

        Todd Volkert made changes -
        Summary Ensure that Users will be able to Close Application, also with some Startup errors Exceptions thrown during application launch can block application shutdown
        Affects Version/s 1.2 [ 12313781 ]
        Affects Version/s 1.3 [ 12313779 ]
        Component/s tools [ 12312792 ]
        Hide
        Todd Volkert added a comment -

        Updating summary to be more descriptive for the 1.3 release notes.

        Show
        Todd Volkert added a comment - Updating summary to be more descriptive for the 1.3 release notes.
        Greg Brown made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Fix Version/s 1.3 [ 12313779 ]
        Resolution Fixed [ 1 ]
        Hide
        Todd Volkert added a comment -

        I passed org.foo.Bar as the application class – there is no shutdown method

        Show
        Todd Volkert added a comment - I passed org.foo.Bar as the application class – there is no shutdown method
        Todd Volkert made changes -
        Resolution Cannot Reproduce [ 5 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Todd Volkert added a comment -

        Re-opening since I am prevented from closing the application if I get any startup errors as well.

        java -cp lib/pivot-core-1.3-incubating.jar:lib/pivot-wtk-1.3-incubating.jar:lib/pivot-wtk-1.3-incubating.terra.jar org.apache.pivot.wtk.DesktopApplicationContext org.foo.Bar

        java.lang.ClassNotFoundException: org.foo.Bar
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at org.apache.pivot.wtk.DesktopApplicationContext.main(Unknown Source)
        java.lang.NullPointerException
        at org.apache.pivot.wtk.DesktopApplicationContext$HostFrame.processWindowEvent(Unknown Source)
        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)

        Nonexistent listener org.apache.pivot.wtk.DesktopApplicationContext$3@128ae45a removed from org.apache.pivot.wtk.Window$WindowListenerList@5c95da38
        java.lang.NullPointerException
        at org.apache.pivot.wtk.DesktopApplicationContext.exit(Unknown Source)
        at org.apache.pivot.wtk.DesktopApplicationContext$HostFrame.processWindowEvent(Unknown Source)
        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)

        Show
        Todd Volkert added a comment - Re-opening since I am prevented from closing the application if I get any startup errors as well. java -cp lib/pivot-core-1.3-incubating.jar:lib/pivot-wtk-1.3-incubating.jar:lib/pivot-wtk-1.3-incubating.terra.jar org.apache.pivot.wtk.DesktopApplicationContext org.foo.Bar java.lang.ClassNotFoundException: org.foo.Bar at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at org.apache.pivot.wtk.DesktopApplicationContext.main(Unknown Source) java.lang.NullPointerException at org.apache.pivot.wtk.DesktopApplicationContext$HostFrame.processWindowEvent(Unknown Source) 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) Nonexistent listener org.apache.pivot.wtk.DesktopApplicationContext$3@128ae45a removed from org.apache.pivot.wtk.Window$WindowListenerList@5c95da38 java.lang.NullPointerException at org.apache.pivot.wtk.DesktopApplicationContext.exit(Unknown Source) at org.apache.pivot.wtk.DesktopApplicationContext$HostFrame.processWindowEvent(Unknown Source) 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)
        Todd Volkert made changes -
        Fix Version/s 1.3 [ 12313779 ]
        Hide
        Todd Volkert added a comment -

        Removing fix version since it was closed as "cannot reproduce"

        Show
        Todd Volkert added a comment - Removing fix version since it was closed as "cannot reproduce"
        Greg Brown made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Cannot Reproduce [ 5 ]
        Hide
        Greg Brown added a comment -

        I cannot reproduce this issue on Windows or OS X. It is likely that a full sync from trunk will resolve it.

        Show
        Greg Brown added a comment - I cannot reproduce this issue on Windows or OS X. It is likely that a full sync from trunk will resolve it.
        Sandro Martini created issue -

          People

          • Assignee:
            Greg Brown
            Reporter:
            Sandro Martini
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development