Skip to main content

Java Plugin 1.6 hangs when loading applet

6 replies [Last post]
twalljava
Offline
Joined: 2004-07-25
Points: 0

In firefox 2 and IE 7, the java console opens and then hangs the application. The console never prints its help message, and the application must be killed by the task manager (w32).

I can't direct the plugin to use a different VM. Other than uninstalling (reverting to 1.5), I can't get my applets to work.

In the beta release, the plugin would fail to load the applets, throwing an exception when trying to detect JDK version on the applet (no applet code had yet run); unfortunately I don't have a copy of that exception any longer. In the beta release prior to b2, the applets would fail to load for different reasons.

Everything works fine with appletviewer, whether pointed to a file or the release on sourceforge.

Are there ways to get debug/log output from the plugin prior to the JConsole being available (the lockup happens after JConsole is shown but before it prints its help message).

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cowwoc
Offline
Joined: 2003-08-24
Points: 0

Here is the related BugParade issue: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6540719

cowwoc
Offline
Joined: 2003-08-24
Points: 0

I can reproduce this hang 100% when running an unsigned applet under WinXP sp2, Java6 final and FireFox 2.0.0.2.

Basically I open an HTML file that refers to a non-existant classpath or JAR file and if I try opening any new tabs or closing FireFox it hangs (it might not look like it but check the process list on your system!) and has to be manually killed.

I personally consider this to be a pretty critical bug. Can someone at Sun please contact me for more information so we can get this fixed as soon as possible?

Here is a thread-dump I took when the browser was hung:

----------------------------------------------------
2007-03-20 22:36:18
Full thread dump Java HotSpot(TM) Client VM (1.6.0-b105 mixed mode):

"TimerQueue" daemon prio=6 tid=0x0e5e7c00 nid=0x14e8 in Object.wait()
[0x0edaf000..0x0edafa14]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x05475508> (a javax.swing.TimerQueue)
at javax.swing.TimerQueue.run(Unknown Source)
- locked <0x05475508> (a javax.swing.TimerQueue)
at java.lang.Thread.run(Unknown Source)

"ConsoleWriterThread" daemon prio=6 tid=0x0e5d6c00 nid=0x14e0 in
Object.wait() [0x0e4cf000..0x0e4cfa94]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x058f0520> (a java.lang.Object)
at java.lang.Object.wait(Object.java:485)
at
com.sun.deploy.util.ConsoleTraceListener$ConsoleWriterThread.run(Unknown
Source)
- locked <0x058f0520> (a java.lang.Object)

"AWT-EventQueue-1" prio=6 tid=0x0db6a000 nid=0x14d8 runnable
[0x0e27f000..0x0e27fb14]
java.lang.Thread.State: RUNNABLE
at com.sun.deploy.util.ConsoleHelper.dumpAllStacksImpl(Native Method)
at com.sun.deploy.util.ConsoleHelper.dumpAllStacks(Unknown Source)
at sun.plugin.util.PluginConsoleController.dumpAllStacks(Unknown Source)
at com.sun.deploy.util.ConsoleWindow$2.actionPerformed(Unknown Source)
at javax.swing.JComponent$ActionStandin.actionPerformed(Unknown Source)
at javax.swing.SwingUtilities.notifyAction(Unknown Source)
at javax.swing.JComponent.processKeyBinding(Unknown Source)
at javax.swing.KeyboardManager.fireBinding(Unknown Source)
at javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source)
at javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown
Source)
at javax.swing.JComponent.processKeyBindings(Unknown Source)
at javax.swing.JComponent.processKeyEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

"AWT-EventQueue-2" prio=4 tid=0x0db69400 nid=0x1224 in Object.wait()
[0x02d8f000..0x02d8fc14]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x058f05d8> (a java.awt.EventQueue)
at java.lang.Object.wait(Object.java:485)
at java.awt.EventQueue.getNextEvent(Unknown Source)
- locked <0x058f05d8> (a java.awt.EventQueue)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

"thread applet-applet.Main.class" prio=4 tid=0x0e598c00 nid=0x120c in
Object.wait() [0x0ebff000..0x0ebffd94]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x058f0740> (a sun.plugin.AppletViewer)
at java.lang.Object.wait(Object.java:485)
at sun.applet.AppletPanel.getNextEvent(Unknown Source)
- locked <0x058f0740> (a sun.plugin.AppletViewer)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

"AWT-EventQueue-0" prio=6 tid=0x0d9f4800 nid=0x11ac in Object.wait()
[0x0e37f000..0x0e37fb94]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x058a0098> (a java.awt.EventQueue)
at java.lang.Object.wait(Object.java:485)
at java.awt.EventQueue.getNextEvent(Unknown Source)
- locked <0x058a0098> (a java.awt.EventQueue)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

"traceMsgQueueThread" daemon prio=6 tid=0x0d9adc00 nid=0x11b8 in
Object.wait() [0x0e07f000..0x0e07fa14]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x058b1a98> (a java.util.ArrayList)
at java.lang.Object.wait(Object.java:485)
at com.sun.deploy.util.Trace$TraceMsgQueueChecker.run(Unknown Source)
- locked <0x058b1a98> (a java.util.ArrayList)
at java.lang.Thread.run(Unknown Source)

"AWT-Windows" daemon prio=6 tid=0x0d9ab000 nid=0x11b0 runnable
[0x0df7f000..0x0df7fa94]
java.lang.Thread.State: RUNNABLE
at sun.awt.windows.WToolkit.eventLoop(Native Method)
at sun.awt.windows.WToolkit.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

"AWT-Shutdown" prio=6 tid=0x0d9aa800 nid=0x974 in Object.wait()
[0x0de7f000..0x0de7fb14]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x058af9c8> (a java.lang.Object)
at java.lang.Object.wait(Object.java:485)
at sun.awt.AWTAutoShutdown.run(Unknown Source)
- locked <0x058af9c8> (a java.lang.Object)
at java.lang.Thread.run(Unknown Source)

"Java2D Disposer" daemon prio=10 tid=0x0d9afc00 nid=0x11a0 in
Object.wait() [0x0dd7f000..0x0dd7fb94]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x058afa60> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(Unknown Source)
- locked <0x058afa60> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(Unknown Source)
at sun.java2d.Disposer.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

"Low Memory Detector" daemon prio=6 tid=0x030ce800 nid=0x1178 runnable
[0x00000000..0x00000000]
java.lang.Thread.State: RUNNABLE

"CompilerThread0" daemon prio=10 tid=0x030c9800 nid=0x1198 waiting on
condition [0x00000000..0x0d77f69c]
java.lang.Thread.State: RUNNABLE

"Attach Listener" daemon prio=10 tid=0x030c8400 nid=0x117c runnable
[0x00000000..0x00000000]
java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" daemon prio=10 tid=0x030c7800 nid=0xf28 runnable
[0x00000000..0x00000000]
java.lang.Thread.State: RUNNABLE

"Finalizer" daemon prio=8 tid=0x030b9c00 nid=0x1164 in Object.wait()
[0x0d47f000..0x0d47fa14]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x058afcb8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(Unknown Source)
- locked <0x058afcb8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(Unknown Source)
at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)

"Reference Handler" daemon prio=10 tid=0x030b5800 nid=0x1160 in
Object.wait() [0x0333f000..0x0333fb14]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x058af868> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:485)
at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)
- locked <0x058af868> (a java.lang.ref.Reference$Lock)

"main" prio=6 tid=0x02e99400 nid=0x22c runnable [0x00000000..0x0012d8d4]
java.lang.Thread.State: RUNNABLE

"VM Thread" prio=10 tid=0x030b2400 nid=0x1150 runnable

"VM Periodic Task Thread" prio=10 tid=0x030cfc00 nid=0x1180 waiting on
condition

State: RUNNABLE

"VM Thread" prio=10 tid=0x030b2400 nid=0x1150 runnable

"VM Periodic Task Thread" prio=10 tid=0x030cfc00 nid=0x1180 waiting on
condition

----------------------------------------------------

Thank you,
Gili

twalljava
Offline
Joined: 2004-07-25
Points: 0

I saw something when upgrading firefox about JConsole being "incompatible"; not sure if it's a related issue, since I still get the hang even when the java console is not started (as set in the Java control panel).

cowwoc
Offline
Joined: 2003-08-24
Points: 0

I personally see the Java icon in the taskbar when the hang occurs.

mikeabish
Offline
Joined: 2007-01-02
Points: 0

I had same problem with my applet until I realised I was signing my jars using the jdk1.4 tools - keytool and jarsigner, however my java_home uses 1.5.
When I signed the jars using the jdk1.5 tools the problem went away.

Michael

twalljava
Offline
Joined: 2004-07-25
Points: 0

Turning off cacheing in the java control panel seems to fix the problem. With cacheing on, and the cache cleared, first this exception is thrown:

java.lang.NullPointerException
at sun.applet.AppletPanel.findAppletJDKLevel(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Subsequent invocations throw ClassNotFound:

java.lang.ClassNotFoundException: TestApplet.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more

Presumably the second exception is caused by some intermediate state in the cache.

Both exceptions result in firefox being hung.