You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PShape crashes with ArrayIndexOutOfBoundsException when endShape(CLOSE) follows 1 vertex() and 4 or more bezierVertex() calls #1599
Creating a PShape with one vertex() followed by four bezierVertex() calls and closing it with endShape(CLOSE) throws:
ArrayIndexOutOfBoundsException: Index 10 out of bounds for length 10
The issue can be worked around by using a different renderer: calling size(800, 800, P2D) or size(800, 800, P3D) instead of the default Java2D. With P2D/P3D, the same sketch runs without the ArrayIndexOutOfBoundsException
Expected: When running a sketch that correctly uses PShape, vertex(), and bezierVertex(), the program should render the shape in the 800×800 window without throwing any exceptions. No ArrayIndexOutOfBoundsException should occur, and the sketch must run stably in the draw() loop
Activity