cdcseacave / openMVS

open Multi-View Stereo reconstruction library
http://cdcseacave.github.io
GNU Affero General Public License v3.0
3.18k stars 891 forks source link

Crash at ReconstructMesh :throws SIGFPE #293

Open Nish160 opened 6 years ago

Nish160 commented 6 years ago

Specifications like the version of the project, operating system, and hardware

Ubuntu 16.04 OpenMVS master branch

Steps to reproduce the problem

I ran OpenMVG +OpenMVS on a set of 80 images generated from Unity gaming engine. It is able to run successfully till DensifyPointCloud but then suddenly terminates at ReconstructMesh. I have tried running ReconstructMesh with valgrind.Following is the log:

valgrind --tool=memcheck ./ReconstructMesh -i '/home/nishima/Documents/Datasets_OpenMVGMVS/9_Nadir/output_gcc6/mvs/scene_dense.mvs' -o '/home/nishima/Documents/Datasets_OpenMVGMVS/9_Nadir/output_gcc6/mvs/scene_dense_mesh.mvs' -w '/home/nishima/Documents/Datasets_OpenMVGMVS/9_Nadir/output_gcc6/mvs' ==27177== Memcheck, a memory error detector ==27177== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==27177== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info ==27177== Command: ./ReconstructMesh -i /home/nishima/Documents/Datasets_OpenMVGMVS/9_Nadir/output_gcc6/mvs/scene_dense.mvs -o /home/nishima/Documents/Datasets_OpenMVGMVS/9_Nadir/output_gcc6/mvs/scene_dense_mesh.mvs -w /home/nishima/Documents/Datasets_OpenMVGMVS/9_Nadir/output_gcc6/mvs ==27177== 12:52:16 [App ] Build date: Jan 24 2018, 11:57:49 12:52:16 [App ] CPU: Intel(R) Core(TM) i7-4910MQ CPU @ 2.90GHz 12:52:16 [App ] RAM: 125.80GB Physical Memory 0B Virtual Memory 12:52:16 [App ] OS: Linux 4.10.0-42-generic (x86_64) 12:52:16 [App ] SSE & AVX compatible CPU & OS detected 12:52:16 [App ] Command line: -i /home/nishima/Documents/Datasets_OpenMVGMVS/9_Nadir/output_gcc6/mvs/scene_dense.mvs -o /home/nishima/Documents/Datasets_OpenMVGMVS/9_Nadir/output_gcc6/mvs/scene_dense_mesh.mvs -w /home/nishima/Documents/Datasets_OpenMVGMVS/9_Nadir/output_gcc6/mvs 12:54:17 [App ] Scene loaded (2m751ms): 80 images (60 calibrated) with a total of 42.92 MPixels (0.72 MPixels/image) 4120302 points, 0 vertices, 0 faces Points inserted 105874 (2.57%, 15s, ETA 9m)...==27177== ==27177== Process terminating with default action of signal 8 (SIGFPE) ==27177== at 0x6BF5269: raise (pt-raise.c:35) ==27177== by 0x700E6CD: __gmp_invalid_operation (in /usr/lib/x86_64-linux-gnu/libgmp.so.10.3.0) ==27177== by 0x702BF34: __gmpq_set_d (in /usr/lib/x86_64-linux-gnu/libgmp.so.10.3.0) ==27177== by 0x58DE47: CGAL::Cartesian_converter<CGAL::Type_equality_wrapper<CGAL::Cartesian_base_no_ref_count<double, CGAL::Epick>, CGAL::Epick>, CGAL::Simple_cartesian, CGAL::NT_converter<double, CGAL::Gmpq> >::operator()(CGAL::Point_3 const&) const (in /home/nishima/Documents/installs/OpenMVGMVS_setup/openMVS_build/bin/ReconstructMesh) ==27177== by 0x592F00: CGAL::Sign CGAL::Filtered_predicate<CGAL::CartesianKernelFunctors::Compare_distance_3<CGAL::Simple_cartesian >, CGAL::CartesianKernelFunctors::Compare_distance_3<CGAL::Simple_cartesian<CGAL::Interval_nt > >, CGAL::Cartesian_converter<CGAL::Type_equality_wrapper<CGAL::Cartesian_base_no_ref_count<double, CGAL::Epick>, CGAL::Epick>, CGAL::Simple_cartesian, CGAL::NT_converter<double, CGAL::Gmpq> >, CGAL::Cartesian_converter<CGAL::Type_equality_wrapper<CGAL::Cartesian_base_no_ref_count<double, CGAL::Epick>, CGAL::Epick>, CGAL::Simple_cartesian<CGAL::Interval_nt >, CGAL::NT_converter<double, CGAL::Interval_nt > >, true>::operator()<CGAL::Point_3, CGAL::Point_3, CGAL::Point_3 >(CGAL::Point_3 const&, CGAL::Point_3 const&, CGAL::Point_3 const&) const (in /home/nishima/Documents/installs/OpenMVGMVS_setup/openMVS_build/bin/ReconstructMesh) ==27177== by 0x5ABDC8: MVS::Scene::ReconstructMesh(float, bool, unsigned int, float, float, float, float, float, float, float, float) (in /home/nishima/Documents/installs/OpenMVGMVS_setup/openMVS_build/bin/ReconstructMesh) ==27177== by 0x502CF5: main (in /home/nishima/Documents/installs/OpenMVGMVS_setup/openMVS_build/bin/ReconstructMesh) ==27177== ==27177== HEAP SUMMARY: ==27177== in use at exit: 401,469,915 bytes in 4,205,569 blocks ==27177== total heap usage: 9,614,361 allocs, 5,408,792 frees, 978,102,924 bytes allocated ==27177== ==27177== LEAK SUMMARY: ==27177== definitely lost: 0 bytes in 0 blocks ==27177== indirectly lost: 0 bytes in 0 blocks ==27177== possibly lost: 28,987 bytes in 110 blocks ==27177== still reachable: 401,440,928 bytes in 4,205,459 blocks ==27177== of which reachable via heuristic: ==27177== newarray : 1,536 bytes in 16 blocks ==27177== suppressed: 0 bytes in 0 blocks ==27177== Rerun with --leak-check=full to see details of leaked memory ==27177== ==27177== For counts of detected and suppressed errors, rerun with: -v ==27177== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Killed


The log seems to suggest that there is some problem with libgmp. Any help regarding this is appreciated. Thanks

cdcseacave commented 6 years ago

You could try to change the CGAL version. What version are you using now, and how, library or source code?

Please share the original photos and the command lines u used, I'll reproduce it on my pc and debug it.