Interesting error in applet

When trying to run:
http://www.otcsw.com/applet/PixelSplosion/collisiontest.html


7/13/10 5:16:07 AM	Safari[209]	Apple Java Plugin: Unexpected exception occurred (/SourceCache/JavaJDK16/JavaJDK16-279/deploy/src/plugin/macosx/native/apple/applet/JavaWebKitView.m - -[JavaWebKitView callDestroy:] : 300)
7/13/10 5:16:07 AM	Safari[209]	java.lang.NullPointerException
	at sun.plugin.viewer.WebKitPluginObject.destroyPlugin(WebKitPluginObject.java:657)
	at sun.plugin.viewer.WebKitPluginObject.destroyPlugin(WebKitPluginObject.java:640)
7/13/10 5:16:07 AM	Safari[209]		Please file a bug report at http://developer.apple.com/java/ with this message and a reproducible test case.
7/13/10 5:16:16 AM	[0x0-0x1e01e].com.apple.Safari[209]	Fatal error occured (4): forbid thread creation in disposed TG
7/13/10 5:16:16 AM	[0x0-0x1e01e].com.apple.Safari[209]	java.lang.IllegalThreadStateException: forbid thread creation in disposed TG
7/13/10 5:16:16 AM	[0x0-0x1e01e].com.apple.Safari[209]		at sun.plugin.security.ActivatorSecurityManager.checkAccess(ActivatorSecurityManager.java:159)
7/13/10 5:16:16 AM	[0x0-0x1e01e].com.apple.Safari[209]		at java.lang.ThreadGroup.checkAccess(ThreadGroup.java:299)
7/13/10 5:16:16 AM	[0x0-0x1e01e].com.apple.Safari[209]		at java.lang.Thread.init(Thread.java:332)
7/13/10 5:16:16 AM	[0x0-0x1e01e].com.apple.Safari[209]		at java.lang.Thread.<init>(Thread.java:379)
7/13/10 5:16:16 AM	[0x0-0x1e01e].com.apple.Safari[209]		at org.lwjgl.util.applet.AppletLoader$4.<init>(AppletLoader.java:963)
7/13/10 5:16:16 AM	[0x0-0x1e01e].com.apple.Safari[209]		at org.lwjgl.util.applet.AppletLoader.getJarInputStream(AppletLoader.java:963)
7/13/10 5:16:16 AM	[0x0-0x1e01e].com.apple.Safari[209]		at org.lwjgl.util.applet.AppletLoader.downloadJars(AppletLoader.java:885)
7/13/10 5:16:16 AM	[0x0-0x1e01e].com.apple.Safari[209]		at org.lwjgl.util.applet.AppletLoader.run(AppletLoader.java:633)
7/13/10 5:16:16 AM	[0x0-0x1e01e].com.apple.Safari[209]		at java.lang.Thread.run(Thread.java:637)

This is happening in Java 1.6.0_20 32-bit with Safari 4.0.5 on Mac OS X 10.6.3 2Ghz Intel Core Duo. It does not happen on my work machine, which is Java 1.6.0_20 64-bit with Safari 5.0 on Mac OS X 10.6.4 2.53 Ghz Intel Core 2 Duo.

This causes the canvas to stay white (all the LWJGL loading happens, but I can never see anything). That error code is usually not reported (typically I see no errors at all). I tried to run it in 32-bit Java on my work machine and had no issues. I also installed Safari 5.0 on my home machine and it still wouldn’t work.

I heard this may be a driver issue, but Minecraft is able to run fine on my home computer, as well as most LWJGL applets I try to use on it (although some do indeed get the white screen). Similarly, I am able to run this in the AppletLoader (from Eclipse) and I’ve gotten LWJGL stuff to work fine via Webstart. If I try running this with an older version of LWJGL will that potentially help things?

Wish I had access to a mac so could debug this.

However, does look like some sort of mac issue and the AppletLoader, since its failing before reaching LWJGL code. If your up for some debugging grab the LWJGL AppletLoader code and see if you can narrow it to the problematic piece of code (its just java2d with a bit of other standard java stuff).

Most likely its some sort of jre/mac specific issue but should be fixable if we can find out why its failing.

Yeah, I might give that a try at some point in the future, but unfortunately I’m on a bit of a time crunch with this so that’s not incredibly likely. We’ll have to see - either way it will probably be worth making my own AppletLoader like Minecraft does in order to maximize reachability.

Im just stabbing in the dark.

sun.plugin.security.ActivatorSecurityManager.checkAccess(ActivatorSecurityManager.java:159)

could it be that you have the certificate blocked in the key manager?

try this appletloader, its signed by a different certificate:
http://have2chat.net/mixedcode

thought minecraft just used the standard lwjgl appletloader. But yeh like bobjob above it does use its own certificate.

Seems to work, I see a big bullseye on a red background.

Is there a reason this certificate would be blocked? I haven’t blocked anything. Should I potentially just sign all the LWJGL jars with my own signature?

I could be wrong about Minecraft, but I had a look at its HTML and it doesn’t look like AppletLoader.

what it most likely sounds like, is that one of the jar files isnt signed.

maybe re-download the appletloader, and try again. :-\

you are talking about the one found here right?

Nope, this one:

http://www.minecraft.net/game/

Also, bobjob, why would it work on one machine but not another if it was a signing issue?

not sure, it was just an idea.

I also noticed the “forbid thread creation” in the error, so it might have been an issue with mixed code (could depend on the version of java yet it seems there the same version :-).
Did you manage to get a version working, after downloading? probably best to grab the version from the nightly build.
sorry Demonpants Im really not sure what the issue is.

By time crunch, when did you need to get it working by, I think the newer version of LWJGL 2.5 is coming out next week.

By time crunch I just mean a lot of things need to be done within a month. I’m not worried about rushing to get this working at the moment, it’s just slightly annoying is all. But yeah I’m really not spending much time at this point. I’ve just been putting up test builds every couple of days for my artist to see, just a little bit troublesome I can’t see them without using my work machine.

One weird thing is that this works:

http://www.otcsw.com/applet/PixelSplosion/appletloader.html

And it’s literally the exact same loader I’m using, just a different JAR file. Do I need to package my JAR some special way? Anything I might be able to put into it that would make it not work? It’s pretty small and simple.

did you sign the jar file?

If anything, make sure all your JARs are signed with the same key, otherwise you trigger ‘mixed-mode’ which is a hand warm steaming pile of something very specific.

I didn’t sign it at all because I figured it doesn’t do anything that makes it need signing. I guess that must be part of the issue, then. Sorry about that if it is the problem, I’m very unfamiliar with signed applets still. Webstart no doubt would have whined at me about this already…

Blurg… Arrgg… Grrr…

It works after signing it. I can’t believe it &$%#ing works after signing it. &$%# that. I would have tried that from day 1 if it hadn’t been working on my other machine with no issues. Sigh…

Well… whatever. At least everything is happy days again…

Nice.

Next up: file a bug report and wait a few years :slight_smile:

Hm. I just had a friend try it (also on a Mac, probably very similar specs to the two machines I’ve tried with) and he gets exactly the same thing (white screen).

Damn it.

Since LWJGL is open source maybe I’ll just pull the AppletLoader apart and write my own. :confused:

be great if you do find a fix and contribute it back to LWJGL :slight_smile:

Yeah if I do I definitely will put it into the repository.