EVALUATION
i can reproduce the problem with tiger and mustang.
Just go to any applet, e.g swingset2, and keep hitting browser refresh button until you see the exception:
java.lang.NullPointerException
at sun.plugin.AppletViewer.loadJarFiles(AppletViewer.java:1684)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
|
EVALUATION
this is probably caused by the current applet life cycle, and the way we destroy applets.
HelloWorld stop()
HelloWorld destroy()
basic: Joined applet thread ...
basic: Unregistered modality listener
HelloWorld finalize()
HelloWorld finalize()
HelloWorld finalize()
basic: Registered modality listener
createClassLoader, cli set to: sun.plugin.ClassLoaderInfo@16fd0b7
basic: Referencing classloader: sun.plugin.ClassLoaderInfo@16fd0b7, refcount=5
basic: Added progress listener: sun.plugin.util.GrayBoxPainter@1358f03
basic: Loading applet ...
basic: Initializing applet ...
basic: Starting applet ...
basic: completed perf rollup
basic: Stopping applet ...
basic: Removed progress listener: sun.plugin.util.GrayBoxPainter@1358f03
basic: Finding information ...
basic: Releasing classloader: sun.plugin.ClassLoaderInfo@16fd0b7, refcount=4
createClassLoader, cli set to: null
java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(Unknown Source)
at sun.plugin.AppletViewer.appletDestroy(AppletViewer.java:986)
at sun.plugin.AppletViewer.appletDestroy(AppletViewer.java:937)
at sun.plugin.viewer.LifeCycleManager.destroyAppletPanel(LifeCycleManager.java:209)
at sun.plugin.viewer.IExplorerPluginObject.destroyPlugin(IExplorerPluginObject.java:238)
basic: Done ...
basic: Joining applet thread ...
basic: Destroying applet ...
basic: Disposing applet ...
basic: Quiting applet ...
java.lang.NullPointerException
at sun.plugin.AppletViewer.loadJarFiles(AppletViewer.java:1687)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
basic: Exception: java.lang.NullPointerException
basic: Joined applet thread ...
It seems like during fast page reload, when we destroy the current applet, the loader thread of the new instance of the applet might be already started to load, so sometimes we run into this NPE in the loader thread, since the cli is set of null by the previous applet shutdown sequence code
The fix for 4910772/6313927/6313940 might fix this problem too; I will try to test with a bundle containing these fixes and see if it is still reproducible
|