miho / JCSG

Java implementation of BSP based CSG (Constructive Solid Geometry)
Other
177 stars 52 forks source link

samples in the JCSG #11

Closed cznlzq closed 9 years ago

cznlzq commented 9 years ago

First of all, it's a very impressive work.

The project is easy to setup. However, when I tried the Egg.java or EggCup.java in the sample package It gives me these:

Exception in thread "main" java.lang.StackOverflowError at java.util.Arrays.copyOf(Unknown Source) at java.util.ArrayList.grow(Unknown Source) at java.util.ArrayList.ensureExplicitCapacity(Unknown Source) at java.util.ArrayList.ensureCapacityInternal(Unknown Source) at java.util.ArrayList.add(Unknown Source) at eu.mihosoft.vrl.v3d.Plane.splitPolygon(Plane.java:159) at eu.mihosoft.vrl.v3d.Node.lambda$2(Node.java:244) at eu.mihosoft.vrl.v3d.Node$$Lambda$9/4952965.accept(Unknown Source) at java.util.ArrayList.forEach(Unknown Source) at eu.mihosoft.vrl.v3d.Node.build(Node.java:243)

I'm not sure it's a bug or something I run the samples not correctly.

Please advise.

Thanks.

miho commented 9 years ago

You need to increase the stack size (-Xss256m). See the build.gradle file for details. If you run the examples via gradle it should do this automatically.

Does this solve your problem?

cznlzq commented 9 years ago

Yep, I solved the problem.

Besides the stack size, I do have to use the 64bit JRE for them.

Thanks.

miho commented 9 years ago

I'm glad it works for you!