Skip to content

PShape array index out of bounds when using P3D (PShapeOpenGL.java) #4773

Description

@aarondbaron

When trying to edit a PShape childs vertex using the setVertex(index, int, int) method , this ArrayIndexOutOfBoundsException: 2 occurs at line 1667 of the file PShapeOpenGL.java : "if (is3D) vertices[index][Z] = z;"

It will not throw this problem if you use a different renderer because it's not 3D.

To replicate, load an svg file that has one or more children. Set renderer to P3d. Load the svg, get a child, try to edit the vertex using setVertex(index, int, int), and the error will occur.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions