Skip to content
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

50% of the time causes a stackoverflow exception when using standard subtract demo #35

Open
fredborden214 opened this issue Mar 1, 2023 · 3 comments

Comments

@fredborden214
Copy link

StackOverflowException: The requested operation caused a stack overflow.
System.Collections.Generic.List1[T].set_Capacity (System.Int32 value) (at <03bd9b261dff4c2b8b568aca27f561b2>:0) System.Collections.Generic.List1[T].EnsureCapacity (System.Int32 min) (at <03bd9b261dff4c2b8b568aca27f561b2>:0)
System.Collections.Generic.List1[T].AddWithResize (T item) (at <03bd9b261dff4c2b8b568aca27f561b2>:0) Parabox.CSG.Plane.SplitPolygon (Parabox.CSG.Polygon polygon, System.Collections.Generic.List1[T] coplanarFront, System.Collections.Generic.List1[T] coplanarBack, System.Collections.Generic.List1[T] front, System.Collections.Generic.List1[T] back) (at Packages/co.parabox.csg/CSG/Classes/Plane.cs:108) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:108)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119) Parabox.CSG.Node.Build (System.Collections.Generic.List1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs:119)
Parabox.CSG.Node.Build (System.Collections.Generic.List`1[T] list) (at Packages/co.parabox.csg/CSG/Classes/Node.cs

@BrunoNext
Copy link

I am having the same issue doing a Subtract operation on a complex mesh, every time.

Is their any workaround?

@fredborden214
Copy link
Author

made a fix that worked for me:
https://github.com/fredborden214/pb_CSG

@karl-
Copy link
Owner

karl- commented May 1, 2024

In many cases these problems can be reduced or eliminated by adjusting the epsilon values used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants