Applet Reliability: Test with me! (MSIE 7.0 please)

Recently, I’ve gotten kinda annoyed by the fact that very few
people have actually seen applets ‘go mad’, and thus more or
less accusing me of whining and what not.

So I decided to put a simple testcase online, and see whether
it works for me, as making a testcase often reveals most
bugs. Well, I kept it simple (yet not extremely nicely coded),
and the only thing I could not reproduce yet was Firefox not
connecting to its server. Oh well, enough bugs left I guess.

So in MSIE 7.0, the following tends to break on 20% of the page
hits for me:

Test applet:
http://www.indiespot.net/files/spooky_applet.html

If it works for you, refresh a few times and see whether it keeps
working, please try at least 5 times.

and here a screenshot (with arrows :persecutioncomplex:) of Java Plugin that hangs
[url=http://www.indiespot.net/files/java_hangs.png]
click to enlarge

http://www.indiespot.net/files/java_hangs_thumb.png

click to enlarge
[/url]

Any feedback is welcome!

I never use MSIE7.0 but it seems to be installed on my PC so I tried the test ( on MSIE7.0, to be clear ).

I refreshed the page well over 5 times, restarted the browser multiple times, and even ran the page in 12 tabs concurently.

No errors were displayed in the console and each applet displayed a success.

One thing that was different to your screenshot is that my Uptimes for the 10 applets were much closer together than yours. Pretty much all within 3 seconds of eachother.

Java Plug-in 1.6.0_10
Using JRE version 1.6.0_10 Java HotSpot™ Client VM

All ok here too. Refreshed > 10 times with no exceptions in console (Firefox, 3.03 using JDK 1.6, dont have MSIE7 either so cant test on this).

for the loadJar exception…

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)

i use the deployJava.js

example : www.chessk.com

[quote]----------------------------------------------------

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)
SpookyApplet.init()
SpookyApplet.start()
SpookyApplet.init()
SpookyApplet.start()
SpookyApplet.init()
SpookyApplet.start()
SpookyApplet.init()
SpookyApplet.start()
SpookyApplet.init()
SpookyApplet.run() -> started
SpookyApplet.run() -> started
SpookyApplet.run() -> started
SpookyApplet.init()
SpookyApplet.run() -> started
SpookyApplet.start()
SpookyApplet.start()
SpookyApplet.run() -> started
SpookyApplet.run() -> started
SpookyApplet.init()
SpookyApplet.run() -> started
SpookyApplet.start()
SpookyApplet.init()
SpookyApplet.start()
SpookyApplet.run() -> started
SpookyApplet.init()
SpookyApplet.start()
SpookyApplet.run() -> started
SpookyApplet.init()
SpookyApplet.start()
SpookyApplet.run() -> started
SpookyApplet.init()
SpookyApplet.run() -> started
SpookyApplet.start()
SpookyApplet.init()
SpookyApplet.run() -> started
SpookyApplet.start()
SpookyApplet.init()
SpookyApplet.start()
SpookyApplet.run() -> started
SpookyApplet.init()
SpookyApplet.start()
SpookyApplet.run() -> started
SpookyApplet.init()
SpookyApplet.start()
SpookyApplet.run() -> started
SpookyApplet.init()
SpookyApplet.start()
SpookyApplet.run() -> started
SpookyApplet.init()
SpookyApplet.start()
SpookyApplet.run() -> started
SpookyApplet.init()
SpookyApplet.start()
SpookyApplet.run() -> started
SpookyApplet.init()
SpookyApplet.start()
SpookyApplet.run() -> started
SpookyApplet.init()
SpookyApplet.start()
SpookyApplet.run() -> started
SpookyApplet.init()
SpookyApplet.start()
SpookyApplet.run() -> started
SpookyApplet.init()
SpookyApplet.run() -> started
SpookyApplet.start()
SpookyApplet.init()
SpookyApplet.init()
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)
SpookyApplet.init()
SpookyApplet.init()
SpookyApplet.init()
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)
SpookyApplet.init()
SpookyApplet.init()
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)
SpookyApplet.init()
SpookyApplet.init()
SpookyApplet.init()
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)
SpookyApplet.init()
SpookyApplet.init()
SpookyApplet.init()
SpookyApplet.run() -> started
SpookyApplet.run() -> started
SpookyApplet.run() -> started
SpookyApplet.run() -> started
SpookyApplet.start()
SpookyApplet.start()
SpookyApplet.start()
SpookyApplet.start()
SpookyApplet.start()
SpookyApplet.start()
SpookyApplet.start()
SpookyApplet.start()
SpookyApplet.start()
SpookyApplet.run() -> started
SpookyApplet.run() -> started
SpookyApplet.run() -> started
SpookyApplet.run() -> started
SpookyApplet.run() -> started
SpookyApplet.run() -> started
SpookyApplet.run() -> started
SpookyApplet.start()
SpookyApplet.start()
SpookyApplet.run() -> started
SpookyApplet.run() -> started
SpookyApplet.start()
SpookyApplet.start()
[/quote]
finally all applet succefully loaded … but some of them lag for a while and throw execption (including the first one)

remove is ok

IE6-Java1.6-07-XPPROSP3

no problems at all, only terrible flickering :wink:

5 time each on Firefox and Safari. No problems whatsoever. Wonder how much of this should be attributed to IE or settings you have in IE.

Actually just found this… Looks very familiar.

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6391104

If you follow the 6399750 (duplicate case) one guy suggests it was fixed in 6u10 (which I am using so maybe this explains in my case).

So, would be helpfull if we all included JDK versions/OS on our replies to see if this is so :slight_smile:

I tried it on my Xp machine with java 6 update 10, no problem at all.

Browser: IE7 & FF3

Problem is that it happens on a whole slew of computers at work.

They all have roughly the same config though…

Indeed, on my office PC each applet-launch feels like it is in its own JVM… it’s just slow and the browser is freezing until all applets are (finally) loaded.

Seems to work almost ok here. (Both FF3 & IE7 with JRE1.6.0_10-b33)
Only minor issue was this (occured in both browsers) :-

“sun.plugin2.main.client.PluginMain: unrecognized message ID 46”

I got it by hammering F5 a few dozen times. (not waiting for all of the applets to be added.)

Incidentally, in IE 7 a new java console is launched each time the page is refreshed - I managed to flood my system tray with about 30! :smiley:
The Firefox plugin just reuses the same console.

:edit:

I spoke too soon!

After about 30 seconds of hammering F5, FF has simply stopped launching Applets =/ (it doesn’t appear to be invoking SpookyApplet.init() )
After this happens, if I click your “click to remove applets from page” button FireFox stops responding ::slight_smile:

FF-2.0.0.17-Java1.6-07-XPPROSP3 => Ok => remove Ok

Safari-3.0.4-SafariJVM-XPPROSP3 => no applet started => remove applet crash

how do you load from same host and never throw ACL exception in FF , I remember you explain that but could you provide a code snipet, plz?

Worked perfectly here in Opera 9.62, XP, update 10. Couldn’t break it.

Cas :slight_smile:

Sourcecode of the applet is available on the applet page.

woot!

My F5 spamming has managed to get this =D :-



sun.plugin2.main.client.PluginMain: unrecognized message ID 46
java.lang.ThreadDeath
	at java.lang.Thread.stop(Unknown Source)
	at java.lang.ThreadGroup.stopOrSuspend(Unknown Source)
	at java.lang.ThreadGroup.stop(Unknown Source)
	at sun.awt.AppContext.dispose(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager$AppContextDisposer.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-397" java.lang.NullPointerException
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
	at java.net.URLConnection.getHeaderFieldInt(Unknown Source)
	at java.net.URLConnection.getContentLength(Unknown Source)
	at main.SpookyApplet.connectToOwnHost(SpookyApplet.java:165)
	at main.SpookyApplet.access$0(SpookyApplet.java:136)
	at main.SpookyApplet$1.run(SpookyApplet.java:33)
	at java.lang.Thread.run(Unknown Source)

hmm,

Thread dump after FF stops launching new Applets :-


Dump thread list ...
Group main,ac=130,agc=3,pri=10
    main,5,alive
    Timer-0,5,alive
    traceMsgQueueThread,5,alive,daemon
    Java Plug-In Pipe Worker Thread (Client-Side),5,alive
    AWT-Shutdown,5,alive
    AWT-Windows,6,alive,daemon
    AWT-EventQueue-0,6,alive
    Java Plug-In Heartbeat Thread,5,alive
    CacheMemoryCleanUpThread,5,alive,daemon
    CacheCleanUpThread,5,alive,daemon
    Browser Side Object Cleanup Thread,5,alive
    Windows Tray Icon Thread,5,alive
    ConsoleWriterThread,5,alive,daemon
Group Plugin Thread Group,ac=2,agc=0,pri=10
    AWT-EventQueue-1,6,alive
    TimerQueue,5,alive,daemon
Group http://www.indiespot.net/files/-threadGroup,ac=5,agc=0,pri=4
    Thread-341,4,alive
    Thread-344,4,alive
    Thread-347,4,alive
    Thread-350,4,alive
    Thread-353,4,alive
Group http://www.indiespot.net/files/-threadGroup,ac=110,agc=0,pri=4
    AWT-EventQueue-6,4,alive
    Thread-359,4,alive
    Thread-362,4,alive
    Applet 304 LiveConnect Worker Thread,4,alive
    thread applet-main/SpookyApplet.class-115,4,alive
    Thread-364,4,alive
    Thread-365,4,alive
    Applet 305 LiveConnect Worker Thread,4,alive
    thread applet-main/SpookyApplet.class-116,4,alive
    Thread-367,4,alive
    Thread-368,4,alive
    Applet 306 LiveConnect Worker Thread,4,alive
    thread applet-main/SpookyApplet.class-117,4,alive
    Thread-370,4,alive
    Thread-371,4,alive
    Applet 307 LiveConnect Worker Thread,4,alive
    thread applet-main/SpookyApplet.class-118,4,alive
    Thread-373,4,alive
    Thread-374,4,alive
    Applet 308 LiveConnect Worker Thread,4,alive
    thread applet-main/SpookyApplet.class-119,4,alive
    Thread-376,4,alive
    Thread-377,4,alive
    Applet 309 LiveConnect Worker Thread,4,alive
    thread applet-main/SpookyApplet.class-120,4,alive
    Thread-379,4,alive
    Thread-380,4,alive
    Applet 310 LiveConnect Worker Thread,4,alive
    thread applet-main/SpookyApplet.class-121,4,alive
    Thread-382,4,alive
    Thread-383,4,alive
    Applet 311 LiveConnect Worker Thread,4,alive
    thread applet-main/SpookyApplet.class-122,4,alive
    Thread-385,4,alive
    Thread-386,4,alive
    Applet 312 LiveConnect Worker Thread,4,alive
    thread applet-main/SpookyApplet.class-123,4,alive
    Thread-388,4,alive
    Thread-389,4,alive
    Applet 313 LiveConnect Worker Thread,4,alive
    thread applet-main/SpookyApplet.class-124,4,alive
    Thread-391,4,alive
    Thread-392,4,alive
    Thread-395,4,alive
    Applet 315 LiveConnect Worker Thread,4,alive
    thread applet-main/SpookyApplet.class-126,4,alive
    Thread-397,4,alive
    Thread-398,4,alive
    Thread-401,4,alive
    Thread-404,4,alive
    Thread-407,4,alive
    Thread-410,4,alive
    Thread-413,4,alive
    Thread-416,4,alive
    Thread-419,4,alive
    Thread-422,4,alive
    Thread-425,4,alive
    Applet 325 LiveConnect Worker Thread,4,alive
    thread applet-main/SpookyApplet.class-136,4,alive
    Thread-427,4,alive
    Thread-428,4,alive
    Applet 326 LiveConnect Worker Thread,4,alive
    thread applet-main/SpookyApplet.class-137,4,alive
    Thread-430,4,alive
    Thread-431,4,alive
    Applet 327 LiveConnect Worker Thread,4,alive
    thread applet-main/SpookyApplet.class-138,4,alive
    Thread-433,4,alive
    Thread-434,4,alive
    Thread-437,4,alive
    Applet 329 LiveConnect Worker Thread,4,alive
    thread applet-main/SpookyApplet.class-140,4,alive
    Thread-439,4,alive
    Thread-440,4,alive
    Thread-443,4,alive
    Thread-446,4,alive
    Applet 332 LiveConnect Worker Thread,4,alive
    thread applet-main/SpookyApplet.class-143,4,alive
    Thread-448,4,alive
    Thread-449,4,alive
    Thread-452,4,alive
    Thread-455,4,alive
    Thread-458,4,alive
    Thread-461,4,alive
    Thread-464,4,alive
    Thread-467,4,alive
    Thread-470,4,alive
    Thread-473,4,alive
    Thread-476,4,alive
    Thread-479,4,alive
    Applet 343 LiveConnect Worker Thread,4,alive
    thread applet-main/SpookyApplet.class-154,4,alive
    Thread-481,4,alive
    Thread-482,4,alive
    Applet 344 LiveConnect Worker Thread,4,alive
    thread applet-main/SpookyApplet.class-155,4,alive
    Thread-484,4,alive
    Thread-485,4,alive
    Applet 345 LiveConnect Worker Thread,4,alive
    thread applet-main/SpookyApplet.class-156,4,alive
    Thread-487,4,alive
    Thread-488,4,alive
    Applet 346 LiveConnect Worker Thread,4,alive
    thread applet-main/SpookyApplet.class-157,4,alive
    Thread-490,4,alive
    Thread-491,4,alive
    Applet 347 LiveConnect Worker Thread,4,alive
    thread applet-main/SpookyApplet.class-158,4,alive
    Thread-493,4,alive
    Thread-494,4,alive
Done.

Don’t think you’re Applet is cleaning up after itself very thoroughly? :wink:

Managed to crash it in Firefox 3 with Java 1.6.10, flooding the console with messages like this:

Exception in thread "AWT-EventQueue-12" java.lang.NullPointerException: component argument pData
	at sun.java2d.windows.GDIWindowSurfaceData.initOps(Native Method)
	at sun.java2d.windows.GDIWindowSurfaceData.<init>(Unknown Source)
	at sun.java2d.windows.GDIWindowSurfaceData.createData(Unknown Source)
	at sun.java2d.d3d.D3DScreenUpdateManager.getGdiSurface(Unknown Source)
	at sun.java2d.d3d.D3DScreenUpdateManager.createGraphics(Unknown Source)
	at sun.awt.windows.WComponentPeer.getGraphics(Unknown Source)
	at java.awt.Component.getGraphics(Unknown Source)
	at sun.awt.RepaintArea.paint(Unknown Source)
	at sun.awt.windows.WComponentPeer.handleEvent(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.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)

I noticed several JavaVM starting so might be related to that.

I’m fairly sure the Thread.stop() (called by the Plugin) is preventing my in/out.close() to be executed.

“Applet 304 LiveConnect Worker Thread,4,alive”

I’m not making threads with names like that either…

All’s well on Ku intrepid FF3.1b1 6.10.