Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6209979

NullPointerException in Stylepad(JAVA_HOME/demo/jfc/Stylepad) demo application.

XMLWordPrintable

    • Cause Known
    • generic
    • generic

      Bug Info:
      ---------
      NullPointerException has occured in Stylepad demo application in the following scenario.

      JDK Info:
      ---------
      java version "1.6.0-ea"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-ea-b15)
      Java HotSpot(TM) Client VM (build 1.6.0-ea-b15, mixed mode, sharing)

      Steps to Reproduce:
      -------------------

      1. Open Stylepad(JAVA_HOME/demo/jfc/Stylepad) demo application.

      JAVA_HOME/bin/java -jar JAVA_HOME/demo/jfc/Stylepad/Stylepad.jar

      2. Choose Dumpmodel to System.err option in Debug menu.

      3. Choose ShowElements in Debug menu and then close the child window.

      4. Click on save icon and then give some file name to save the document.

      5. Click on Open icon and choose saved file and then clcik OK button.

      6. See the console and it shows the following error details.


      Error Info:
      -----------

      Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
              at javax.swing.text.AbstractDocument$AbstractElement.readObject(AbstractDocument.java:2216)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:919)
              at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1813)
              at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
              at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
              at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1628)
              at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1293)
              at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
              at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
              at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
              at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
              at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
              at javax.swing.tree.TreePath.readObject(TreePath.java:310)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:919)
              at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1813)
              at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
              at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
              at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
              at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:468)
              at javax.swing.tree.TreePath.readObject(TreePath.java:308)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:919)
              at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1813)
              at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
              at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
              at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
              at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:468)
              at javax.swing.JTree.readObject(JTree.java:2556)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:919)
              at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1813)
              at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
              at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
              at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1628)
              at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1293)
              at java.io.ObjectInputStream.access$300(ObjectInputStream.java:181)
              at java.io.ObjectInputStream$GetFieldImpl.readFields(ObjectInputStream.java:2073)
              at java.io.ObjectInputStream.readFields(ObjectInputStream.java:507)
              at java.awt.Container.readObject(Container.java:3492)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:919)
              at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1813)
              at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
              at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
              at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1628)
              at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1293)
              at java.io.ObjectInputStream.access$300(ObjectInputStream.java:181)
              at java.io.ObjectInputStream$GetFieldImpl.readFields(ObjectInputStream.java:2073)
              at java.io.ObjectInputStream.readFields(ObjectInputStream.java:507)
              at java.awt.Container.readObject(Container.java:3492)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:919)
              at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1813)
              at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
              at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
              at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1628)
              at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1293)
              at java.io.ObjectInputStream.access$300(ObjectInputStream.java:181)
              at java.io.ObjectInputStream$GetFieldImpl.readFields(ObjectInputStream.java:2073)
              at java.io.ObjectInputStream.readFields(ObjectInputStream.java:507)
              at java.awt.Container.readObject(Container.java:3492)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:919)
              at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1813)
              at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
              at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
              at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
              at javax.swing.event.EventListenerList.readObject(EventListenerList.java:255)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:919)
              at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1813)
              at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
              at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
              at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
              at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:468)
              at javax.swing.text.AbstractDocument.readObject(AbstractDocument.java:1436)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:919)
              at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1813)
              at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
              at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
              at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
              at Stylepad$OpenAction.actionPerformed(Stylepad.java:228)
              at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1863)
              at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2183)
              at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
              at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
              at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
              at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
              at java.awt.Component.processMouseEvent(Component.java:5506)
              at javax.swing.JComponent.processMouseEvent(JComponent.java:3153)
              at java.awt.Component.processEvent(Component.java:5271)
              at java.awt.Container.processEvent(Container.java:1966)
              at java.awt.Component.dispatchEventImpl(Component.java:3958)
              at java.awt.Container.dispatchEventImpl(Container.java:2024)
              at java.awt.Component.dispatchEvent(Component.java:3806)
              at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
              at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
              at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
              at java.awt.Container.dispatchEventImpl(Container.java:2010)
              at java.awt.Window.dispatchEventImpl(Window.java:1768)
              at java.awt.Component.dispatchEvent(Component.java:3806)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:591)
              at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)





      ###@###.### 2004-12-17 10:33:17 GMT

            peterz Peter Zhelezniakov
            vthotasunw Vinay Thota (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: