UZ-SLAMLab / DefSLAM

DefSLAM: Tracking and Mapping of Deforming Scenes from Monocular Sequences. J.Lamarca, S. Parashar, A. Bartoli & J.M.M. Montiel
https://arxiv.org/abs/1908.08918
GNU General Public License v3.0
104 stars 33 forks source link

Another segmentation fault in mapping thread #5

Closed ccrystal2018 closed 3 years ago

ccrystal2018 commented 3 years ago

Hello, Thanks for providing the source code of DefSLAM library! I am a freshman at the SLAM and I'm getting a segmentation fault while running the DefSLAM executable. I don't know how to solve this problem, so I come here for help.

As described in #2, the sequence runs for several frames and then crashes due to the segmentation fault. The error also occurs at NormalEstimator::ObtainK1K2(), but I get another I got another error message. I try to find the location of the error, specifically at line 153 at NormalEstimator.cc (Solve (options, &problem, &summary)).

I compiled the DefSLAM library on Ubuntu 16.04. I refer to #2 to list the following information. If you need anything else, please let me know.

Here is the gdb output: Thread 14 "DefSLAM" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7f0d27a19700 (LWP 4340)] 0x00007f0d82333af0 in void Eigen::internal::call_assignment_no_alias<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op, Eigen::Matrix<double, -1, -1, 0, -1, -1> >, Eigen::internal::assign_op >(Eigen::Matrix<double, -1, -1, 0, -1, -1>&, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op, Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::internal::assign_op const&) () from /home/crystal/compareWorkbench/DefSLAM-master/lib/libDeformableSLAM.so

All information in gdb is here: GNU gdb (GDB; JetBrains IDE bundle; build 128) 8.3 Copyright (C) 2019 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.

For help, type "help". Type "apropos word" to search for commands related to "word". [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7f0d53ea3700 (LWP 4320)] [New Thread 0x7f0d536a2700 (LWP 4321)] [New Thread 0x7f0d4eea1700 (LWP 4322)] [New Thread 0x7f0d4c6a0700 (LWP 4323)] [New Thread 0x7f0d4be9f700 (LWP 4324)] [New Thread 0x7f0d4769e700 (LWP 4325)] [New Thread 0x7f0d44e9d700 (LWP 4326)] [New Thread 0x7f0d4269c700 (LWP 4327)] [New Thread 0x7f0d3fe9b700 (LWP 4328)] [New Thread 0x7f0d3d69a700 (LWP 4329)] [New Thread 0x7f0d3ce99700 (LWP 4330)] [New Thread 0x7f0d38698700 (LWP 4331)] [New Thread 0x7f0d27a19700 (LWP 4340)] [New Thread 0x7f0d27218700 (LWP 4341)] [New Thread 0x7f0d24b37700 (LWP 4342)] [New Thread 0x7f0d17fff700 (LWP 4343)] [New Thread 0x7f0d177fe700 (LWP 4344)] [New Thread 0x7f0d16ffd700 (LWP 4345)] [New Thread 0x7f0d167fc700 (LWP 4346)] [New Thread 0x7f0d15ffb700 (LWP 4347)] [New Thread 0x7f0d157fa700 (LWP 4348)] [New Thread 0x7f0d14ff9700 (LWP 4349)] [New Thread 0x7f0cf7fff700 (LWP 4350)] [New Thread 0x7f0cf77fe700 (LWP 4351)] [New Thread 0x7f0cf6ffd700 (LWP 4352)] [New Thread 0x7f0cf67fc700 (LWP 4353)] [New Thread 0x7f0cf5ffb700 (LWP 4354)] [New Thread 0x7f0cf57fa700 (LWP 4355)] [New Thread 0x7f0cf4ff9700 (LWP 4356)] [New Thread 0x7f0ce7fff700 (LWP 4357)] [New Thread 0x7f0ce77fe700 (LWP 4358)] [New Thread 0x7f0ce6ffd700 (LWP 4359)] [New Thread 0x7f0ce67fc700 (LWP 4360)] [New Thread 0x7f0ce5ffb700 (LWP 4361)] [New Thread 0x7f0ce57fa700 (LWP 4362)] [New Thread 0x7f0ce4ff9700 (LWP 4363)] [New Thread 0x7f0cdffff700 (LWP 4364)] [New Thread 0x7f0cdf7fe700 (LWP 4365)] [New Thread 0x7f0cddf7a700 (LWP 4367)] [New Thread 0x7f0cdd779700 (LWP 4368)] [New Thread 0x7f0cdcf78700 (LWP 4369)] [New Thread 0x7f0ccf5ff700 (LWP 4370)] [Thread 0x7f0ccf5ff700 (LWP 4370) exited] [New Thread 0x7f0ccf5ff700 (LWP 4371)] [New Thread 0x7f0ccedfe700 (LWP 4372)] [Thread 0x7f0ccedfe700 (LWP 4372) exited] [New Thread 0x7f0ccedfe700 (LWP 4373)] [Thread 0x7f0ccedfe700 (LWP 4373) exited] [New Thread 0x7f0cce5fd700 (LWP 4374)] [Thread 0x7f0cce5fd700 (LWP 4374) exited] [New Thread 0x7f0ccedfe700 (LWP 4375)] [Thread 0x7f0ccedfe700 (LWP 4375) exited] [New Thread 0x7f0cce5fd700 (LWP 4376)] [Thread 0x7f0cce5fd700 (LWP 4376) exited] [New Thread 0x7f0ccedfe700 (LWP 4377)] [Thread 0x7f0ccedfe700 (LWP 4377) exited] [New Thread 0x7f0ccedfe700 (LWP 4378)] [New Thread 0x7f0cce5fd700 (LWP 4379)] [Thread 0x7f0cce5fd700 (LWP 4379) exited] [Thread 0x7f0ccedfe700 (LWP 4378) exited] [New Thread 0x7f0cce5fd700 (LWP 4380)] [New Thread 0x7f0ccedfe700 (LWP 4381)] [Thread 0x7f0cce5fd700 (LWP 4380) exited] [Thread 0x7f0ccedfe700 (LWP 4381) exited] [New Thread 0x7f0ccedfe700 (LWP 4382)] [Thread 0x7f0ccedfe700 (LWP 4382) exited] [New Thread 0x7f0ccedfe700 (LWP 4383)] [Thread 0x7f0ccedfe700 (LWP 4383) exited] [New Thread 0x7f0cce5fd700 (LWP 4384)] [Thread 0x7f0cce5fd700 (LWP 4384) exited] [New Thread 0x7f0ccedfe700 (LWP 4385)] [Thread 0x7f0ccedfe700 (LWP 4385) exited] [New Thread 0x7f0cce5fd700 (LWP 4386)] [Thread 0x7f0cce5fd700 (LWP 4386) exited] [New Thread 0x7f0ccedfe700 (LWP 4387)] [Thread 0x7f0ccedfe700 (LWP 4387) exited] [New Thread 0x7f0ccedfe700 (LWP 4388)] [Thread 0x7f0ccedfe700 (LWP 4388) exited] [New Thread 0x7f0ccedfe700 (LWP 4389)] [Thread 0x7f0ccedfe700 (LWP 4389) exited] [New Thread 0x7f0cce5fd700 (LWP 4390)] [Thread 0x7f0cce5fd700 (LWP 4390) exited] [New Thread 0x7f0ccedfe700 (LWP 4391)] [Thread 0x7f0ccedfe700 (LWP 4391) exited] [New Thread 0x7f0cce5fd700 (LWP 4392)] [Thread 0x7f0cce5fd700 (LWP 4392) exited] [New Thread 0x7f0ccedfe700 (LWP 4393)] [Thread 0x7f0ccedfe700 (LWP 4393) exited] [New Thread 0x7f0ccedfe700 (LWP 4394)] [Thread 0x7f0ccedfe700 (LWP 4394) exited] [New Thread 0x7f0ccedfe700 (LWP 4395)] [Thread 0x7f0ccedfe700 (LWP 4395) exited] [New Thread 0x7f0cce5fd700 (LWP 4396)] [Thread 0x7f0cce5fd700 (LWP 4396) exited] [New Thread 0x7f0ccedfe700 (LWP 4397)] [Thread 0x7f0ccedfe700 (LWP 4397) exited] [New Thread 0x7f0cce5fd700 (LWP 4398)] [Thread 0x7f0cce5fd700 (LWP 4398) exited] [New Thread 0x7f0ccedfe700 (LWP 4399)] [Thread 0x7f0ccedfe700 (LWP 4399) exited]

Thread 14 "DefSLAM" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7f0d27a19700 (LWP 4340)] 0x00007f0d82333af0 in void Eigen::internal::call_assignment_no_alias<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op, Eigen::Matrix<double, -1, -1, 0, -1, -1> >, Eigen::internal::assign_op >(Eigen::Matrix<double, -1, -1, 0, -1, -1>&, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op, Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::internal::assign_op const&) () from /home/crystal/compareWorkbench/DefSLAM-master/lib/libDeformableSLAM.so

Here is the debugger output: Screenshot from 2021-06-07 21-10-57

Here is the console output: /home/crystal/compareWorkbench/DefSLAM-master/Apps/DefSLAM /home/crystal/compareWorkbench/DefSLAM-master/Vocabulary/ORBvoc.txt /home/crystal/Dataset/sequence_heart/hamlyn.yaml /home/crystal/Dataset/f5phantom/f5_dynamic_deint_L.avi 4

DefSLAM 2019-2020 José Lamarca, University of Zaragoza. This program comes with ABSOLUTELY NO WARRANTY; This is free software, and you are welcome to redistribute it

Input sensor was set to: Loading ORB Vocabulary. This could take a while... Vocabulary loaded!

Camera Parameters:

ORB Extractor Parameters:

Defomation tracking Parameters:

Thanks and look forward to your response.

JoseLamarca commented 3 years ago

Hi! Have you tried to pull the last version of the code? I had a similar error that was related to the Ceres library, I had changed the Eigen library and not reinstalling Ceres. You can take a look if it is that. I am not completely sure.

Best,

ccrystal2018 commented 3 years ago

Hi, Jose

Thanks for your quick response!

I try to pull the last version and change several versions of the Eigen library. It seems that the problem is caused by the Eigen library. When I use eigen-3.2.92, #5 appears.I replace the comman “find package(Eigen3 REQUIRED)“ with “include directories("/home/crystal/develop/eigen-3.3.9") “ in CMakeLists.txt to change different versions. Then there is a new error, which is similar to the last one. I also try with Eigen-3.1.0, but it doesn't compile correctly. Could you tell me the version of Eigen you are using?

Thanks for your help.

Here is the information when I use Eigen-3.3.9: Screenshot from 2021-06-08 16-15-20

JoseLamarca commented 3 years ago

My CMake is finding Eigen 3.3.90.

ccrystal2018 commented 3 years ago

Thank you for your help. I have re-installed the environment and downloaded the code. The problem has been solved.