We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm trying to enable depth sorting so I can export out a depth sorted PDF but when I try and use the hint(ENABLE_DEPTH_SORT) method in setup() I get this error when the sketch fires up:
java.lang.RuntimeException: java.lang.StackOverflowError
at processing.opengl.PSurfaceJOGL$2.run(PSurfaceJOGL.java:451)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.StackOverflowError
at processing.opengl.PGraphicsOpenGL$DepthSorter.sortByMinZ(PGraphicsOpenGL.java:13582)
at processing.opengl.PGraphicsOpenGL$DepthSorter.sortByMinZ(PGraphicsOpenGL.java:13582)
at processing.opengl.PGraphicsOpenGL$DepthSorter.sortByMinZ(PGraphicsOpenGL.java:13582)
I'm using Processing 3.1.1 on a Mac. Anybody have any ideas? I've tried it on the simplest of 3D stuff and I always get this error when trying to depth sort. Thanks.
Answers
code is here
https://github.com/processing/processing/blob/master/core/src/processing/opengl/PGraphicsOpenGL.java#L13563
it's doing some kind of recursive sort (quicksort?) on all the triangles in the frame and obviously just running out of stack
what are you drawing?
Can you post a very simple example that demonstrates the problem so we can try it ourselves?