Bug 1093 : apparent memory leak in rotateX() and rotateY()
Last modified: 2008-12-05 09:10




Status:
RESOLVED
Resolution:
DUPLICATE of bug 1086
Priority:
P2
Severity:
normal

 

Reporter:
leespector
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2008-12-05 09:08
The code below generally gives an OutOfMemoryError within a minute in Processing 1.0.1
under Mac OS 10.5.5 on a 2.6GHz/4GB Mac Book Pro, running in the default memory
configuration (and also in increased memory configurations, though possibly more slowly). I'll
include the full red error message below the code.

The error occurs when using either rotateX() or rotateY() (or both), but rotateZ() seems to
be okay.

I also get the same error if I switch to OPENGL (and then it also looks worse).

--- code ---
// Lee Spector, lspector@hampshire.edu
// 20081205

void setup()
{
size(400, 400, P3D);
background(255);
noStroke();
}

void draw()
{
rotateX(random(2 * PI));
//rotateY(random(2 * PI));
//rotateZ(random(2 * PI));
fill(random(255), random(255), random(255), random(50));
ellipse(random(width) , random(height), random(200), random(200));
}

--- end of code ---

--- error message ---

An OutOfMemoryError means that your code is either using up too much memory
because of a bug (e.g. creating an array that's too large, or unintentionally
loading thousands of images), or that your sketch may need more memory to run.
If your sketch uses a lot of memory (for instance if it loads a lot of data files)
you can increase the memory available to your sketch using the Preferences window.
Exception in thread "Animation Thread" java.lang.OutOfMemoryError: Java heap space
at processing.core.PGraphics.vertexCheck(PGraphics.java:922)
at processing.core.PGraphics.vertex(PGraphics.java:965)
at processing.core.PGraphics3D.vertex(PGraphics3D.java:570)
at processing.core.PGraphics3D.ellipseImpl(PGraphics3D.java:2611)
at processing.core.PGraphics.ellipse(PGraphics.java:1517)
at processing.core.PApplet.ellipse(PApplet.java:6965)
at leak.draw(leak.java:33)
at processing.core.PApplet.handleDraw(PApplet.java:1406)
at processing.core.PApplet.run(PApplet.java:1311)
at java.lang.Thread.run(Thread.java:613)

--- end of error message ---
Additional Comment #1 From fry 2008-12-05 09:10


*** This bug has been marked as a duplicate of 1086 ***