Comments (6)
Strange! Regardless of what you do, it shouldn't crash, so I'd call this a bug. The Status thing may be a red-herring - that may just be triggering the CSG tree to evaluate. Please make a PR with a TEST
- our CI runs on quite a few platforms, so hopefully one will catch it.
Regarding your goal of cutting with a half-space, we actually already have functions to make that easy: SplitByPlane()
and TrimByPlane()
.
from manifold.
Pull request #713 submitted. As expected it doesn't fail on my local machine, so we'll see what happens with the others. In case it's useful, I managed to get a gdb backtrace of the observed crash:
#0 0x00007ffff217cacf in raise () from /lib64/libc.so.6
#1 0x00007ffff214fea5 in abort () from /lib64/libc.so.6
#2 0x00007ffff21bdcc7 in __libc_message () from /lib64/libc.so.6
#3 0x00007ffff21c4fcc in malloc_printerr () from /lib64/libc.so.6
#4 0x00007ffff21c6b54 in _int_free () from /lib64/libc.so.6
#5 0x00007ffff070b2a5 in std::__new_allocator<std::_Rb_tree_node<std::pair<int const, int> > >::deallocate (__n=1, __p=<optimized out>, this=0x7ffffffef1f0)
at /usr/include/c++/12/bits/new_allocator.h:142
#6 std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<int const, int> > > >::deallocate (__n=1, __p=<optimized out>, __a=...) at /usr/include/c++/12/bits/alloc_traits.h:496
#7 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_put_node (__p=<optimized out>, this=0x7ffffffef1f0)
at /usr/include/c++/12/bits/stl_tree.h:565
#8 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_drop_node (__p=<optimized out>, this=0x7ffffffef1f0)
at /usr/include/c++/12/bits/stl_tree.h:632
#9 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_erase_aux (__position=..., this=0x7ffffffef1f0)
at /usr/include/c++/12/bits/stl_tree.h:2495
#10 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::erase[abi:cxx11](std::_Rb_tree_iterator<std::pair<int const, int> >) (
__position=..., this=0x7ffffffef1f0) at /usr/include/c++/12/bits/stl_tree.h:1209
#11 std::multimap<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::erase[abi:cxx11](std::_Rb_tree_iterator<std::pair<int const, int> >) (__position=..., this=0x7ffffffef1f0)
at /usr/include/c++/12/bits/stl_multimap.h:713
#12 manifold::Manifold::Impl::Face2Polygons (this=0x7ffffffef950, start=0xa863f0, end=0xa86450, projection=...) at manifold/src/manifold/src/face_op.cpp:224
#13 0x00007ffff070b540 in operator() (face=<optimized out>, __closure=0x6b9900) at manifold/src/manifold/src/face_op.cpp:132
#14 std::__invoke_impl<std::vector<glm::vec<3, int, (glm::qualifier)0> >, manifold::Manifold::Impl::Face2Tri(const manifold::Vec<int>&, const manifold::Vec<manifold::TriRef>&)::<lambda(int)>&, int> (__f=...)
at /usr/include/c++/12/bits/invoke.h:61
#15 std::__invoke_r<std::vector<glm::vec<3, int, (glm::qualifier)0> >, manifold::Manifold::Impl::Face2Tri(const manifold::Vec<int>&, const manifold::Vec<manifold::TriRef>&)::<lambda(int)>&, int> (__fn=...)
at /usr/include/c++/12/bits/invoke.h:116
#16 std::_Function_handler<std::vector<glm::vec<3, int, (glm::qualifier)0>, std::allocator<glm::vec<3, int, (glm::qualifier)0> > >(int), manifold::Manifold::Impl::Face2Tri(const manifold::Vec<int>&, const manifold::Vec<manifold::TriRef>&)::<lambda(int)> >::_M_invoke(const std::_Any_data &, int &&) (__functor=..., __args#0=<optimized out>) at /usr/include/c++/12/bits/std_function.h:291
#17 0x00007ffff070a1cf in std::function<std::vector<glm::vec<3, int, (glm::qualifier)0>, std::allocator<glm::vec<3, int, (glm::qualifier)0> > > (int)>::operator()(int) const (__args#0=32, this=0x7ffffffef3f0)
at /usr/include/c++/12/bits/std_function.h:591
#18 operator() (face=32, addTri=..., general=..., __closure=<synthetic pointer>) at manifold/src/manifold/src/face_op.cpp:122
#19 std::__invoke_impl<void, manifold::Manifold::Impl::Face2Tri(const manifold::Vec<int>&, const manifold::Vec<manifold::TriRef>&)::<lambda(manifold::GeneralTriangulation, manifold::AddTriangle, int)>&, manifold::Manifold::Impl::Face2Tri(const manifold::Vec<int>&, const manifold::Vec<manifold::TriRef>&)::<lambda(int)>&, manifold::Manifold::Impl::Face2Tri(const manifold::Vec<int>&, const manifold::Vec<manifold::TriRef>&)::<lambda(int, glm::ivec3, glm::vec3, manifold::TriRef)>&, int&> (__f=<synthetic pointer>...) at /usr/include/c++/12/bits/invoke.h:61
#20 std::__invoke<manifold::Manifold::Impl::Face2Tri(const manifold::Vec<int>&, const manifold::Vec<manifold::TriRef>&)::<lambda(manifold::GeneralTriangulation, manifold::AddTriangle, int)>&, manifold::Manifold::Impl::Face2Tri(const manifold::Vec<int>&, const manifold::Vec<manifold::TriRef>&)::<lambda(int)>&, manifold::Manifold::Impl::Face2Tri(const manifold::Vec<int>&, const manifold::Vec<manifold::TriRef>&)::<lambda(int, glm::ivec3, glm::vec3, manifold::TriRef)>&, int&> (__fn=<synthetic pointer>...) at /usr/include/c++/12/bits/invoke.h:96
#21 std::_Bind<manifold::Manifold::Impl::Face2Tri(const manifold::Vec<int>&, const manifold::Vec<manifold::TriRef>&)::<lambda(manifold::GeneralTriangulation, manifold::AddTriangle, int)>(manifold::Manifold::Impl::Face2Tri(const manifold::Vec<int>&, const manifold::Vec<manifold::TriRef>&)::<lambda(int)>, manifold::Manifold::Impl::Face2Tri(const manifold::Vec<int>&, const manifold::Vec<manifold::TriRef>&)::<lambda(int, glm::ivec3, glm::vec3, manifold::TriRef)>, std::_Placeholder<1>)>::__call<void, int&, 0, 1, 2> (__args=..., this=<synthetic pointer>) at /usr/include/c++/12/functional:495
#22 std::_Bind<manifold::Manifold::Impl::Face2Tri(const manifold::Vec<int>&, const manifold::Vec<manifold::TriRef>&)::<lambda(manifold::GeneralTriangulation, manifold::AddTriangle, int)>(manifold::Manifold::Impl::Face2Tri(const manifold::Vec<int>&, const manifold::Vec<manifold::TriRef>&)::<lambda(int)>, manifold::Manifold::Impl::Face2Tri(const manifold::Vec<int>&, const manifold::Vec<manifold::TriRef>&)::<lambda(int, glm::ivec3, glm::vec3, manifold::TriRef)>, std::_Placeholder<1>)>::operator()<int&> (this=<synthetic pointer>) at /usr/include/c++/12/functional:580
#23 manifold::Manifold::Impl::Face2Tri (this=this@entry=0x7ffffffef950, faceEdge=..., halfedgeRef=...) at manifold/src/manifold/src/face_op.cpp:188
#24 0x00007ffff06e5e2e in manifold::Boolean3::Result (this=this@entry=0x7ffffffefaf0, op=op@entry=manifold::OpType::Subtract) at manifold/src/manifold/src/boolean_result.cpp:778
#25 0x00007ffff06feaa9 in manifold::CsgOpNode::ToLeafNode (this=0x6b9dd0) at manifold/src/manifold/src/csg_tree.cpp:433
#26 0x00007ffff071fe48 in manifold::Manifold::GetCsgLeafNode (this=0x7ffffffefde0) at manifold/src/manifold/src/manifold.cpp:110
#27 0x00007ffff072011a in manifold::Manifold::Status (this=<optimized out>) at manifold/src/manifold/src/manifold.cpp:364
from manifold.
Thanks, could you build with the MANIFOLD_DEBUG
flag? That will run extra checks and catch the problem earlier.
from manifold.
If I do that I'm getting a lot of k=1 Not in domain! printouts. If my local manifold fork's CI tests are running correctly, it looks like the TBB test case is triggering the same printouts.
from manifold.
I'll also look into TrimByPlane() - that sounds like a much better way to go, if I can properly inject it into our tree evaluation.
from manifold.
Just to follow up, I did end up going with TrimByPlane for this particular use case - thanks for adding that!
from manifold.
Related Issues (20)
- Python created object reports as non-manifold. HOT 3
- Watertightness of Mesh with an Edge Shared by 4 Faces
- vertex halfedge iterator
- Manifold 2.4.5 release tar.gz is incomplete HOT 3
- Vec out of Range HOT 8
- Python binding needs two import call HOT 4
- Manifold Decompose doesn't preserve vertex properties HOT 4
- memory leak when TBB and PSTL is enabled HOT 27
- Triangulate bug: Two separate polygons HOT 5
- [Question] robust geometric predicates, polygon triangulation
- Warning comparison of integer expressions of different signedness
- Modularize Manifold HOT 25
- Build without exceptions HOT 3
- Remove Thrust HOT 19
- How to figure out required size of mem in the C-API? HOT 1
- Crash in Project() HOT 4
- gcc14 build failure HOT 7
- Triangulation issue: Zebra HOT 3
- BSD compiler error HOT 1
- Another Zebra Triangulation issue HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from manifold.