-
Notifications
You must be signed in to change notification settings - Fork 54
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
Stackoverflow #54
Comments
I think a fix to this problem might be found in a fix to the original csg.js My Java interpretation of the JavaScript build method in Node.java is:
Please could someone check this new build method, to see if this is a good fix. |
Just hit the same problem. Is it going to be fixed? |
Have the same issue with intersection of two shape, the problem in sphere
Debug shows problem during building node: Node a = new Node(this.clone().polygons); Error stack: caused by: java.lang.StackOverflowError |
I have a solution for this, and it is in the Plane.splitPolygon() I discovered after a few days elbow deep in the debugger that some planes coming into the CSG system may not be as flat as the epsilon value requires. When that happens, the self plane is never added to the co-plainer node. To fix this, we read through the points on the incoming polygon and measure the epsilon of the incoming plane. Then when the next loop checks for the front/back/coplainer of the incoming polygon against the self plane, then it passes the test appropriately.
EDIT I submitted a PR to this effect: #64 |
I have many instances over stackoverflow exception
Exception in thread "JavaFX Application Thread" java.lang.StackOverflowError
at java.util.HashSet.add(HashSet.java:220)
at java.util.stream.DistinctOps$1$2.accept(DistinctOps.java:174)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at eu.mihosoft.jcsg.Node.build(Node.java:244)
at eu.mihosoft.jcsg.Node.build(Node.java:259)
at eu.mihosoft.jcsg.Node.build(Node.java:259)
at eu.mihosoft.jcsg.Node.build(Node.java:259)
...
In one run I have a success rate of about 80% with 20% failures, where the geometries are similar but different.
I have tried increasing the stack size with this runtime option: -Xss16m
But this seems to make no difference.
Any thoughts or ideas please?
Thanks.
Jim
The text was updated successfully, but these errors were encountered: