Out of memory error . . . ideas for causes?
in
Programming Questions
•
4 months ago
Hi there –
I have a simple sketch that generates an out-of-memory error if the mouse is moved close to 0,0; is this a problem with how I've constructed it, or a problem with Processing? I'm using Processing 2.0, Mac 10.6.8.
- void setup()
- {
- size(500, 500, P3D);
- }
- void draw()
- {
- camera(mouseX, 0, mouseY, 0, 0, 0, 0, 1, 0);
- for (int i=1; i<100; i++) {
- ellipse(i*2, i*2, 2, 2);
- }
- }
Here is the console output:
java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap space
at com.jogamp.common.util.awt.AWTEDTExecutor.invoke(AWTEDTExecutor.java:58)
at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:100)
at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:205)
at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:172)
at javax.media.opengl.Threading.invoke(Threading.java:191)
at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:483)
at processing.opengl.PGL.requestDraw(PGL.java:1155)
at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1602)
at processing.core.PApplet.run(PApplet.java:2141)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.OutOfMemoryError: Java heap space
at processing.opengl.PGraphicsOpenGL$TessGeometry.expandLineVertices(PGraphicsOpenGL.java:9664)
at processing.opengl.PGraphicsOpenGL$TessGeometry.lineVertexCheck(PGraphicsOpenGL.java:9304)
at processing.opengl.PGraphicsOpenGL$Tessellator.tessellateEdges3D(PGraphicsOpenGL.java:11147)
at processing.opengl.PGraphicsOpenGL$Tessellator.tessellateEdges(PGraphicsOpenGL.java:11133)
at processing.opengl.PGraphicsOpenGL$Tessellator.tessellateTriangleFan(PGraphicsOpenGL.java:11634)
at processing.opengl.PGraphicsOpenGL.tessellate(PGraphicsOpenGL.java:2245)
at processing.opengl.PGraphicsOpenGL.endShape(PGraphicsOpenGL.java:2055)
at processing.core.PGraphics.endShape(PGraphics.java:1589)
at processing.opengl.PGraphicsOpenGL.ellipse(PGraphicsOpenGL.java:2961)
at processing.core.PApplet.ellipse(PApplet.java:11814)
at sketch_130608b.draw(sketch_130608b.java:31)
at processing.core.PApplet.handleDraw(PApplet.java:2270)
at processing.opengl.PGL$PGLListener.display(PGL.java:2643)
at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:576)
at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:561)
at javax.media.opengl.awt.GLCanvas$7.run(GLCanvas.java:1054)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1024)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:899)
at javax.media.opengl.awt.GLCanvas$8.run(GLCanvas.java:1065)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:708)
at java.awt.EventQueue.access$400(EventQueue.java:82)
at java.awt.EventQueue$2.run(EventQueue.java:669)
at java.awt.EventQueue$2.run(EventQueue.java:667)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:678)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
Could not run the sketch (Target VM failed to initialize).
For more information, read revisions.txt and Help ? Troubleshooting.
1