Duplicate :
|
|
Relates :
|
|
Relates :
|
How to reproduce: Launch page - http://sqindia.india.sun.com/~rn195728/BugVerification/6480378/CrashTextAreaApplet.html Click the browser refresh/reload button many times quickly Observe the console, type 't' to list thread. There are user threads (Thream-nn in the applet threadgroup) leak. 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(""); } } The textWriter thread launched from the applet is not correctly stopped when in page switch/reloading. Though the applet has the responsibilty to close whatever threads it creates, java plugin need a elegant way to clean up disposed applet contexts.
|