cdcseacave / openMVS

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

Crash on ReconstructMesh. Segmentation fault (core dump) #191

Open mrbemani opened 7 years ago

mrbemani commented 7 years ago

I ran:

ReconstructMesh -i scene.mvs -o sparse_mesh.mvs

and I got this error.

.......
14:27:23 [App     ] Image loaded 147: DJI_0275.JPG
14:27:23 [App     ] Image loaded 148: DJI_0276.JPG
14:27:23 [App     ] Image loaded 149: DJI_0277.JPG
14:27:23 [App     ] Image loaded 150: DJI_0278.JPG
14:27:23 [App     ] Image loaded 151: DJI_0279.JPG
14:27:23 [App     ] Image loaded 152: DJI_0280.JPG
14:27:23 [App     ] Image loaded 153: DJI_0281.JPG
14:27:23 [App     ] Image loaded 154: DJI_0282.JPG
14:27:23 [App     ] Image loaded 155: DJI_0283.JPG
14:27:23 [App     ] Image loaded 156: DJI_0284.JPG
14:27:23 [App     ] Image loaded 157: DJI_0285.JPG
14:27:23 [App     ] Image loaded 158: DJI_0286.JPG
14:27:23 [App     ] Image loaded 159: DJI_0287.JPG
14:27:23 [App     ] Image loaded 160: DJI_0288.JPG
14:27:23 [App     ] Image loaded 161: DJI_0289.JPG
14:27:23 [App     ] Image loaded 162: DJI_0290.JPG
14:27:23 [App     ] Scene loaded from interface format (1s242ms):
    163 images (163 calibrated) with a total of 3103.05 MPixels (19.04 MPixels/image)
    292908 points, 0 vertices, 0 faces
[New Thread 0x7fffdd48f700 (LWP 9880)]
[New Thread 0x7fffdc18e700 (LWP 9881)]
[New Thread 0x7fffdb98d700 (LWP 9882)]
[New Thread 0x7fffdb18c700 (LWP 9883)]
[New Thread 0x7fffda98b700 (LWP 9884)]
[New Thread 0x7fffda18a700 (LWP 9885)]
[New Thread 0x7fffd9989700 (LWP 9886)]
[New Thread 0x7fffd9188700 (LWP 9887)]
[New Thread 0x7fffd8987700 (LWP 9888)]
[New Thread 0x7fffd8186700 (LWP 9889)]
[New Thread 0x7fffd7985700 (LWP 9890)]
[New Thread 0x7fffd7184700 (LWP 9891)]
[New Thread 0x7fffd6983700 (LWP 9892)]
[New Thread 0x7fffd6182700 (LWP 9893)]
[New Thread 0x7fffd5981700 (LWP 9894)]
[New Thread 0x7fffd5180700 (LWP 9895)]
[New Thread 0x7fffd497f700 (LWP 9896)]
[New Thread 0x7fffd417e700 (LWP 9897)]
[New Thread 0x7fffd397d700 (LWP 9898)]
14:27:23 [App     ] Reference image  43 sees 12 views:  42(76pts,1.16scl)  41(39pts,1.25scl)  44(56pts,1.01scl)  40(14pts,1.30scl)  39(14pts,1.36scl)  38(6pts,1.42scl)  37(5pts,1.51scl)  36(2pts,1.25scl)  35(1pts,1.50scl)  71(1pts,1.40scl)  34(1pts,1.76scl)  32(1pts,1.81scl) (132 shared points)
14:27:23 [App     ] Reference image   0 sees 29 views:   2(1660pts,0.91scl)   3(1178pts,0.88scl)   4(951pts,0.87scl)   5(669pts,0.86scl)   6(514pts,0.84scl)   1(1864pts,0.98scl)   7(262pts,0.82scl)   9(128pts,0.76scl)  10(88pts,0.79scl)   8(77pts,0.84scl) 
..............
..............
..............
64(1pts,0.39scl) 109(2pts,0.40scl)   8(1pts,0.65scl)  96(1pts,0.54scl) 111(1pts,0.51scl)  82(1pts,0.49scl)  97(1pts,0.49scl) 110(1pts,0.46scl)  81(1pts,0.45scl)  80(1pts,0.41scl)  72(3pts,0.24scl)  39(1pts,0.91scl) (2702 shared points)

Thread 16 "ReconstructMesh" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd6182700 (LWP 9893)]
0x00007ffff4b57cc0 in _IO_vfprintf_internal (s=s@entry=0x7fffd6180c70, format=<optimized out>,
    format@entry=0xb058a8 "Reference image %3u sees %u views:%s (%u shared points)",
    ap=ap@entry=0x7fffd6180df0) at vfprintf.c:1632
1632    vfprintf.c: No such file or directory.

I built it with:

cmake -DCMAKE_BUILD_TYPE=Debug -DOpenMVS_USE_CUDA=OFF -DOpenMVS_USE_EXIV2=ON -DINSTALL_BIN_DIR=bin -DENABLE_AVX=ON -DENABLE_AVX2=ON -DOpenMVS_USE_BREAKPAD=OFF -DEIGEN_ROOT='../eigen/eigen-eigen-b9cd8366d4e8/' -DVCG_DIR='../vcglib' . ../openMVS/

OS: Ubuntu 16.04 LTS

mrbemani commented 7 years ago

oh, here is the backtrace from gdb:

(gdb) backtrace
#0  0x00007ffff4d79cc0 in _IO_vfprintf_internal (s=s@entry=0x7fffffffd130, format=<optimized out>,
    format@entry=0xb04da8 "Reference image %3u sees %u views:%s (%u shared points)",
    ap=ap@entry=0x7fffffffd2b0) at vfprintf.c:1632
#1  0x00007ffff4da1a49 in _IO_vsnprintf (
    string=0x7fffffffd220 "Reference image 1842106639 sees 3758096384 views:",
    maxlen=<optimized out>,
    format=0xb04da8 "Reference image %3u sees %u views:%s (%u shared points)", args=0x7fffffffd2b0)
    at vsnprintf.c:114
#2  0x0000000000adbd42 in _vscprintf (
    format=0xb04da8 "Reference image %3u sees %u views:%s (%u shared points)", pargs=0x7fffffffdcd0)
    at /home/shiqi/cv/openMVS/libs/Common/Types.cpp:24
#3  0x00000000008d988d in SEACAVE::String::FormatStringSafe (
    szFormat=0xb04da8 "Reference image %3u sees %u views:%s (%u shared points)", args=0x7fffffffdcd0)
    at /home/shiqi/cv/openMVS/apps/ReconstructMesh/../../libs/MVS/../Common/Strings.h:83
#4  0x0000000000ad80d9 in SEACAVE::Log::_Record (
    this=0xe1da40 <SEACAVE::Log::GetInstance()::instance>, lt=4294967295,
    szFormat=0xb04da8 "Reference image %3u sees %u views:%s (%u shared points)", args=0x7fffffffdcd0)
    at /home/shiqi/cv/openMVS/libs/Common/Log.cpp:154
#5  0x0000000000ad7e66 in SEACAVE::Log::Write (this=0xe1da40 <SEACAVE::Log::GetInstance()::instance>,
    szFormat=0xb04da8 "Reference image %3u sees %u views:%s (%u shared points)")
---Type <return> to continue, or q <return> to quit---
    at /home/shiqi/cv/openMVS/libs/Common/Log.cpp:88
#6  0x0000000000a114a0 in MVS::Scene::SelectNeighborViews (this=0x7fffffffe3f0, ID=111, points=...,
    nMinViews=3, nMinPointViews=2, fOptimAngle=0.209439516)
    at /home/shiqi/cv/openMVS/libs/MVS/Scene.cpp:480
#7  0x00000000008dd2e3 in main (argc=5, argv=0x7fffffffe6a8)
    at /home/shiqi/cv/openMVS/apps/ReconstructMesh/ReconstructMesh.cpp:265
(gdb)
mrbemani commented 7 years ago

I tried to use "-v 0", then I got this error:


15:42:12 [App     ] Build date: Mar 14 2017, 15:22:11
15:42:12 [App     ] CPU: Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz
15:42:12 [App     ] RAM: 137.72GB Physical Memory 0B Virtual Memory
15:42:12 [App     ] OS: Linux 4.4.0-66-generic (x86_64)
15:42:12 [App     ] SSE & AVX compatible CPU & OS detected
15:42:12 [App     ] Command line: -v 0 -i scene.mvs -o m.mvs
ReconstructMesh: /home/shiqi/cv/openMVS/libs/MVS/SceneReconstruct.cpp:1009: bool MVS::Scene::ReconstructMesh(float, bool, unsigned int, float, float, float, float, float, float, float, float): Assertion `facets.empty() && inter.type == intersection_t::VERTEX && inter.v1 == vi' failed.

Thread 1 "ReconstructMesh" received signal SIGABRT, Aborted.
0x00007ffff4d60428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
54  ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) backtrace
#0  0x00007ffff4d60428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007ffff4d6202a in __GI_abort () at abort.c:89
#2  0x00007ffff4d58bd7 in __assert_fail_base (fmt=<optimized out>,
    assertion=assertion@entry=0xaf5c00 "facets.empty() && inter.type == intersection_t::VERTEX && inter.v1 == vi", file=file@entry=0xaf58e0 "/home/shiqi/cv/openMVS/libs/MVS/SceneReconstruct.cpp",
    line=line@entry=1009,
    function=function@entry=0xaf8680 <MVS::Scene::ReconstructMesh(float, bool, unsigned int, float, float, float, float, float, float, float, float)::__PRETTY_FUNCTION__> "bool MVS::Scene::ReconstructMesh(float, bool, unsigned int, float, float, float, float, float, float, float, float)") at assert.c:92
#3  0x00007ffff4d58c82 in __GI___assert_fail (
    assertion=0xaf5c00 "facets.empty() && inter.type == intersection_t::VERTEX && inter.v1 == vi",
    file=0xaf58e0 "/home/shiqi/cv/openMVS/libs/MVS/SceneReconstruct.cpp", line=1009,
    function=0xaf8680 <MVS::Scene::ReconstructMesh(float, bool, unsigned int, float, float, float, float, float, float, float, float)::__PRETTY_FUNCTION__> "bool MVS::Scene::ReconstructMesh(float, bool, unsigned int, float, float, float, float, float, float, float, float)") at assert.c:101
#4  0x00000000009aeb42 in MVS::Scene::ReconstructMesh (this=0x7fffffffe3e0, distInsert=2,
    bUseFreeSpaceSupport=false, nItersFixNonManifold=4, kSigma=2, kQual=1, kb=4, kf=3,
    kRel=0.100000001, kAbs=1000, kOutl=400, kInf=268435456)
    at /home/shiqi/cv/openMVS/libs/MVS/SceneReconstruct.cpp:1009
#5  0x00000000008dd3ab in main (argc=7, argv=0x7fffffffe698)
---Type <return> to continue, or q <return> to quit---
    at /home/shiqi/cv/openMVS/apps/ReconstructMesh/ReconstructMesh.cpp:276
NH89 commented 7 years ago

I'm encountering a similar segfault with ReconstructMesh when working through the tutorial on https://github.com/cdcseacave/openMVS/wiki/Usage .

I'm running the current master branch of openMVS, with cmake . ../openMVS -DCMAKE_BUILD_TYPE=Debug -DOpenMVS_USE_CUDA=OFF -DVCG_DIR="$main_path/vcglib"

I have Eigen 3.3.3 and CERES 1.13.0 in /usr/local/ , compiled from current Github repositories.

$ gdb ../../../../openMVS_debug_build/bin/ReconstructMesh GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1 ... This GDB was configured as "x86_64-linux-gnu". ... Reading symbols from ../../../../openMVS_debug_build/bin/ReconstructMesh...done. (gdb) run scene_dense.mvs Starting program: /home/nick/Programming/GetTrik/openMVS_openMVG/openMVS_debug_build/bin/ReconstructMesh scene_dense.mvs [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". 16:22:58 [App ] Build date: May 9 2017, 16:06:01 16:22:58 [App ] CPU: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz 16:22:58 [App ] RAM: 15.50GB Physical Memory 15.82GB Virtual Memory 16:22:59 [App ] OS: Linux 4.4.0-77-generic (x86_64) 16:22:59 [App ] SSE & AVX compatible CPU & OS detected 16:22:59 [App ] Command line: scene_dense.mvs [New Thread 0x7fffee8d3700 (LWP 24325)] [New Thread 0x7fffee0d2700 (LWP 24326)] [New Thread 0x7fffed8d1700 (LWP 24327)] [New Thread 0x7fffed0d0700 (LWP 24328)] [New Thread 0x7fffec8cf700 (LWP 24329)] [New Thread 0x7fffe7fff700 (LWP 24330)] [New Thread 0x7fffe77fe700 (LWP 24331)] 16:23:00 [App ] Scene loaded (1s738ms): 11 images (11 calibrated) with a total of 3.95 MPixels (0.36 MPixels/image) 390483 points, 0 vertices, 0 faces [New Thread 0x7fffe6ffd700 (LWP 24332)] [New Thread 0x7fffe67fc700 (LWP 24333)] [New Thread 0x7fffe5ffb700 (LWP 24334)] [New Thread 0x7fffe57fa700 (LWP 24335)] [New Thread 0x7fffe4ff9700 (LWP 24336)] [New Thread 0x7fffdffff700 (LWP 24337)] [New Thread 0x7fffdf7fe700 (LWP 24338)] Points inserted 390483 (100%, 1m16s386ms)

Thread 1 "ReconstructMesh" received signal SIGSEGV, Segmentation fault. 0x000000000091fb83 in _mm_load_pd (P=0xf0e608) at /usr/lib/gcc/x86_64-linux-gnu/5/include/emmintrin.h:119 119 return (__m128d )P; (gdb) ... (gdb) list 114 115 / Load two DPFP values from P. The address must be 16-byte aligned. / 116 extern inline m128d attribute((gnu_inline, always_inline, artificial__)) 117 _mm_load_pd (double const *P) 118 { 119 return (__m128d )P; 120 } 121 122 / Load two DPFP values from P. The address need not be 16-byte aligned. / 123 extern inline m128d attribute((gnu_inline, always_inline, artificial__)) (gdb) ... (gdb) backtrace

0 0x000000000091fb83 in _mm_load_pd (__P=0xf0e608) at /usr/lib/gcc/x86_64-linux-gnu/5/include/emmintrin.h:119

1 Eigen::internal::pload<double __vector(2)>(Eigen::internal::unpacket_traits<double __vector(2)>::type const*) (

from=0xf0e608) at /usr/local/include/eigen3/Eigen/src/Core/arch/SSE/PacketMath.h:307

2 0x000000000097d3ad in Eigen::internal::ploadt<double __vector(2), 16>(Eigen::internal::unpacket_traits<double __vector(2)>::type const*) (from=0xf0e608) at /usr/local/include/eigen3/Eigen/src/Core/GenericPacketMath.h:463

3 Eigen::internal::evaluator<Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 4, 1, 3, 4> > >::packet<16, double __vector(2)>(long, long) const (this=0x7fffffffca10, row=0, col=0)

at /usr/local/include/eigen3/Eigen/src/Core/CoreEvaluators.h:195

4 0x000000000097bfb2 in Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Block<Eigen::Matrix<double, 4, 4, 1, 4, 4>, 3, 4, false> >, Eigen::internal::evaluator<Eigen::Matrix<double, 3, 4, 1, 3, 4> >, Eigen::internal::assign_op<double, double>, 0>::assignPacket<0, 16, double __vector(2)>(long, long) (

this=0x7fffffffca30, row=0, col=0) at /usr/local/include/eigen3/Eigen/src/Core/AssignEvaluator.h:652

5 0x000000000097a331 in Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Block<Eigen::Matrix<double, 4, 4, 1, 4, 4>, 3, 4, false> >, Eigen::internal::evaluator<Eigen::Matrix<double, 3, 4, 1, 3, 4> >, Eigen::internal::assign_op<double, double>, 0>::assignPacketByOuterInner<0, 16, double __vector(2)>(long, long) (

this=0x7fffffffca30, outer=0, inner=0) at /usr/local/include/eigen3/Eigen/src/Core/AssignEvaluator.h:666

6 0x0000000000976ba1 in Eigen::internal::copy_using_evaluator_innervec_CompleteUnrolling<Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Block<Eigen::Matrix<double, 4, 4, 1, 4, 4>, 3, 4, false> >, Eigen::internal::evaluator<Eigen::Matrix<double, 3, 4, 1, 3, 4> >, Eigen::internal::assign_op<double, double>, 0>, 0, 12>::run (kernel=...) at /usr/local/include/eigen3/Eigen/src/Core/AssignEvaluator.h:274

7 0x0000000000971878 in Eigen::internal::dense_assignment_loop<Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Block<Eigen::Matrix<double, 4, 4, 1, 4, 4>, 3, 4, false> >, Eigen::internal::evaluator<Eigen::Matrix<double, 3, 4, 1, 3, 4> >, Eigen::internal::assign_op<double, double>, 0>, 2, 2>::run (kernel=...)

at /usr/local/include/eigen3/Eigen/src/Core/AssignEvaluator.h:468

8 0x000000000096bca0 in Eigen::internal::call_dense_assignment_loop<Eigen::Block<Eigen::Matrix<double, 4, 4, 1, 4, 4>, 3, 4, false>, Eigen::Matrix<double, 3, 4, 1, 3, 4>, Eigen::internal::assign_op<double, double> > (dst=..., src=...,

func=...) at /usr/local/include/eigen3/Eigen/src/Core/AssignEvaluator.h:741

9 0x0000000000967d8a in Eigen::internal::Assignment<Eigen::Block<Eigen::Matrix<double, 4, 4, 1, 4, 4>, 3, 4, false>, Eigen::Matrix<double, 3, 4, 1, 3, 4>, Eigen::internal::assign_op<double, double>, Eigen::internal::Dense2Dense, void>::run (dst=..., src=..., func=...) at /usr/local/include/eigen3/Eigen/src/Core/AssignEvaluator.h:879

10 0x0000000000960779 in Eigen::internal::call_assignment_no_alias<Eigen::Block<Eigen::Matrix<double, 4, 4, 1, 4, 4>, 3, 4, false>, Eigen::Matrix<double, 3, 4, 1, 3, 4>, Eigen::internal::assign_op<double, double> > (dst=..., src=...,

func=...) at /usr/local/include/eigen3/Eigen/src/Core/AssignEvaluator.h:836

11 0x0000000000959996 in Eigen::internal::call_assignment<Eigen::Block<Eigen::Matrix<double, 4, 4, 1, 4, 4>, 3, 4, false>, Eigen::Matrix<double, 3, 4, 1, 3, 4>, Eigen::internal::assign_op<double, double> >(Eigen::Block<Eigen::Matrix<double, 4, 4, 1, 4, 4>, 3, 4, false>&, Eigen::Matrix<double, 3, 4, 1, 3, 4> const&, Eigen::internal::assign_op<double, double> const&, Eigen::internal::enable_if<!Eigen::internal::evaluator_assume_aliasing<Eigen::Matrix<double, 3, 4, 1, 3, 4>, Eigen::internal::evaluator_traits<Eigen::Matrix<double, 3, 4, 1, 3, 4> >::Shape>::value, void*>::type) (dst=...,

src=..., func=...) at /usr/local/include/eigen3/Eigen/src/Core/AssignEvaluator.h:804

12 0x00000000009534d0 in Eigen::internal::call_assignment<Eigen::Block<Eigen::Matrix<double, 4, 4, 1, 4, 4>, 3, 4, false>, Eigen::Matrix<double, 3, 4, 1, 3, 4> > (dst=..., src=...)

at /usr/local/include/eigen3/Eigen/src/Core/AssignEvaluator.h:782

13 0x0000000000949105 in Eigen::MatrixBase<Eigen::Block<Eigen::Matrix<double, 4, 4, 1, 4, 4>, 3, 4, false> >::operator=<Eigen::Matrix<double, 3, 4, 1, 3, 4> > (this=0x7fffffffcba0, other=...)

at /usr/local/include/eigen3/Eigen/src/Core/Assign.h:66

14 0x0000000000940e18 in SEACAVE::TFrustum<double, 4>::Set (this=0x7fffffffce30, m=..., w=2832, h=2832, n=0, f=1)

at /home/nick/Programming/GetTrik/openMVS_openMVG/openMVS/libs/MVS/../Common/Plane.inl:393

15 0x00000000009364b8 in SEACAVE::TFrustum<double, 4>::TFrustum (this=0x7fffffffce30, m=..., w=2832, h=2832, n=0,

f=1) at /home/nick/Programming/GetTrik/openMVS_openMVG/openMVS/libs/MVS/../Common/Plane.inl:277

16 0x000000000092d822 in DELAUNAY::fetchCellFacets<1> (Tr=...,

hullFacets=std::vector of length 160, capacity 256 = {...}, cell=..., imageData=..., 
facets=std::vector of length 0, capacity 0)
at /home/nick/Programming/GetTrik/openMVS_openMVG/openMVS/libs/MVS/SceneReconstruct.cpp:402

17 0x00000000009278f6 in MVS::Scene::ReconstructMesh (this=0x7fffffffd950, distInsert=2, bUseFreeSpaceSupport=false,

nItersFixNonManifold=4, kSigma=2, kQual=1, kb=4, kf=3, kRel=0.100000001, kAbs=1000, kOutl=400, kInf=268435456)
at /home/nick/Programming/GetTrik/openMVS_openMVG/openMVS/libs/MVS/SceneReconstruct.cpp:880

18 0x000000000090d03a in main (argc=2, argv=0x7fffffffdc08)

at /home/nick/Programming/GetTrik/openMVS_openMVG/openMVS/apps/ReconstructMesh/ReconstructMesh.cpp:276

(gdb) ....

Details of my build - cmake's output:

cmake_terminal_output.txt

cdcseacave commented 7 years ago

somebody solved this by using Eigen 3.2

NH89 commented 7 years ago

Thanks. For others to find that, it would be https://github.com/cdcseacave/openMVS/issues/211 This implies download and build Eigen3.2, then rebuild Ceres with Eigen3.2, then build openMVS with the newly build Eigen3.2 and Ceres. (Make sure you point Cmake to the correct versions.)

NH89 commented 7 years ago

This led to SIGABRT after Delaunay tetrahedralization completed. This is similar to #180, but I am using the patch that fixed #180 .

Which is averted by using ' -d 8 scene_dense.mvs' to reduce density & RAM required.

The next problem encountered is:

21:22:22 [App ] Cleaned mesh: 59707 vertices, 119350 faces (1s157ms) OpenCV Error: Assertion failed (channels() == CV_MAT_CN(dtype)) in copyTo, file /tmp/binarydeb/ros-kinetic-opencv3-3.2.0/modules/core/src/copy.cpp, line 259 terminate called after throwing an instance of 'cv::Exception' what(): /tmp/binarydeb/ros-kinetic-opencv3-3.2.0/modules/core/src/copy.cpp:259: error: (-215) channels() == CV_MAT_CN(dtype) in function copyTo

Thread 1 "ReconstructMesh" received signal SIGABRT, Aborted. 0x00007ffff2a53428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54 54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb)

Which looks to be related to OpenCV-3.3 & ROS-Kinetic. Given the openMVS depends on libopencv-dev, this probably means OpenCV-2.4.x . Setting OPENCV_DIR to /usr/local/share/OpenCV ensures that it finds OpenCV-2.4.x installed by libopencv-dev,

The next hurdle is:

21:52:08 [App ] Removed 0 degenerate vertices 21:52:08 [App ] Removed 0 unreferenced vertices 21:52:08 [App ] Removed 0 duplicate vertices 21:52:09 [App ] Split 0 non-manifold vertices 21:52:09 [App ] Cleaned mesh: 59707 vertices, 119350 faces (1s253ms) 21:52:09 [App ] Scene saved (343ms): 11 images (11 calibrated) 0 points, 59707 vertices, 119350 faces 21:52:10 [App ] Mesh saved: 59707 vertices, 119350 faces (121ms)

Thread 1 "ReconstructMesh" received signal SIGSEGV, Segmentation fault. strlen () at ../sysdeps/x86_64/strlen.S:106 106 ../sysdeps/x86_64/strlen.S: No such file or directory. (gdb) backtrace ... #0 strlen () at ../sysdeps/x86_64/strlen.S:106 #1 0x00007ffff0e53980 in printf_positional (s=s@entry=0x7fffffffc840, format=format@entry=0xafc8a0 <MVS::Scene::ExportCamerasMLP(SEACAVE::String const&, SEACAVE::String const&) const::mlp_raster> " <MLRaster label=\"%s\">\n <VCGCamera TranslationVector=\"%0.6g %0.6g %0.6g 1\" LensDistortion=\"%0.6g %0.6g\" ViewportPx=\"%u %u\" PixelSizeMm=\"1 %0.4f\" FocalMm=\"%0.4f\" CenterPx=\"%0.4f %0.4f\" RotationMatri"..., readonly_format=readonly_format@entry=0, ap=ap@entry=0x7fffffffc9d8, ap_savep=ap_savep@entry=0x7fffffffc3d8, done=377, nspecs_done=21, lead_str_end=0xafc8b3 <MVS::Scene::ExportCamerasMLP(SEACAVE::String const&, SEACAVE::String const&) const::mlp_raster+19> "%s\">\n <VCGCamera TranslationVector=\"%0.6g %0.6g %0.6g 1\" LensDistortion=\"%0.6g %0.6g\" ViewportPx=\"%u %u\" PixelSizeMm=\"1 %0.4f\" FocalMm=\"%0.4f\" CenterPx=\"%0.4f %0.4f\" RotationMatrix=\"%0.6g %0.6g %0.6"..., work_buffer=0x7fffffffc410 "@\243\221\362\377\177", save_errno=0, grouping=0x0, thousands_sep=0x7ffff0f92f45 "") at vfprintf.c:2023 #2 0x00007ffff0e544a6 in _IO_vfprintf_internal (s=s@entry=0x7fffffffc840, format=<optimised out>, format@entry=0xafc8a0 <MVS::Scene::ExportCamerasMLP(SEACAVE::String const&, SEACAVE::String const&) const::mlp_raster> " <MLRaster label=\"%s\">\n <VCGCamera TranslationVector=\"%0.6g %0.6g %0.6g 1\" LensDistortion=\"%0.6g %0.6g\" ViewportPx=\"%u %u\" PixelSizeMm=\"1 %0.4f\" FocalMm=\"%0.4f\" CenterPx=\"%0.4f %0.4f\" RotationMatri"..., ap=ap@entry=0x7fffffffc9d8) at vfprintf.c:1677

#3 0x00007ffff0e7da49 in _IO_vsnprintf ( string=0x7fffffffc9f0 " <MLRaster label=\"100_7100\">\n <VCGCamera TranslationVector=\"-0.00290509 -0.00791689 -0.0295064 1\" LensDistortion=\"1 2987.29\" ViewportPx=\"0 0\" PixelSizeMm=\"1 1476.6612\" FocalMm=\"1114.7460\" CenterPx="..., maxlen=<optimised out>, format=0xafc8a0 <MVS::Scene::ExportCamerasMLP(SEACAVE::String const&, SEACAVE::String const&) const::mlp_raster> " <MLRaster label=\"%s\">\n <VCGCamera TranslationVector=\"%0.6g %0.6g %0.6g 1\" LensDistortion=\"%0.6g %0.6g\" ViewportPx=\"%u %u\" PixelSizeMm=\"1 %0.4f\" FocalMm=\"%0.4f\" CenterPx=\"%0.4f %0.4f\" RotationMatri"..., args=0x7fffffffc9d8) at vsnprintf.c:114

#4 0x000000000095058a in SEACAVE::OutputStream::print (this=0x7fffffffd3d8, szFormat=0xafc8a0 <MVS::Scene::ExportCamerasMLP(SEACAVE::String const&, SEACAVE::String const&) const::mlp_raster> " <MLRaster label=\"%s\">\n <VCGCamera TranslationVector=\"%0.6g %0.6g %0.6g 1\" LensDistortion=\"%0.6g %0.6g\" ViewportPx=\"%u %u\" PixelSizeMm=\"1 %0.4f\" FocalMm=\"%0.4f\" CenterPx=\"%0.4f %0.4f\" RotationMatri"...) at /home/nick/Programming/GetTrik/openMVS_openMVG/openMVS/libs/MVS/../Common/Streams.h:69

#5 0x0000000000956865 in MVS::Scene::ExportCamerasMLP (this=0x7fffffffd930, fileName=..., fileNameScene=...) at /home/nick/Programming/GetTrik/openMVS_openMVG/openMVS/libs/MVS/Scene.cpp:586 #6 0x00000000008dfb57 in main (argc=4, argv=0x7fffffffdbe8) at /home/nick/Programming/GetTrik/openMVS_openMVG/openMVS/apps/ReconstructMesh/ReconstructMesh.cpp:301 (gdb) This is SEACAVE::OutputStream::print(...) called by the last line of MVS::Scene::ExportCamerasMLP(...) where it is writing the data to file.

cdcseacave commented 7 years ago

it is an assert that you can ignore, please compile in Release or RelWithDebugInfo

NH89 commented 7 years ago

Thanks. With -DCMAKE_BUILD_TYPE=RelWithDebugInfo it still crashed at the same point with or without gdb, but with -DCMAKE_BUILD_TYPE=Release it ran to completion (and much faster).