Null Pointer Exception while reloading an Applet multiple times on WinXP SP2.
IE6.0
Buid used : 6u1b05 and 5u12
Exception.
Exception in thread "Thread-162" java.lang.NullPointerException: null pData
at sun.awt.windows.WTextAreaPeer.insertText(Native Method)
at java.awt.TextArea.insertText(Unknown Source)
at java.awt.TextArea.appendText(Unknown Source)
at java.awt.TextArea.append(Unknown Source)
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("");
}
}