rich apodaca - 2008-07-07

I'm having a problem that seems to be related to the use of jActivating and applets with Sun's JRE 6 and IE 7.

When Internet Explorer is used to view pages deployed with the <object> tag and jActivating, every so often, the spashscreen progress indicator freezes at about 10% and won't continue. The orange/white splashscreen remains indefinitely. The applet doesn't appear.

My system:  IE 7.0.5730.13; JRE 6 update 5
(http://java.sun.com/products/archive/); Windows XP
Home.

Here's how I reproduce the problem:

1) visit a page with a 100KB applet deployed using the <object> tag and jActivating.

2) you may see the problem immediately, if not,
re-load the page with a completely clean cache by
following the steps below to clear both the browser
and jre plugin cache:

3) close IE

4) control panel->java

5) close control panel folder and any windows
explorer/ie windows

6) from the java control panel: settings->delete
files->ok

7) run ie, clear browser cache: tools->internet
options->browsing history->delete->delete all->check
box "also delete files and settings..."->ok

8) close IE

9) run ie and browse to the page with the applet again.

In the above steps it appears to be important to make
sure all IE and Windows Explorer windows are closed
when clearing the Java Plugin cache.

The problem is intermittent; sometimes the applet
loads fine and sometimes the bug shows up.

Firefox 1.5/Windows doesn't seem to be affected nor
does IE 6, but I haven't tested IE6 as much as IE7.

I strongly suspect jActivating to be the source of the
problem.

I created a mirror of a site that
omitted the embeddedcontent.js script from the html
head element. The page loaded perfectly ten
times in a row, after following the exhaustive
cache-cleanout procedure above for each trial.

Of course, the nuisance "click to activate" message
was visible because that's what jActivating takes care
of.

I then added embeddedcontent.js back in, cleared
caches, loaded the same page again, and on the first
try saw the frozen progress bar behavior.

It seems essential that the above test be run on a non-local server, i.e., one that is deployed on a remote server. I was not able to reproduce the problem from content served on my local network.

Setting the Java console trace to 5, I see the following output when the problem occurs:

Java Plug-in 1.6.0_05
Using JRE version 1.6.0_05 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\Owner

----------------------------------------------------
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
l:   dump classloader list
m:   print memory usage
o:   trigger logging
p:   reload proxy configuration
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
x:   clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------

Trace level set to 5: all ... completed.
liveconnect: Invoking JS method: document
liveconnect: Invoking JS method: URL
basic: Referencing classloader: sun.plugin.ClassLoaderInfo@540408, refcount=1
basic: Added progress listener: sun.plugin.util.GrayBoxPainter@1975b59
basic: Loading applet ...
basic: Initializing applet ...
basic: Starting applet ...
basic: completed perf rollup
basic: Stopped loading ...
basic: Stopping applet ...
basic: Removed progress listener: sun.plugin.util.GrayBoxPainter@1975b59
basic: Finding information ...
basic: Releasing classloader: sun.plugin.ClassLoaderInfo@540408, refcount=0
basic: Caching classloader: sun.plugin.ClassLoaderInfo@540408
basic: Current classloader cache size: 1
basic: Done ...
basic: Joining applet thread ...
basic: Destroying applet ...
basic: Disposing applet ...
java.lang.NullPointerException
    at sun.plugin.AppletViewer.loadJarFiles(Unknown Source)
    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 ...
basic: Quiting applet ...
liveconnect: Invoking JS method: document
liveconnect: Invoking JS method: URL
basic: Referencing classloader: sun.plugin.ClassLoaderInfo@540408, refcount=1
basic: Added progress listener: sun.plugin.util.GrayBoxPainter@b5f53a
basic: Loading applet ...
basic: Initializing applet ...
basic: Starting applet ...
basic: completed perf rollup

Any help or ideas appreciated.

Rich