[CLOSED] AppletLoader crashing java plugin on windows?

Started by smith, January 20, 2011, 21:45:26

Previous topic - Next topic

smith

My lwjgl applet is crashing on Windows (all browsers) with the 1.6.0_23 plugin. No exceptions in the console (locked up). Can someone else check that it isn't just me:

http://www.angryoctopus.co.nz/webflight/WebFlight.html

Works fine under Linux.

Matzon

getting the same effect on windows too - however, without some debug, I'd be hard pressed to say if it is the applet loader or your code :)

Mickelukas

I'm running 6u23 on windows 7 and it doesn't crash here...

Mike

smith

Fixed the problem, turns out using the applet loader jars signed with the lwjgl cert mixed with any jars signed with the Odd labs cert will crash the Java plugin.

Matzon

hmm, is it a bug in the JRE or is it the appletloaders certificate checking that is buggy?

kappa

Thats odd, having different certificates should just show multiple security dialogs (one for each certificate) but there have been occasions were due to some buggy vm's it would freeze like you explain above. One would expect Oracle/Sun to have fixed these sort of issues by now.

Besides you should never need more then one certificate for your application/game anyway, if you don't need to sign your own jars, just use LWJGL's certificate or if you are signing yourself, just sign all the jars (including lwjgl jars) with your own certificate. Multiple Security dialogs just annoy users.

Just curious, were any of the certificates set to always remember (i.e. the checked box on the security dialog selected in a previous run)?

Also when you say crash the plugin do you mean that it would just freeze or actually crash?

I know you've fixed the issue now, but it would be useful if you could just upload an example of the crashing applet somewhere to allow further testing just to make sure its not the appletloader or if there is some workaround that can be used to stop the crash.

smith

I tried removing all certificates and it still crashed. I wasn't deliberately mixing certificates, I was using the lwjgl zip downloads from SourceForge and they were signed with the old odd labs certificate. I updated the lwjgl_applet_util.jar,lzma.jar and the native jars because I knew they were required to be signed for the AppletLoader but I forgot that all the other lwjgl jars were also signed.
It's should be easy to reproduce, I don't think you even need an applet as it crashes in the AppletLoader while loading the jars, just put the lwgl.jar from the SF zip at lwjgl.org/applet and it will crash before the applet even starts running.

kappa

If you do that, then the appletloader will finish doing its stuff successfully and your application will start. Now when your application makes a call that requires signed permissions from an unsigned jar it will crash due to the applet security manager and the jvm will throw a security exception in the java console.

smith

Don't you have to accept the certificates before the applet starts? I never got any security exceptions in the java console and in fact the java console itself becomes unresponsive. I can set up an applet to demo the crash if someone more qualified is willing to try debug the issue.



kappa

yeh, if you can set one up that'd be cool, can then allow narrowing down where its crashing.

smith


kappa

ok thx for that, preliminary checks show that the appletloader does complete and the crash/hang is somewhere in the application.

Are you catching exceptions in your application somewhere and not throwing them again? (could explain why their is nothing in the console).

It'd be helpful if you could put a number of System.out.println()'s in your applications to narrow down exactly how far along it gets and where it stops.

smith

I'm not catching any exceptions that don't have a printStackTrace() in the handling. I'll spam println statements through the app when I get home from work but my money would be on Display.create().

smith

Ok, bunch of println() statements added at some key points in the lifecycle, test away.

kappa

thanks.

I've spent some time today trying to debug this.

Also improved the debug mode in the AppletLoader to be more useful.

I can confirm that it does actually crash in the AppletLoader on method switchApplet() and so doesn't even reach your application.

Once the following line is called
Class appletClass = classLoader.loadClass(getParameter("al_main"));


it never returns, hence the freeze/crash, some sort of deadlock.

It does look like a jvm bug and without actually debugging the jvm not sure how else to fix this.

any ideas?