Can't reload applet

Started by elias4444, July 31, 2009, 02:52:52

Previous topic - Next topic

elias4444

Ok... I know I've been a pain lately. But now I'm getting this error, and I can't seem to figure it out. I can now load my applets once, but in order to load them again, I have to shutdown the browser and restart it. Otherwise, I get this error:

QuoteFatal error occured (9): From thread Thread[AppletLoader.loaderThread,4,http://www.tommytwisters.com/games/rollemdice/test/-threadGroup]: Thread[AppletLoader.loaderThread,4,] already has the context current

I figure I'm either not shutting the applet down properly, or not starting it up properly. Could someone please help me?

=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com

kappa

can you try the nightly build of lwjgl, theres a lot of fixes added for applets and i believe some related to fixing similar problems.

nightly's can be found at http://www.newdawnsoftware.com/hudson/

kappa

also have a look at the sample lwjgl applet over at http://java-game-lib.svn.sourceforge.net/viewvc/java-game-lib/trunk/LWJGL/src/java/org/lwjgl/test/applet/GearsApplet.java?view=log

notice how the applet is structured, to start and destroy itself using addNotify and removeNotify.

elias4444

Yep, all sorts of fun stuff there.  ::)

Looks like I got it working. For the record, there was a few other oddities that I encountered. They all seemed to stem from the fact that the classes were never actually removed from memory, so I had to specifically reinitialize them (clear out hashtables for textures and the like).

I haven't tried the nightly builds yet. I didn't want to mess up my development environment in case there were any drastic changes. Once I get to a good stopping spot with my current project, I'll try them out.

Thanks again!  ;D
=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com