Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SegFault in DBoW2::L1Scoring loading the default vocabulary #62

Open
jlblancoc opened this issue Sep 8, 2015 · 3 comments
Open

SegFault in DBoW2::L1Scoring loading the default vocabulary #62

jlblancoc opened this issue Sep 8, 2015 · 3 comments

Comments

@jlblancoc
Copy link

Hola Raúl!

Just to let you know that, under Ubuntu 14.04 (x64), the default vocabulary (extracted from ORBvoc.txt.tar.gz) seems to make the program crash just at start-up.

gdb says:

Loading ORB Vocabulary. This could take a while.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff54cf910 in DBoW2::L1Scoring::mustNormalize(DBoW2::LNorm&) const () from /home/jlblanco/catkin_ws/src/ORB_SLAM/Thirdparty/DBoW2/lib/libDBoW2.so
(gdb) 

I could try to investigate it, but perhaps you are more familiar with the code and find the problem much faster?

@raulmur
Copy link
Owner

raulmur commented Sep 8, 2015

Hola José Luis,

I have tested ORB-SLAM in Ubuntu 14.04 (x64) and I have never received that error. I have updated the function to load the vocabulary in Thirdparty/DBoW2/DBoW2/TemplatedVocabulary.h, adding some checking before creating the ScoreObject that seems to produce the error. Can you please update your code and run it again?

Thanks!

@DannyTheDog
Copy link

Hi Mr. Blanco-Claraco,

also I have tried to replicate the error but I have not seen it.
Have you used any special flag when compiling DBoW2 ?

@jlblancoc
Copy link
Author

I have gcc 4.8.4, just in case you use another version.

Thanks for the update, but the error is still 100% reproducible every time it is launched.
BT from GDB:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff54cf910 in DBoW2::L1Scoring::mustNormalize(DBoW2::LNorm&) const () from /home/jlblanco/catkin_ws/src/ORB_SLAM/Thirdparty/DBoW2/lib/libDBoW2.so
(gdb) bt
#0  0x00007ffff54cf910 in DBoW2::L1Scoring::mustNormalize(DBoW2::LNorm&) const () from /home/jlblanco/catkin_ws/src/ORB_SLAM/Thirdparty/DBoW2/lib/libDBoW2.so
#1  0x00000000004365c3 in DBoW2::TemplatedVocabulary<cv::Mat, DBoW2::FORB>::createScoringObject() ()
#2  0x0000000000439ed2 in DBoW2::TemplatedVocabulary<cv::Mat, DBoW2::FORB>::loadFromTextFile(std::string const&) ()
#3  0x000000000042d898 in main ()
(gdb) 

Anyway, I can "fix" the crash by adding an arbitrary std::cout trace before the call to createScoringObject() in TemplatedVocabulary.h... if that can be called a "fix" :-(
I tried to run it 10 times and it crashes all the times without the "cout", it passes with it.

For me it is fine to close the issue if nobody else can reproduce it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants