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

Null Pointer Exception in the trace file while refreshing the applet, writing in to TextArea.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • 6u1
    • deploy
    • None
    • x86
    • windows

      Null Pointer Exception while reloading an Applet multiple times on WinXP SP2.
      IE6.0
      Buid used : 6u1b05 and 5u12

      Exception.

      Exception in thread "AWT-EventQueue-17" java.lang.NullPointerException: null pData
      at sun.awt.windows.WComponentPeer.nativeHandleEvent(Native Method)
      at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:262)
      at java.awt.Component.dispatchEventImpl(Component.java:4060)
      at java.awt.Component.dispatchEvent(Component.java:3819)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
      at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
      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)

      There was one more bug filed on this 6537491 with a diffrent exception description.

      How to reproduce:

      Launch page - http://sqindia.india.sun.com/~rn195728/BugVerification/6480378/Top.html
      Click on Launch Button.
      Observe the console.

      Applet Code:
      import java.applet.Applet;
      import java.awt.TextArea;

      public class CrashTextAreaApplet extends Applet
      {

      TextArea ta;

          public CrashTextAreaApplet()
          {
              ta = new TextArea(20, 70);
          }

          public void init()
          {
              add(ta);
          }

          public void start()
          {
              Thread textWriter = new Thread() {

                  public void run()
                  {
                      do
                          ta.append("Attempting crash Attempting crash Attempting crash Attempting crash Attempting crash \n");
                      while(true);
                  }
              };
              textWriter.start();
          }

          public void destroy()
          {
              ta.setText("");
          }

      }

            ddehaven David Dehaven (Inactive)
            rnairsunw Raghu Nair
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: