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
I believe the default renderer in Android mode has a bug affecting PShapes drawn using vertices.
The issue only seems to occur when trying to declare a PShape object, and drawing to that object using vertices. The error can be bypassed by drawing the shape in the main Draw() loop repeatedly, however I believe that removes the advantage of using a PShape. The error message (partially) thrown is
FATAL EXCEPTION: Animation Thread
Process: processing.test.pshapetest, PID: 4730
java.lang.ArrayIndexOutOfBoundsException: src.length=2 srcPos=0 dst.length=37 dstPos=0 length=37
at java.lang.System.arraycopy(Native Method)
at processing.core.PGraphics.vertex(PGraphics.java:1427)
However if you change the renderer to P2D the error vanishes. I didn't paste the entire error but what stood out to me, which is the arraycopy and vertex messages. I tried drawing the shapes in many different ways but P2D appears the only way to draw vertex shapes so far from my small amount of experimenting.
This code will throw the error message I quoted above:
but if you change fullScreen(); to fullScreen(P2D); it will compile and run fine.
I made a reddit post about it and tried running the code that was suggested in a thread I was linked to in the reddit post I made and had similar results.
I think this may be a bug with the default renderer.
The text was updated successfully, but these errors were encountered:
@spacemanstan thanks for posting this issue, I can confirm that affects the default renderer only on Android, not in the Java mode. I will look into it.
I believe the default renderer in Android mode has a bug affecting PShapes drawn using vertices.
The issue only seems to occur when trying to declare a PShape object, and drawing to that object using vertices. The error can be bypassed by drawing the shape in the main Draw() loop repeatedly, however I believe that removes the advantage of using a PShape. The error message (partially) thrown is
However if you change the renderer to P2D the error vanishes. I didn't paste the entire error but what stood out to me, which is the arraycopy and vertex messages. I tried drawing the shapes in many different ways but P2D appears the only way to draw vertex shapes so far from my small amount of experimenting.
This code will throw the error message I quoted above:
but if you change
fullScreen();
tofullScreen(P2D);
it will compile and run fine.I made a reddit post about it and tried running the code that was suggested in a thread I was linked to in the reddit post I made and had similar results.
I think this may be a bug with the default renderer.
The text was updated successfully, but these errors were encountered: