JCSG
JCSG copied to clipboard
WeightedTubeSample example causes StackOverflowError
Hi,
When trying out your bundled examples, the 'WeightedTubeSample' crashes with the following stack trace:
Exception in thread "main" java.lang.StackOverflowError
at java.util.HashMap.put(HashMap.java:612)
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)
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)
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)
Tested against v0.5.7.
The RoundedCubeSample works fine.
Can you try with an increased stack? Some samples don't work with default stacksize of the JVM (might also depend on the JVM vendor and version you are using).