Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArrayIndexOutOfBoundsException, lines in P3D #810

Closed
processing-bugs opened this issue Feb 10, 2013 · 2 comments
Closed

ArrayIndexOutOfBoundsException, lines in P3D #810

processing-bugs opened this issue Feb 10, 2013 · 2 comments

Comments

@processing-bugs
Copy link

Original author: bluet...@gmail.com (July 12, 2011 17:39:22)

Exception in thread "Animation Thread" java.lang.ArrayIndexOutOfBoundsException: 10000
at processing.core.PLine.drawPoint(Unknown Source)
at processing.core.PLine.draw(Unknown Source)
at processing.core.PGraphics3D.renderLineVertices(Unknown Source)
at processing.core.PGraphics3D.renderLines(Unknown Source)
at processing.core.PGraphics3D.endShape(Unknown Source)
at processing.core.PGraphics.endShape(Unknown Source)
at processing.core.PGraphics.line(Unknown Source)
at processing.core.PApplet.line(Unknown Source)
at sketch_jul12a.setup(sketch_jul12a.java:25)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:662)

What steps will reproduce the problem?

  1. Use renderer P3D
  2. Draw lines behind the camera
  3. Lines will show up on the screen, and sometimes will crash

What is the expected output? What do you see instead?
Line behind the camera shouldn't be drawn. Also, the crashing is an issue as well. The ArrayIndexOutOfBoundsException number seems to be consistently either 10000 or 12800.

What version of the product are you using? On what operating system?
Version 1.5.1, on XP.

Please provide any additional information below.
// Will normally crash after a couple thousand iterations
// some examples:
// [ 3851359.8, 526772.1, 4449312.0 ] -2673168.8, -5431925.5, -567936.75
// [ 6111037.5, 8448148.0, 7982192.5 ] [ -3011056.5, -8309331.5, -3184761.5 ](ArrayIndexOutOfBoundsException: 10000)
// [ 3.4797776E7, 3.263094E7, 3.300325E7 ] [ -1.7570148E7, -5.9902964E7, -1881317.8 ](ArrayIndexOutOfBoundsException: 12800)
size(100,100, P3D);
for (int i = 0; i < 10000; i++) {
PVector A = new PVector(i * random(10000),i * random(10000),i * random(10000));
PVector B = new PVector(i * random(-10000), i * random(-10000), i * random(-10000));
println(A + " " + B + " " + i);
line(A.x, A.y, A.z,
B.x, B.y, B.z);
}

Original issue: http://code.google.com/p/processing/issues/detail?id=772

@processing-bugs
Copy link
Author

From f...@processing.org on July 17, 2011 13:47:23
P3D is being removed for 2.0.P3D is being removed for 2.0.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant