ScaViSLAM icon indicating copy to clipboard operation
ScaViSLAM copied to clipboard

Errors running ScaViSLAM (Kinect and New College Dataset)

Open romulogcerqueira opened this issue 11 years ago • 22 comments

Hi everybody!

I installed ScaViSLAM in my machine, but I have found some errors when I run stereo_slam:

  • Using New College dataset: romulo@cerqueira:~/svslocal/ScaViSLAM/svs_build$ ./stereo_slam ../data/newcollege.cfg Multiprocessors: 2 Filegrabber initializing.... Filegrabber initialized. terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check Aborted
  • Using Kinect: romulo@cerqueira:~/svslocal/ScaViSLAM/svs_build_with_pcl$ ./stereo_slam ../data/rgbd_live.cfg Multiprocessors: 2 terminate called after throwing an instance of 'pcl::IOException' what(): void pcl::OpenNIGrabber::setupDevice(const string&, const pcl::OpenNIGrabber::Mode&, const pcl::OpenNIGrabber::Mode&) in /build/buildd/pcl-1.7-1.7.1/io/src/openni_grabber.cpp @ 342 : No devices connected. Aborted

Somebody could help me?

Thanks!

romulogcerqueira avatar Sep 08 '14 18:09 romulogcerqueira

I met the same problem also run stereo_slam. I'm debugging it all day but find no exact clues. when you use gdb debug, it always failed around code file_grabber_.initialize() (line 86, in Frame_grabber.cpp file), I doubt the code between 60 and 71 has error when handle the vector, but cannot find the true reason . If you find, please tell me. Thanks.

asimay avatar Sep 09 '14 01:09 asimay

I installed the Kinect in my Ubuntu 14.04 64 bits following this instructions: http://a-asvadi.ir/install-kinect-xbox360-ubuntu-12-04/

However, when I run ./stereo_slam ../data/rgbd_live.cfg, Kinect run perfectly, but the tracked points cause the follow errors: ... *** Error in `./stereo_slam': free(): invalid pointer: 0x000000000fc3c398 *** Aborted

Any idea?

Thanks.

romulogcerqueira avatar Sep 09 '14 14:09 romulogcerqueira

I didn't use Kinect, I just used New College dataset while it happened to crash. I think we must figure out why it crash based on Newcollege dataset, then handle the situation based on Kinect is better. Multiprocessors: 2 i see the print info of yours, do you use the CUDA SUPPORT feature? I turned it off, and also occur the same crash like you.

asimay avatar Sep 10 '14 01:09 asimay

Yes, asimay, I enable CUDA SUPPORT. These errors continue.

romulogcerqueira avatar Sep 10 '14 02:09 romulogcerqueira

hi, man, does your computer has individual graph card or integrated graph card? I saw the code should have GPU support in default in readme file.

asimay avatar Sep 12 '14 01:09 asimay

Hi asimay,

I have a Nvidia graph card.

romulogcerqueira avatar Sep 12 '14 02:09 romulogcerqueira

Up!

romulogcerqueira avatar Sep 16 '14 01:09 romulogcerqueira

Did you find the root cause? I plan to write the debug log in every place I doubt the running error. you can try too, let's make it work.

asimay avatar Sep 17 '14 07:09 asimay

The error is caused by addNewKeyframe() function in stereo_frontend.cpp, however I don't get correct it. I sent a email to Hauke, but he doesn't still answer me.

romulogcerqueira avatar Sep 17 '14 11:09 romulogcerqueira

I'm afraid I don't agree with you. I debug one day, and find that root cause before run into stereo_frontend initialize.

/home/leon/project/ScaViSLAM/scavislam/frame_grabber.cpp, Line: 135, Func: processNextFrame Entered ! /home/leon/project/ScaViSLAM/scavislam/frame_grabber.cpp Line: 141 Func:processNextFrame params_.livestream is:0 /home/leon/project/ScaViSLAM/scavislam/frame_grabber.cpp Line: 145 Func:processNextFrame Entered if (!params_.livestream)! /home/leon/project/ScaViSLAM/scavislam/frame_grabber.cpp Line: 149 Func:processNextFrame frame_data.frame_id = 0 /home/leon/project/ScaViSLAM/scavislam/filegrabber.cpp Line: 35 Func:getFrameBundle Entered ! /home/leon/project/ScaViSLAM/scavislam/filegrabber.cpp Line: 36 Func:getFrameBundle bundle_buffer_.size() = 0

at here,
if (bundle_buffer_.size()<1) return false; so in FrameGrabber<Camera>::processNextFrame() func of FrameGrabber<Camera>::initialise(),

while (file_grabber_mon_.getFrameBundle(frame_data.frame_id,&bundle) == false) { } we never get the demo images pic into our program. so that our program run crash because of no image dataset in it.

but I still don't know how to change it.even I comment the regex code as belows, it still cannot get images dataset input. //boost::regex ex(name); //if (boost::regex_match(path_name.begin(),path_name.end(),ex)) //{ file_base_vec_.push_back(path_name.substr(0,path_name.length()-8)); //}

asimay avatar Sep 17 '14 14:09 asimay

Hi romulogcerqueira, tonight, I successfully debug it out, and it works fine. please change your newcollege.cfg file as belows:

framepipe.base_str = .*; cheers!

asimay avatar Sep 18 '14 16:09 asimay

Hi asimay! It works for me, however there is still some crash.

screenshot from 2014-09-18 13 50 16

Then:

romulo@fieb:~/slam-alg/scavislam/ScaViSLAM/svs_build$ ./stereo_slam ../data/newcollege.cfg Multiprocessors: 2 Filegrabber initializing.... Filegrabber initialized. *** Error in `./stereo_slam': free(): invalid pointer: 0x000000000fdbd3ec *** Aborted (core dumped)

Moreover, I still have problems using the Kinect.

Thanks!

romulogcerqueira avatar Sep 18 '14 16:09 romulogcerqueira

*** Error in `./stereo_slam': free(): invalid pointer: 0x000000000fdbd3ec *** there is not enough info about this crash. you mush collect more log about this crash. this only tell us in .O file, free func has error. but I don't know much about it.

about Kinect, I don't have this equipment, I cannot afford it in my country...

asimay avatar Sep 19 '14 01:09 asimay

Hello, romulogcerqueira,

Did you figure out the crash issue you posted on Sep 18 2014 *** Error in `./stereo_slam': free(): invalid pointer: 0x000000000fdbd3ec *** Aborted (core dumped)"

I built ScaViSLAM without GPU, and tested it on new college. But after processing a couple of frames, this error pop out and kills the program.

JzHuai0108 avatar Feb 11 '15 17:02 JzHuai0108

Hi romulogcerqueira, I met the same problem: *** Error in `./stereo_slam': free(): invalid pointer:

Did you have solve this ? Thanks

HChengmeng avatar Mar 16 '15 08:03 HChengmeng

When I used cmake and make to generate stereo_slam executable, this problem persisted. Then I used qt creator to open cmakelists.txt and built the program to generate another debug executable. This stereo_slam executable can be invoked in terminal and run successfully without this problem, i.e., *** Error in `./stereo_slam': free(): invalid pointer:. But if I use qt to build a release executable, the same error occurs. I believe there is something wrong in the release version.

JzHuai0108 avatar Mar 16 '15 16:03 JzHuai0108

make file, -O4 -> delete, or -O2

At 2015-03-16 16:36:33, "HChengmeng" [email protected] wrote:

Hi romulogcerqueira, I met the same problem: *** Error in `./stereo_slam': free(): invalid pointer:

Did you have solve this ? Thanks

¡ª Reply to this email directly or view it on GitHub.

asimay avatar Mar 23 '15 11:03 asimay

I believe you mean deleting or changing -O3 in CMakeFile.txt to -O2. I tried changing it to -O2. It still had such a memory problem. If -O3 is deleted, the release executable works as slow as the debug version.

JzHuai0108 avatar Mar 23 '15 15:03 JzHuai0108

Hi asimay, I am getting the same error *** Error in `./stereo_slam': free(): invalid pointer:

and what do you mean by the solution you suggested: make file, -O4 -> delete, or -O2

Regards, Mohammad Baba

mohammad-Baba avatar Jun 08 '15 22:06 mohammad-Baba

@mohammad-Baba what asimay means is that do NOT optimize the compilation when generate the release binary file, this will make the program slower, however, it seems that the unoptimized program can run safely without memory leak issue.

what @JzHuai0108 suggested is correct, shut down -O3 made the program as slow as the debug version.

@JzHuai0108 have you done changing the frontend?

kanster avatar Aug 13 '16 07:08 kanster

I did change the code a little bit for the frontend a long while ago. But I don't think I fixed the issue. For now, I don't see much benefit fixing that issue.

JzHuai0108 avatar Aug 15 '16 20:08 JzHuai0108

Yes indeed. thank you for your post in previous issues. quite helpful

kanster avatar Aug 15 '16 23:08 kanster