A mass of outputs to a hidden Java Console will fill the heap until exhaustion resulting in the browser and applet to be unresponsive.
Steps to reproduce :
- Start the Java Control Panel and choose to "Hide" or "Do not start" the Java Console.
- Run the applet provided below in your prefered browser .
- Start jvisualvm to monitor the java-plugin process.
You will see the java heap filling until exhaustion. Some GC tentatives will be useless. The Applet and browser will become unresponsive.
Reproduced with 1.6u18 on Win XP/IE8 with both old and new plugin and Solaris10/Firefox.
% cat TestApplet.java
import javax.swing.*;
import java.awt.*;
public class TestApplet extends java.applet.Applet {
public void init (){
JPanel panel = new JPanel();
Label a = new Label("JConsole Test");
panel.add(a);
add(panel);
Thread testThread = new Thread(){
public void run()
{
int i = 0;
while( true )
{
System.out.println("************************");
for( int j = 0 ; j < 5000 ; j++)
System.out.println("Console Test: "+ i + "-" + j);
try{
sleep(500);
}catch ( Exception ex)
{
ex.printStackTrace();
}
i++;
}
}
};
testThread.start();
}
}
I���m sorry. There is a delay while I am working on some higher priority escalations. I expect to be able to get back to this next week.