This blog is only used for recording.
(Source code from:pl-slam)
1.
Error:
(gdb) n
[Thread 0x7fffb0856700 (LWP 11572) exited]
[New Thread 0x7fffb0856700 (LWP 11756)]
[New Thread 0x7fffa0a4c700 (LWP 11757)]
[Thread 0x7fffa0a4c700 (LWP 11757) exited]
[Thread 0x7fffb0856700 (LWP 11756) exited]
Thread 19 "plslam_dataset" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff9affd700 (LWP 11586)]
Eigen::internal::generic_dense_assignment_kernel >, Eigen::internal::evaluator >, Eigen::internal::assign_op, 0>::assignPacket<32, 32, double __vector(4)>(long, long) (this=,
this=, col=, row=)
at /usr/local/include/eigen3/Eigen/src/Core/AssignEvaluator.h:652
652 m_functor.template assignPacket(&m_dst.coeffRef(row,col), m_src.template packet(row,col));
Stopped at:
if( StVO->needNewKF() )
{
cout << "#KeyFrame: " << map->max_kf_idx + 1;
cout << endl << "#Points: " << map->map_points.size();
cout << endl << "#Segments: " << map->map_lines.size();
cout << endl << endl;
// grab StF and update KF in StVO (the StVO thread can continue after this point)
PLSLAM::KeyFrame* curr_kf = new PLSLAM::KeyFrame( StVO->curr_frame );
// update KF in StVO
StVO->currFrameIsKF();
map->addKeyFrame( curr_kf );
// update scene
scene.setImage(StVO->curr_frame->plotStereoFrame());
scene.updateSceneSafe( map );
}
and the backtrace:
(gdb) bt
#0 Eigen::Matrix::Matrix(Eigen::Matrix&&) (other=, this=)
at /usr/local/include/eigen3/Eigen/src/Core/Matrix.h:278
#1 std::_Construct, Eigen::Matrix >(Eigen::Matrix*, Eigen::Matrix&&) (__p=)
at /usr/include/c++/7/bits/stl_construct.h:75
#2 std::__uninitialized_copy::__uninit_copy*>, Eigen::Matrix*> (
__result=, __last=..., __first=...)
at /usr/include/c++/7/bits/stl_uninitialized.h:83
#3 std::uninitialized_copy*>, Eigen::Matrix*> (__result=,
__last=..., __first=...) at /usr/include/c++/7/bits/stl_uninitialized.h:134
#4 std::__uninitialized_copy_a*>, Eigen::Matrix*, Eigen::Matrix > (__result=, __last=..., __first=...)
at /usr/include/c++/7/bits/stl_uninitialized.h:289
#5 std::__uninitialized_move_if_noexcept_a*, Eigen::Matrix*, std::allocator > > (__alloc=..., __result=,
__last=0x7fff8c007af0, __first=0x7fff8c007ad0)
at /usr/include/c++/7/bits/stl_uninitialized.h:312
---Type to continue, or q to quit---r
#6 std::vector, std::allocator > >::_M_realloc_insert const&> (this=this@entry=0x7fff8c10ce08, __position={
>> = {
>> = {
>> = {
, 3>> = {
, 1>> = {
, 0>> = {
>> = {}, }, }, }, }, },
members of Eigen::PlainObjectBase >:
m_storage = {
m_data = {
array = {2.3715151000379834e-322,
1.6057133489840513e-321,
6.9532596549232556e-310,
6.9532596549232556e-310}
}
}
}, }, __args#0=...) at /usr/include/c++/7/bits/vector.tcc:424
---Type to continue, or q to quit---r
#7 0x00007ffff7b97817 in std::vector, std::allocator > >::push_back (__x=...,
this=) at /usr/include/c++/7/bits/stl_vector.h:948
#8 PLSLAM::MapLine::addMapLineObservation (this=this@entry=0x7fff8c10cd20,
desc_=..., kf_obs_=, kf_obs_@entry=1, obs_=..., dir_=...,
pts_=..., sigma2_=, sigma2_@entry=1)
at /home/litw/litw/prjs/pl-slam-master/src/mapFeatures.cpp:116
#9 0x00007ffff7b3d662 in PLSLAM::MapHandler::matchKF2KFLines (
this=this@entry=0x67c660, prev_kf=, curr_kf=)
at /home/litw/litw/prjs/pl-slam-master/src/mapHandler.cpp:464
#10 0x00007ffff7b4fe6c in PLSLAM::MapHandler::lookForCommonMatches (
this=this@entry=0x67c660, kf0=0x1196dea0, kf1=@0x67c828: 0x6cab00)
at /home/litw/litw/prjs/pl-slam-master/src/mapHandler.cpp:760
#11 0x00007ffff7b50a20 in PLSLAM::MapHandler::localMappingThread (
this=0x67c660)
at /home/litw/litw/prjs/pl-slam-master/src/mapHandler.cpp:1100
#12 0x00007ffff601756f in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#13 0x00007ffff65b86ba in start_thread (arg=0x7fffb1f1a700)
at pthread_create.c:333
#14 0x00007ffff5a7f41d in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
In the /home/litw/litw/prjs/pl-slam-master/src/mapFeatures.cpp:116
void MapLine::addMapLineObservation(Mat desc_, int kf_obs_, Vector3d obs_, Vector3d dir_, Vector4d pts_, double sigma2_)
{
desc_list.push_back( desc_ );
obs_list.push_back( obs_ );
kf_obs_list.push_back( kf_obs_ );
dir_list.push_back( dir_ );
pts_list.push_back(pts_);
sigma_list.push_back(sigma2_);
updateAverageDescDir();
}
Reason:
nullpointer or uninitialized pointer
(see https://stackoverflow.com/questions/23108126/program-received-signal-sigsegv-segmentation-fault-in-when-debuggin)
Solution:
Update on 2018.5.13:
Still no result. Opened a issue on Github (hope it helps).