We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › OpenGL Applet Trouble
Page Index Toggle Pages: 1
OpenGL Applet Trouble (Read 361 times)
OpenGL Applet Trouble
Dec 1st, 2008, 6:58pm
 
I'm having trouble getting a particular OpenGL applet to work correctly. It will work in Safari but not in any other browser I've tried (IE, Firefox, Chrome). I'm getting this from the Java Console:

Java Plug-in 1.6.0_10-rc
Using JRE version 1.6.0_10-rc Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\Owner
----------------------------------------------------

Exception in thread "Animation Thread" java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Unknown Source)
at java.io.ByteArrayOutputStream.write(Unknown Source)
at processing.core.PApplet.loadBytes(PApplet.java:4062)
at processing.core.PApplet.loadBytes(PApplet.java:4045)
at processing.core.PApplet.loadImage(PApplet.java:3120)
at processing.core.PApplet.loadImage(PApplet.java:3067)
at web_interface_prototyping.setup(web_interface_prototyping.java:60)
at processing.core.PApplet.handleDraw(PApplet.java:1383)
at processing.core.PApplet.run(PApplet.java:1311)
at java.lang.Thread.run(Unknown Source)

I've read of similar problems in past topics, where the applet presents a white screen and doesn't get any farther, but it seems like these issues were supposed to have been corrected in recent versions. I also saw the hack on signing your jar files, but I'm not sure this would fix it either. Any suggestions would be much appreciated. Thanks!
Re: OpenGL Applet Trouble
Reply #1 - Dec 2nd, 2008, 7:46pm
 
So I've been looking more in to memory issues with applets and I've found that using the JVM commands -xms and -xmx can set heap space memory. I'm not sure where to set this, however, in the IDE. I think fry mentioned that this can be set in preferences.txt, but I'm not sure where to put it in there or what the actual line should look like.

I've also found that there is a bug filed that talks about using large images and how that can eat up memory. Well my applet does use a large image and so I'm assuming that's the problem. Is there any way around this?
Page Index Toggle Pages: 1