[FIXED] An unlikely bug with appletloader.

Started by bobjob, October 07, 2010, 04:50:28

Previous topic - Next topic

bobjob

I sited this problem a while ago on my own applets, forgot to mention it.

If on mac osx, a user already has a copy of the cache, and accepts both certificate popups (as on Mac there will be 2), but doesnt choose to "trust" always, (as I always do to test in case I forgot to sign jars).

then the next time the applet loads up with plugin2 it will give the certificate pop 1, check cache then instantly try show popup 2, but for some reason will crash.

I managed to fix the problem in my own applets, by getting a time stamp at the start of the "run()" method. and just before "switchApplet()" is called. it compares the current time to last time stamp + a minimum delay (about a second).

kappa

hmm, odd problem this, iirc there was a similar issue a while back on Windows, a bug in the jre, this sounds very similar.

A workaround was added as seen here on lines 1320-1328, maybe this is a similar bug/problem that can be fixed with a bit of tweaking on that workaround?

maybe if that 'if statement' is triggered by this issue we can just put a 1 second delay in it.

kappa

An attempted fix has been added to svn.

Hopefully the fix should work as intended without adding a 1 second delay to startup.

Kindly test with build 1035+ to see if this issue has been fixed.

bobjob

The Highest build i can find is Build #1029 can you paste the link to the latest builds, when I go to the download section i cant find any later than that.

kappa

yup looks like #1029 is the latest and now contains the fix, the bot in #lwjgl was lying about it being #1035 :).

bobjob

I can confirm that this is fixed.

This is great it only has the one security popup, how did you manage that?

Sorry I took a while finally got a night off work.

kappa

The problem was that the applet switching was being done outside the EDT and the permissions dialog is awt/swing. So calling that outside the EDT was causing the problems as stuff was happening in the wrong order. Putting it back onto the EDT allows it to work as it should. Since you've already accepted that certificate it verifies correctly the second time.