FULL PRODUCT VERSION :
java version "1.6.0_19"
Java(TM) SE Runtime Environment (build 1.6.0_19-b04)
Java HotSpot(TM) Client VM (build 16.2-b04, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
After upgrading to SDK 6, update 19, some classes executing a Swingworker stopped from working, throwing no error in the console (Thread not executed).
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
We started to see the problem just upgrading the jvm 6 to update 19
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
We expected no changes in functionality.
ACTUAL -
The thread invoked from a SwingWorker never executed.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Exception in thread "AWT-Windows" java.lang.IllegalStateException: Shutdown in progress
at java.lang.ApplicationShutdownHooks.add(Unknown Source)
at java.lang.Runtime.addShutdownHook(Unknown Source)
at sun.awt.windows.WToolkit.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.swing.SwingWorker;
public class Hilo extends SwingWorker<Object, Object>
{
@Override
protected Object doInBackground() throws Exception
{
System.out.println("Thread executing");
return null;
}
}
public class TestThread
{
public static void main(String[] args)
{
System.out.println("1");
Hilo h = new Hilo();
h.execute();
System.out.println("2");
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
import javax.swing.SwingWorker;
public class Hilo extends SwingWorker<Object, Object>
{
@Override
protected Object doInBackground() throws Exception
{
System.out.println("Thread executing");
return null;
}
}
public class TestThread
{
public static void main(String[] args)
{
System.out.println("1");
Hilo h = new Hilo();
h.execute();
System.out.println("2");
try
{
Thread.sleep(1000);
System.out.println("3");
}
catch(InterruptedException e)
{
e.printStackTrace();
}
}
}
Release Regression From : 6u18
The above release value was the last known release where this
bug was not reproducible. Since then there has been a regression.