Coder Social home page Coder Social logo

Comments (8)

pca006132 avatar pca006132 commented on July 3, 2024

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.

pca006132 avatar pca006132 commented on July 3, 2024

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.

cartesian-theatrics avatar cartesian-theatrics commented on July 3, 2024

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.

https://github.com/elalish/manifold/compare/master...SovereignShop:manifold:vec-out-of-range-error?expand=1

HullImage

from manifold.

pca006132 avatar pca006132 commented on July 3, 2024

Thanks, will have a look at it once I have time.

from manifold.

cartesian-theatrics avatar cartesian-theatrics commented on July 3, 2024

Uploaded another example here of a simple model that fails to import:

https://www.printables.com/model/837410-aeroponic-mister-fitting

from manifold.

pca006132 avatar pca006132 commented on July 3, 2024
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.

pca006132 avatar pca006132 commented on July 3, 2024

@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.

elalish avatar elalish commented on July 3, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.