LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: cesarpachon on November 18, 2009, 15:33:32

Title: applet loader problem: fatal error occured (2): multiple points
Post by: cesarpachon on November 18, 2009, 15:33:32
hi! I had experiencing this problem with my applets, I already searched google and the forums and it seems to be something related to signing, but I am clueless about how to fix it..
fatal error occured (2): multiple points
Title: Re: applet loader problem: fatal error occured (2): multiple points
Post by: Matzon on November 18, 2009, 15:46:00
try 2.2.1

other than that, the error seems to not come from the AppletLoader - since it doesn't print "Multiple points" anywhere.

is there a stacktrace or some more info ?
Title: Re: applet loader problem: fatal error occured (2): multiple points
Post by: cesarpachon on November 18, 2009, 15:50:03
there is not stacktrace, in the java console only appears the text "Multiple points". as I saw in the forums other post with the text "fatal error occurred (X)" I assumed that has something to do with the loader. the other clue is that when I launch locally, from eclipse, it works fine. this only happen in the browser.
Title: Re: applet loader problem: fatal error occured (2): multiple points
Post by: kappa on November 18, 2009, 15:52:31
got a copy of your html code you are using?

or even better a link to a working example?
Title: Re: applet loader problem: fatal error occured (2): multiple points
Post by: cesarpachon on November 18, 2009, 15:59:07
of course! the test url is http://www.cesarpachon.com/yummyworld/yummyworld.html .. thanks for your help
Title: Re: applet loader problem: fatal error occured (2): multiple points
Post by: kappa on November 18, 2009, 16:04:26
hmm, why do you have a <PARAM NAME="cache_archive" VALUE="..."> tag? you should remove that as it spoils the user experience by locking up the applet. You shouldn't need to use anyway.

also notice any thing wrong with this parameter

<!-- Version of Applet, important otherwise applet won't be cached, version change will update applet, must be int or float -->
<param name="al_version" value="0.6.2">

*hint read comment* :)
Title: Re: applet loader problem: fatal error occured (2): multiple points
Post by: cesarpachon on November 18, 2009, 16:18:18
hi! I had upload the html file with your two recomendations, and IT WORKS! thanks a lot!  :)
Title: Re: applet loader problem: fatal error occured (2): multiple points
Post by: kappa on November 18, 2009, 16:40:26
also do upgrade to lwjgl 2.2.1, its contains lots of fixes for applets.
Title: Re: applet loader problem: fatal error occured (2): multiple points
Post by: indexunknown on November 19, 2009, 18:09:21
my applet also gives that null error after i load it in browser second time:

http://www.hot.ee/testgame/appletloader.html (http://www.hot.ee/testgame/appletloader.html)

Reading certificates from 11 http://www.hot.ee/testgame/lzma.jar | C:\Documents and Settings\User\Application Data\Sun\Java\Deployment\cache\6.0\0\1e1644c0-52602e45.idx
Fatal error occured (5): null
java.lang.NullPointerException
   at org.lwjgl.util.applet.AppletLoader.validateCertificateChain(AppletLoader.java:1142)
   at org.lwjgl.util.applet.AppletLoader.extractNatives(AppletLoader.java:1118)
   at org.lwjgl.util.applet.AppletLoader.run(AppletLoader.java:630)
   at java.lang.Thread.run(Unknown Source)

Title: Re: applet loader problem: fatal error occured (2): multiple points
Post by: kappa on November 19, 2009, 18:22:28
Quote from: indexunknown on November 19, 2009, 18:09:21
my applet also gives that null error after i load it in browser second time:

http://www.hot.ee/testgame/appletloader.html (http://www.hot.ee/testgame/appletloader.html)

Reading certificates from 11 http://www.hot.ee/testgame/lzma.jar | C:\Documents and Settings\User\Application Data\Sun\Java\Deployment\cache\6.0\0\1e1644c0-52602e45.idx
Fatal error occured (5): null
java.lang.NullPointerException
   at org.lwjgl.util.applet.AppletLoader.validateCertificateChain(AppletLoader.java:1142)
   at org.lwjgl.util.applet.AppletLoader.extractNatives(AppletLoader.java:1118)
   at org.lwjgl.util.applet.AppletLoader.run(AppletLoader.java:630)
   at java.lang.Thread.run(Unknown Source)



seems to work fine for me, what OS + browser + jre version are you running?
Title: Re: applet loader problem: fatal error occured (2): multiple points
Post by: indexunknown on November 19, 2009, 19:06:22
The point is it fails the second time i load it and i have to clear java cache and such before it works again.

XP sp3, firefox latest version, java  1.6.0_15-b03
Title: Re: applet loader problem: fatal error occured (2): multiple points
Post by: Matzon on November 20, 2009, 08:31:30
try and step debug and see whats going on (remote attach to applet, you need to add some options in the control panel for applets - something like: -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,address=3999,suspend=n) then attach with your favorite debugger to port 3999
Title: Re: applet loader problem: fatal error occured (2): multiple points
Post by: indexunknown on November 20, 2009, 11:21:24
I found out that if i don't store the lwjgl certificate then it works all the time, but if i have accepted the cert then the second time i load the applet it messes up with validating the certs somewhere in the AppletLoader.java:1142 as in the stack trace can be seen.
Title: Re: applet loader problem: fatal error occured (2): multiple points
Post by: Matzon on November 20, 2009, 12:12:40
may be because the certificates get stripped or something? - very strange.
Title: Re: applet loader problem: fatal error occured (2): multiple points
Post by: Matzon on November 20, 2009, 21:25:11
Certificate[] certificate = AppletLoader.class.getProtectionDomain().getCodeSource().getCertificates(); seems to be null if you have pre-approved the certificate - odd... investigating, not sure if its a bug or not
Title: Re: applet loader problem: fatal error occured (2): multiple points
Post by: Matzon on November 20, 2009, 22:53:34
looks like a bug in the JRE (cached file does not have certificate info) - submitted bug report to sun. Possible workaround involves forced reloading of the jar and retrieving the certificates from a JarUrlConnection.
Title: Re: applet loader problem: fatal error occured (2): multiple points
Post by: Matzon on November 20, 2009, 23:06:59
I have comitted a workaround for now - will be available in next release - or build from source :)