[iliad:thomas]~/Software/triwild-vanilla/examples/figure7[master]>valgrind ../../build/TriWild --input input.obj --feature-input input.json --target-edge-length-r 0.2 --output output_0.2 ==4191208== Memcheck, a memory error detector ==4191208== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al. ==4191208== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info ==4191208== Command: ../../build/TriWild --input input.obj --feature-input input.json --target-edge-length-r 0.2 --output output_0.2 ==4191208== ___________________________________________________________________________________________________________________________________ | | | o-[Process ] Using posix threads | | Multithreading enabled | | Available cores = 12 | | Max used threads = 12 | | Cancel mode disabled | Loading and preprocessing ... remove duplicates: #v 2891->2814 #e 2782->2782 simplify 0/109 features are simplified #features = 109 get_inflections & cut_reflex #features = 118 sample_features remove_high_curvature ==4191208== Invalid read of size 8 ==4191208== at 0xF405E6: triwild::feature::remove_high_curvature(std::vector >, std::allocator > > >&, std::vector >, std::allocator > > >&, std::vector >, std::allocator > > >&) (feature_preprocessing.cpp:942) ==4191208== by 0xF37892: triwild::feature::preprocessing(Eigen::Matrix&, std::vector, std::allocator > >&) (feature_preprocessing.cpp:90) ==4191208== by 0xEA35EA: triwild::triangulation::preprocessing(Eigen::Matrix&, std::vector, std::allocator > >&, GEO::Mesh&) (triangulation.cpp:161) ==4191208== by 0xE2CBBB: main (main.cpp:150) ==4191208== Address 0x591b888 is 8 bytes after a block of size 3,184 alloc'd ==4191208== at 0x484202F: operator new(unsigned long) (vg_replace_malloc.c:422) ==4191208== by 0xE89749: __gnu_cxx::new_allocator::allocate(unsigned long, void const*) (new_allocator.h:127) ==4191208== by 0xE8300E: std::allocator_traits >::allocate(std::allocator&, unsigned long) (alloc_traits.h:464) ==4191208== by 0xE7B01D: std::_Vector_base >::_M_allocate(unsigned long) (stl_vector.h:346) ==4191208== by 0xE7776A: void std::vector >::_M_range_initialize<__gnu_cxx::__normal_iterator > > >(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, std::forward_iterator_tag) (stl_vector.h:1582) ==4191208== by 0xE70C96: std::vector >::vector<__gnu_cxx::__normal_iterator > >, void>(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, std::allocator const&) (stl_vector.h:657) ==4191208== by 0xF404A1: triwild::feature::remove_high_curvature(std::vector >, std::allocator > > >&, std::vector >, std::allocator > > >&, std::vector >, std::allocator > > >&) (feature_preprocessing.cpp:939) ==4191208== by 0xF37892: triwild::feature::preprocessing(Eigen::Matrix&, std::vector, std::allocator > >&) (feature_preprocessing.cpp:90) ==4191208== by 0xEA35EA: triwild::triangulation::preprocessing(Eigen::Matrix&, std::vector, std::allocator > >&, GEO::Mesh&) (triangulation.cpp:161) ==4191208== by 0xE2CBBB: main (main.cpp:150) ==4191208== ==4191208== Invalid read of size 8 ==4191208== at 0xF4058F: triwild::feature::remove_high_curvature(std::vector >, std::allocator > > >&, std::vector >, std::allocator > > >&, std::vector >, std::allocator > > >&) (feature_preprocessing.cpp:942) ==4191208== by 0xF37892: triwild::feature::preprocessing(Eigen::Matrix&, std::vector, std::allocator > >&) (feature_preprocessing.cpp:90) ==4191208== by 0xEA35EA: triwild::triangulation::preprocessing(Eigen::Matrix&, std::vector, std::allocator > >&, GEO::Mesh&) (triangulation.cpp:161) ==4191208== by 0xE2CBBB: main (main.cpp:150) ==4191208== Address 0x6646fc0 is 64 bytes inside an unallocated block of size 319,584 in arena "client" ==4191208== 20 segments are removed #features = 118 remove_short_features 0 short edges are removed #features = 118 mu_separation #pairs = 237 #check_feature = 118(118) ==4191208== Invalid read of size 8 ==4191208== at 0xF3E898: triwild::feature::mu_separation(std::vector >, std::allocator > > >&, std::vector >, std::allocator > > >&, std::vector >, std::allocator > > >&) (feature_preprocessing.cpp:780) ==4191208== by 0xF37AC7: triwild::feature::preprocessing(Eigen::Matrix&, std::vector, std::allocator > >&) (feature_preprocessing.cpp:109) ==4191208== by 0xEA35EA: triwild::triangulation::preprocessing(Eigen::Matrix&, std::vector, std::allocator > >&, GEO::Mesh&) (triangulation.cpp:161) ==4191208== by 0xE2CBBB: main (main.cpp:150) ==4191208== Address 0x9fdab60 is 2,256 bytes inside an unallocated block of size 2,878,800 in arena "client" ==4191208== ==4191208== Invalid read of size 8 ==4191208== at 0xF3E8F5: triwild::feature::mu_separation(std::vector >, std::allocator > > >&, std::vector >, std::allocator > > >&, std::vector >, std::allocator > > >&) (feature_preprocessing.cpp:780) ==4191208== by 0xF37AC7: triwild::feature::preprocessing(Eigen::Matrix&, std::vector, std::allocator > >&) (feature_preprocessing.cpp:109) ==4191208== by 0xEA35EA: triwild::triangulation::preprocessing(Eigen::Matrix&, std::vector, std::allocator > >&, GEO::Mesh&) (triangulation.cpp:161) ==4191208== by 0xE2CBBB: main (main.cpp:150) ==4191208== Address 0x9fdacf8 is 2,664 bytes inside an unallocated block of size 2,878,800 in arena "client" ==4191208== 43.4742s #features = 114 cut_inflections #features = 166 remove_short_features again 0 short edges are removed #features = 166 gen_segments #v = 1757 #e = 1727 refine: #v 2814->1757 #e 2782->1727 simplify: #v 1757->1672 #e 1727->1642 #secondary_features = 20 Loaded and preprocessed. time = 60.8458s BSP subdivision... #v 1850->1874 #f 3648->3696 BSP subdivision done. time = 1.4112s Mesh optimization... #v = 1874(1874) unrounded = 0 #t = 3696(3696) max_energy = 453.811 avg_energy = 13.1672 min_angle = 0.145789, max_angle = 174.633 < 5: 0.0960498, < 10: 0.193182, < 15: 0.249459 > 175: 0, > 170: 0.00270563, > 165: 0.00459957 //////////////// preprocessing //////////////// feature vertex snapping... success 6/6 feature vertex snapping done! time = 0.029177s #v = 1874(1874) unrounded = 0 #t = 3696(3696) max_energy = 453.811 avg_energy = 13.1714 min_angle = 0.145789, max_angle = 174.633 < 5: 0.0960498, < 10: 0.193182, < 15: 0.249188 > 175: 0, > 170: 0.00270563, > 165: 0.00459957 edge collapsing... queue_s.size() = 9715 success 462 re-push 1002 queue_s.size() = 287 success 7 re-push 11 queue_s.size() = 8 success 0 re-push 0 edge collapsing done! time = 2.18951s #v = 1405(1874) unrounded = 0 #t = 2765(3696) max_energy = 453.811 avg_energy = 13.5962 min_angle = 0.145789, max_angle = 174.633 < 5: 0.0907776, < 10: 0.166004, < 15: 0.213382 > 175: 0, > 170: 0.00289331, > 165: 0.00542495 //////////////// pass 0 //////////////// feature vertex snapping... success 1/1 feature vertex snapping done! time = 0.014191s #v = 1405(1874) unrounded = 0 #t = 2765(3696) max_energy = 453.811 avg_energy = 13.5979 min_angle = 0.145789, max_angle = 174.633 < 5: 0.0907776, < 10: 0.166004, < 15: 0.213382 > 175: 0, > 170: 0.00289331, > 165: 0.00542495 edge splitting... ==4191208== Invalid read of size 8 ==4191208== at 0xED8274: triwild::optimization::edge_splitting(triwild::MeshData&) (edge_splitting.cpp:41) ==4191208== by 0xEBBF54: triwild::optimization::operation(triwild::MeshData&, GEO::MeshFacetsAABB&, std::array const&) (optimization.cpp:363) ==4191208== by 0xEBB903: triwild::optimization::refine(triwild::MeshData&, GEO::MeshFacetsAABB&, std::array const&) (optimization.cpp:252) ==4191208== by 0xE2CE87: main (main.cpp:175) ==4191208== Address 0x8 is not stack'd, malloc'd or (recently) free'd ==4191208== Abnormal program termination: received signal 11 (Segmentation fault) \___________________________________________________________________________________________________________________________________/ ==4191208== ==4191208== HEAP SUMMARY: ==4191208== in use at exit: 2,123,809 bytes in 23,548 blocks ==4191208== total heap usage: 579,455 allocs, 555,907 frees, 56,008,682 bytes allocated ==4191208== ==4191208== LEAK SUMMARY: ==4191208== definitely lost: 0 bytes in 0 blocks ==4191208== indirectly lost: 0 bytes in 0 blocks ==4191208== possibly lost: 0 bytes in 0 blocks ==4191208== still reachable: 2,123,809 bytes in 23,548 blocks ==4191208== suppressed: 0 bytes in 0 blocks ==4191208== Rerun with --leak-check=full to see details of leaked memory ==4191208== ==4191208== For lists of detected and suppressed errors, rerun with: -s ==4191208== ERROR SUMMARY: 10 errors from 5 contexts (suppressed: 0 from 0)