Comments (8)
do you have any example that can reproduce the error? we never received any bug report like this from other users, but probably because hull is not used much in openscad, which uses other hull implementations.
from manifold.
because tbb will mess up with exception stack (they rethrow the error in the main calling thread), the simplest way to debug this kind of issue would be to set debugger breakpoints.
from manifold.
I threw up a branch with an example that loads two models that fail to subtract. Not sure if it's useful or not. Model looks like this, mask is similar shape but slightly smaller to make the result hollow when subtracted. I'll try to created a generated test case when I get the chance (this one is taken from a non-trivial model created with my Clojure bindings). I'm quite confident there's no crazy degeneracy in the mesh.
from manifold.
Thanks, will have a look at it once I have time.
from manifold.
Uploaded another example here of a simple model that fails to import:
https://www.printables.com/model/837410-aeroponic-mister-fitting
from manifold.
Program received signal SIGTRAP, Trace/breakpoint trap.
manifold::VecView<glm::vec<3, float, (glm::qualifier)0> const>::operator[] (i=7391, this=<optimized out>) at /home/pca006132/code/manifold/src/utilities/include/vec_view.h:59
59 throw std::out_of_range("Vec out of range");
(gdb) bt
#0 manifold::VecView<glm::vec<3, float, (glm::qualifier)0> const>::operator[] (i=7391, this=<optimized out>) at /home/pca006132/code/manifold/src/utilities/include/vec_view.h:59
#1 (anonymous namespace)::FaceMortonBox::operator() (inout=..., this=<optimized out>) at /home/pca006132/code/manifold/src/manifold/src/sort.cpp:102
#2 thrust::detail::wrapped_function<(anonymous namespace)::FaceMortonBox, void>::operator()<thrust::detail::tuple_of_iterator_references<unsigned int&, manifold::Box&, int> > (this=<optimized out>, x=...)
at _deps/thrust-src/thrust/detail/function.h:125
#3 thrust::system::detail::sequential::for_each_n<thrust::system::cpp::detail::par_t, thrust::zip_iterator<thrust::tuple<unsigned int*, manifold::Box*, thrust::counting_iterator<int, thrust::use_default, thrust::use_default, thrust::use_default>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type> >, int, (anonymous namespace)::FaceMortonBox> (
first=..., n=<optimized out>, f=<error reading variable: That operation is not available on integers of more than 8 bytes.>) at _deps/thrust-src/thrust/system/detail/sequential/for_each.h:82
#4 thrust::for_each_n<thrust::system::cpp::detail::par_t, thrust::zip_iterator<thrust::tuple<unsigned int*, manifold::Box*, thrust::counting_iterator<int, thrust::use_default, thrust::use_default, thrust::use_default>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type> >, int, (anonymous namespace)::FaceMortonBox> (exec=..., first=...,
n=<optimized out>, f=...) at _deps/thrust-src/thrust/detail/for_each.inl:67
#5 0x00007ffff7e8a2b7 in manifold::for_each_n<thrust::zip_iterator<thrust::tuple<unsigned int*, manifold::Box*, thrust::counting_iterator<int, thrust::use_default, thrust::use_default, thrust::use_default>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type> >, int, (anonymous namespace)::FaceMortonBox> (args=..., args=..., args=...,
policy=<optimized out>) at /home/pca006132/code/manifold/src/utilities/include/par.h:170
#6 manifold::Manifold::Impl::GetFaceBoxMorton (this=this@entry=0x7fffffff4df0, faceBox=..., faceMorton=...) at /home/pca006132/code/manifold/src/manifold/src/sort.cpp:386
#7 0x00007ffff7e880ca in manifold::Manifold::Impl::Finish (this=0x7fffffff4df0) at /home/pca006132/code/manifold/src/manifold/src/sort.cpp:256
#8 0x00007ffff7e2ec61 in manifold::Boolean3::Result (this=0x7fffffff4f80, op=manifold::OpType::Subtract) at /home/pca006132/code/manifold/src/manifold/src/boolean_result.cpp:813
#9 0x00007ffff7e421ff in manifold::CsgOpNode::ToLeafNode (this=0x3a7ee1c0fb0) at /home/pca006132/code/manifold/src/manifold/src/csg_tree.cpp:435
#10 0x00007ffff7e662d1 in manifold::Manifold::GetCsgLeafNode (this=0x7fffffff5170) at /home/pca006132/code/manifold/src/manifold/src/manifold.cpp:110
#11 0x00007ffff7e669ca in manifold::Manifold::GetMesh (this=0x116e) at /home/pca006132/code/manifold/src/manifold/src/manifold.cpp:159
#12 0x00005555555f28d1 in Manifold_HullFail_Test::TestBody (this=<optimized out>) at /home/pca006132/code/manifold/test/manifold_test.cpp:350
It seems that the commit causing issue is 32eefe9. Still need further debugging though.
from manifold.
@elalish I think some of the loops have different behavior, for example for DedupeEdge
halfedge_[halfedge_[current].pairedHalfedge].startVert = newVert;
is different from
current = NextHalfedge(current);
halfedge_[current].startVert = newVert;
from manifold.
Good call - okay I'll revert #778 and reopen it so we can do a more serious review. Does anyone have an idea for a TEST
we can add to catch this kind of thing?
from manifold.
Related Issues (20)
- vertex halfedge iterator
- Manifold 2.4.5 release tar.gz is incomplete HOT 3
- 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
- Port for vcpkg HOT 2
- use size_t whenever possible
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.