FAQ
Cover
\
Build
\
Source
\
Bugs
\
Reference
\
Libraries
\
Tools
The bugs database has moved
here
.
Bug 1115 : DepthSortIssue?
Last modified: 2009-02-19 19:20
P
roject:
processing
trash
Version:
unspecified
Co
m
ponent:
android
book
core
libraries
pde
reference
tools
web
Status:
RESOLVED
Resolution:
DUPLICATE of bug
176
Pr
i
ority:
P2
Severity:
normal
Platform
All
O
S:
All
Windows
Mac OS
Linux
Other
Reporter:
josn
Assigned To:
fry
Attachment
Type
Created
Size
Actions
Description
: Opened: 2009-01-08 17:20
This Code errors on different vertexCount. Try different iterationsnumber
for SHAPES,VERTS.
The Error:
Exception in thread "Animation Thread" java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at processing.core.PApplet.arrayCopy(PApplet.java:4534)
at processing.core.PGraphics3D.addPolygonTriangles(PGraphics3D.java:1512)
at processing.core.PGraphics3D.endShapeFill(PGraphics3D.java:872)
at processing.core.PGraphics3D.endShape(PGraphics3D.java:612)
at processing.core.PApplet.endShape(PApplet.java:6861)
at sketch_jan09c.setup(sketch_jan09c.java:36)
at processing.core.PApplet.handleDraw(PApplet.java:1383)
at processing.core.PApplet.run(PApplet.java:1311)
at java.lang.Thread.run(Unknown Source)
I looked into the PGraphicsCode. Must be something in z_buffering. You get
no error if the vertices are on the same position. (int the code the y is
different).
CODE:
void setup()
{
int SHAPES=45;
int VERTS=213;
size(500,500,P3D);
hint(ENABLE_DEPTH_SORT);
int VertexCount=0;
noStroke();
for (int i=0;i<SHAPES;i++)
{
beginShape();println("SHAPE No.:"+i);
for(int j=0;j<VERTS;j++)
{
vertex(100,100,120); println("V:"+j+" of "+i+". Shape...VERTEXCOUNT:
"+VertexCount);VertexCount++;
vertex(100,101,120); println("V:"+j+" of "+i+". Shape...VERTEXCOUNT:
"+VertexCount);VertexCount++;
}
endShape(CLOSE);println("SHAPE No.:"+i+" DONE...");
}
}
Additional Comment
#1 From josn 2009-01-08 17:30
Almost forgot..
It crashes only with DepthSort is enabled..
winXP Processing 1.0 (with java)
And it dont care if you use P3D or OPENGL.
Additional Comment
#2 From fry 2009-02-19 19:20
*** This bug has been marked as a duplicate of
176
***