Skip to main content

Plugin2: ClassNotFoundException in init() blocks FireFox3B2

6 replies [Last post]
linuxhippy
Offline
Joined: 2004-01-07

Hi again,

Because of the red-X icon I played a bit and if the applet loads a class in init() which is not found, it completly blocks my browser (FireFox3A2, jdk6u10b9, Linux).

Simply compile the code below and delete Missing.class:

<br />
public class MozTestApplet extends Applet<br />
{<br />
  public void init() {<br />
    new Missing();<br />
  }</p>
<p>   public void paint(Graphics g){}<br />
}</p>
<p>class Missing{}<br />

However it seems the block does not happen always, one time the browser recovered after I closed the JavaConsole (which I configured to open automatically when the plugin starts), one time it did not show when I did not override paint.

One time I got the following exception:

<br />
java.lang.InterruptedException<br />
        at java.lang.Object.wait(Native Method)<br />
        at sun.plugin2.message.Queue.waitForMessage(Queue.java:61)<br />
        at sun.plugin2.message.Pipe.receive(Pipe.java:90)<br />
        at sun.plugin2.main.server.JVMInstance$WorkerThread.run(JVMInstance.java                                                        :444)<br />
Exception in thread "main" netscape.javascript.JSException: Plugin instance for                                                         applet ID 1 was already released<br />
        at sun.plugin2.main.server.LiveConnectSupport.getInfo(LiveConnectSupport                                                        .java:372)<br />
        at sun.plugin2.main.server.LiveConnectSupport.shutdown(LiveConnectSuppor                                                        t.java:40)<br />
        at sun.plugin2.main.server.JVMInstance.unregisterApplet(JVMInstance.java                                                        :1029)<br />
        at sun.plugin2.main.server.JVMInstance.recycleAppletID(JVMInstance.java:                                                        287)<br />
        at sun.plugin2.main.server.JVMManager.recycleAppletID(JVMManager.java:30                                                        6)<br />
        at sun.plugin2.main.server.MozillaPlugin.stopApplet(MozillaPlugin.java:2                                                        61)<br />
        at sun.plugin2.main.server.MozillaPlugin.destroy(MozillaPlugin.java:186)<br />

Hopy this helps, lg Clemens

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
turks
Offline
Joined: 2007-12-23

I think that this is fixed in B10.

linuxhippy
Offline
Joined: 2004-01-07

B11 will have this issue fixed :)

kbr
Offline
Joined: 2003-06-16

Thanks for the report. I am 99% sure this has already been fixed (it isn't reproducible with the current code base) but I don't remember under which bug ID the fix went in. Please re-test with build 10 and indicate whether it's reproducible with that build. A lot of LiveConnect-related bug fixes went into build 10.

linuxhippy
Offline
Joined: 2004-01-07

Yes, its reproduceable with build10.

I created stacktraces, maybe this can help:

[code]
START - Java - ENV - Applet2Environment.initialize
START - Java - ENV - Applet2Environment.initialize - PluginSysUtil.getPluginThreadGroup
END - Java - ENV - Applet2Environment.initialize - PluginSysUtil.getPluginThreadGroup
START - Java - ENV - Applet2Environment.initialize - Applet2BrowserService.install
END - Java - ENV - Applet2Environment.initialize - Applet2BrowserService.install
Java Plug-in 1.6.0_10-ea
Verwendung der JRE-Version 1.6.0_10-ea Java HotSpot(TM) Server VM
Home-Verzeichnis des Benutzers = /home/ce

----------------------------------------------------
c: Konsole löschen
f: Objekte in Finalisierungswarteschlange finalisieren
g: Speicherbereinigung
h: Diese Hilfemeldung anzeigen
l: ClassLoader-Liste ausgeben
m: Speicherbelegung anzeigen
o: Protokollierung auslösen
q: Konsole ausblenden
r: Richtlinien-Konfiguration neu laden
s: System- und Bereitstellungseigenschaften ausgeben
t: Threadliste ausgeben
v: Thread-Stack ausgeben
x: ClassLoader-Cache löschen
0-5: Trace-Stufe auf setzen
----------------------------------------------------

Applet status: Applet geladen
Applet status: Applet resized and added to parent container
Exception in thread "thread applet-MozTestApplet.class-1" java.lang.NoClassDefFoundError: Gump
at MozTestApplet.init(MozTestApplet.java:10)
at sun.plugin2.applet.Applet2Manager$AppletExecutionRunnable.run(Applet2Manager.java:1476)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: Gump
at sun.plugin2.applet.Applet2ClassLoader.findClass(Applet2ClassLoader.java:230)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 3 more
Caused by: java.io.FileNotFoundException: /home/ce/workspace/MozillaTester/bin/Gump.class (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:106)
at java.io.FileInputStream.(FileInputStream.java:66)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Applet2ClassLoader.java:522)
at sun.plugin2.applet.Applet2ClassLoader.access$600(Applet2ClassLoader.java:55)
at sun.plugin2.applet.Applet2ClassLoader$2.run(Applet2ClassLoader.java:211)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Applet2ClassLoader.java:208)
... 6 more
Threadliste ausgeben...
Group main,ac=14,agc=2,pri=10
main,5,alive
Timer-0,5,alive
Java Plug-In Pipe Worker Thread (Client-Side),5,alive
Java Plug-In Heartbeat Thread,5,alive
AWT-XAWT,6,alive,daemon
traceMsgQueueThread,5,alive,daemon
CacheCleanUpThread,5,alive,daemon
AWT-Shutdown,5,alive
Browser Side Object Cleanup Thread,5,alive
Group Plugin Thread Group,ac=3,agc=0,pri=10
AWT-EventQueue-1,6,alive
ConsoleWriterThread,6,alive,daemon
TimerQueue,5,alive,daemon
Group file:/home/ce/workspace/MozillaTester/bin/-threadGroup,ac=2,agc=0,pri=4
Applet 1 LiveConnect Worker Thread,4,alive
AWT-EventQueue-2,4,alive
Fertig.
Thread-Stack ausgeben...
----------------------------------------------------
2008-01-16 22:17:04
Full thread dump Java HotSpot(TM) Server VM (11.0-b09 mixed mode):

"TimerQueue" daemon prio=10 tid=0x90473000 nid=0x172b in Object.wait() [0x90176000..0x90177030]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0xb1942500> (a javax.swing.TimerQueue)
at javax.swing.TimerQueue.run(TimerQueue.java:236)
- locked <0xb1942500> (a javax.swing.TimerQueue)
at java.lang.Thread.run(Thread.java:619)

"AWT-EventQueue-2" prio=10 tid=0x9046dc00 nid=0x1726 in Object.wait() [0x907f8000..0x907f8db0]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0xb1954b18> (a java.awt.EventQueue)
at java.lang.Object.wait(Object.java:485)
at java.awt.EventQueue.getNextEvent(EventQueue.java:479)
- locked <0xb1954b18> (a java.awt.EventQueue)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:251)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

"Applet 1 LiveConnect Worker Thread" prio=10 tid=0x90469800 nid=0x1725 in Object.wait() [0x90269000..0x90269e30]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0xb1954d40> (a java.lang.Object)
at java.lang.Object.wait(Object.java:485)
at sun.plugin2.main.client.LiveConnectSupport$PerAppletInfo$LiveConnectWorker.run(LiveConnectSupport.java:797)
- locked <0xb1954d40> (a java.lang.Object)
at java.lang.Thread.run(Thread.java:619)

"Browser Side Object Cleanup Thread" prio=10 tid=0x9046b400 nid=0x1723 in Object.wait() [0x90218000..0x90218f30]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0xb1988d30> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
- locked <0xb1988d30> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
at sun.plugin2.main.client.LiveConnectSupport$BrowserSideObjectCleanupThread.run(LiveConnectSupport.java:218)

"ConsoleWriterThread" daemon prio=10 tid=0x081c0800 nid=0x1721 in Object.wait() [0x902ba000..0x902bb030]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0xb1942610> (a java.lang.Object)
at java.lang.Object.wait(Object.java:485)
at com.sun.deploy.util.ConsoleTraceListener$ConsoleWriterThread.run(ConsoleTraceListener.java:72)
- locked <0xb1942610> (a java.lang.Object)

"AWT-EventQueue-1" prio=10 tid=0x90466c00 nid=0x1720 waiting on condition [0x9030b000..0x9030c0b0]
java.lang.Thread.State: RUNNABLE
at com.sun.deploy.util.ConsoleHelper.dumpAllStacksImpl(Native Method)
at com.sun.deploy.util.ConsoleHelper.dumpAllStacks(ConsoleHelper.java:66)
at sun.plugin2.main.client.Plugin2ConsoleController.dumpAllStacks(Plugin2ConsoleController.java:114)
at com.sun.deploy.util.ConsoleWindow$2.actionPerformed(ConsoleWindow.java:121)
at javax.swing.JComponent$ActionStandin.actionPerformed(JComponent.java:3366)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1636)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2849)
at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:267)
at javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:216)
at javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2926)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2918)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2812)
at java.awt.Component.processEvent(Component.java:5871)
at java.awt.Container.processEvent(Container.java:2058)
at java.awt.Component.dispatchEventImpl(Component.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2116)
at java.awt.Component.dispatchEvent(Component.java:4296)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1848)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:704)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:969)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:841)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:668)
at java.awt.Component.dispatchEventImpl(Component.java:4338)
at java.awt.Container.dispatchEventImpl(Container.java:2116)
at java.awt.Window.dispatchEventImpl(Window.java:2443)
at java.awt.Component.dispatchEvent(Component.java:4296)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:284)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

"AWT-Shutdown" prio=10 tid=0x90465c00 nid=0x171f in Object.wait() [0x9035c000..0x9035d130]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0xb19422f0> (a java.lang.Object)
at java.lang.Object.wait(Object.java:485)
at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259)
- locked <0xb19422f0> (a java.lang.Object)
at java.lang.Thread.run(Thread.java:619)

"CacheCleanUpThread" daemon prio=10 tid=0x9045b000 nid=0x171c in Object.wait() [0x903ad000..0x903adeb0]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0xb19715a8> (a com.sun.deploy.cache.CleanupThread)
at java.lang.Object.wait(Object.java:485)
at com.sun.deploy.cache.CleanupThread.run(CleanupThread.java:219)
- locked <0xb19715a8> (a com.sun.deploy.cache.CleanupThread)

"traceMsgQueueThread" daemon prio=10 tid=0x9044bc00 nid=0x171b in Object.wait() [0x903fe000..0x903fef30]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x95457b48> (a java.util.ArrayList)
at java.lang.Object.wait(Object.java:485)
at com.sun.deploy.util.Trace$TraceMsgQueueChecker.run(Trace.java:79)
- locked <0x95457b48> (a java.util.ArrayList)
at java.lang.Thread.run(Thread.java:619)

"AWT-XAWT" daemon prio=10 tid=0x90447c00 nid=0x171a runnable [0x9058c000..0x9058cfb0]
java.lang.Thread.State: RUNNABLE
at sun.awt.X11.XToolkit.waitForEvents(Native Method)
at sun.awt.X11.XToolkit.run(XToolkit.java:547)
at sun.awt.X11.XToolkit.run(XToolkit.java:522)
at java.lang.Thread.run(Thread.java:619)

"Java2D Disposer" daemon prio=10 tid=0x90423c00 nid=0x1719 in Object.wait() [0x905dd000..0x905de030]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0xb194ac28> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
- locked <0xb194ac28> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
at sun.java2d.Disposer.run(Disposer.java:125)
at java.lang.Thread.run(Thread.java:619)

"Java Plug-In Heartbeat Thread" prio=10 tid=0x08144400 nid=0x1718 waiting on condition [0x907a7000..0x907a80b0]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at sun.plugin2.main.client.PluginMain$HeartbeatThread.run(PluginMain.java:941)

"Java Plug-In Pipe Worker Thread (Client-Side)" prio=10 tid=0x08115000 nid=0x1716 runnable [0x90849000..0x90849db0]
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:215)
at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:65)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:69)
- locked <0xb1953e50> (a sun.nio.ch.Util$1)
- locked <0xb1953e40> (a java.util.Collections$UnmodifiableSet)
- locked <0xb1953c08> (a sun.nio.ch.EPollSelectorImpl)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:84)
at sun.plugin2.message.transport.SocketTransport$SerializerImpl.readByte(SocketTransport.java:172)
at sun.plugin2.message.AbstractSerializer.readInt(AbstractSerializer.java:154)
at sun.plugin2.message.transport.SerializingTransport.read(SerializingTransport.java:89)
at sun.plugin2.message.Pipe$WorkerThread.run(Pipe.java:181)

"Timer-0" prio=10 tid=0x0810e000 nid=0x1715 in Object.wait() [0x9098e000..0x9098ee30]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0xb1941ac0> (a java.util.TaskQueue)
at java.lang.Object.wait(Object.java:485)
at java.util.TimerThread.mainLoop(Timer.java:483)
- locked <0xb1941ac0> (a java.util.TaskQueue)
at java.util.TimerThread.run(Timer.java:462)

"Low Memory Detector" daemon prio=10 tid=0x080f8000 nid=0x1713 runnable [0x00000000..0x00000000]
java.lang.Thread.State: RUNNABLE

"CompilerThread1" daemon prio=10 tid=0x080f5c00 nid=0x1712 waiting on condition [0x00000000..0x90b163a8]
java.lang.Thread.State: RUNNABLE

"CompilerThread0" daemon prio=10 tid=0x080f3000 nid=0x1711 waiting on condition [0x00000000..0x90b97428]
java.lang.Thread.State: RUNNABLE

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

"Finalizer" daemon prio=10 tid=0x080de000 nid=0x170f in Object.wait() [0x90e39000..0x90e3a130]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0xb1941668> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
- locked <0xb1941668> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

"Reference Handler" daemon prio=10 tid=0x080dcc00 nid=0x170e in Object.wait() [0x90e8a000..0x90e8adb0]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0xb1977f00> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:485)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
- locked <0xb1977f00> (a java.lang.ref.Reference$Lock)

"main" prio=10 tid=0x08058400 nid=0x170a in Object.wait() [0xb7f52000..0xb7f53208]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0xb1954388> (a sun.plugin2.message.Queue)
at sun.plugin2.message.Queue.waitForMessage(Queue.java:61)
- locked <0xb1954388> (a sun.plugin2.message.Queue)
at sun.plugin2.message.Pipe.receive(Pipe.java:90)
at sun.plugin2.main.client.PluginMain.mainLoop(PluginMain.java:268)
at sun.plugin2.main.client.PluginMain.run(PluginMain.java:215)
at sun.plugin2.main.client.PluginMain.main(PluginMain.java:1204)

"VM Thread" prio=10 tid=0x080d9400 nid=0x170d runnable

"GC task thread#0 (ParallelGC)" prio=10 tid=0x0805f400 nid=0x170b runnable

"GC task thread#1 (ParallelGC)" prio=10 tid=0x08060c00 nid=0x170c runnable

"VM Periodic Task Thread" prio=10 tid=0x080f9800 nid=0x1714 waiting on condition

----------------------------------------------------
Fertig.

[/code]

Good luck, and thanks for the excellent new plugin :)

lg Clemens

kbr
Offline
Joined: 2003-06-16

Thanks for re-testing and for the stack trace. Again I am 99% sure this is already fixed; it isn't currently reproducible on Solaris, at least, and I'm sure I've seen this hang before. If you have time to try an early copy of a later build to verify the fix, please email me (my email address is in my profile).

linuxhippy
Offline
Joined: 2004-01-07

I've sent you the email ... please mail me when the new build is ready so I can test it.

Thanks for your support, lg Clemens