-
Notifications
You must be signed in to change notification settings - Fork 87
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
Segmentation fault in the CandidatePoint::observe() #9
Comments
I do not know what could be happening. We have tried DSM in many different computers and it is working fine. Please try to debug it using the single threaded options and write back with further information. |
If I read your Euroc settings.txt right, single threaded is already activated by default? It also seems to occure faster the more mapping threads I use. So something might not be threadsafe? Edit: Here is the gdb backtrace: #0 0x00007ffff76c293e in std::__min_element<__gnu_cxx::__normal_iterator<float*, std::vector<float, std::allocator > >, __gnu_cxx::__ops::_Iter_less_iter>(__gnu_cxx::__normal_iterator<float*, std::vector<float, std::allocator > >, __gnu_cxx::__normal_iterator<float*, std::vector<float, std::allocator > >, __gnu_cxx::__ops::_Iter_less_iter) (__last=non-dereferenceable iterator for std::vector, __first=non-dereferenceable iterator for std::vector, __comp=...) at /usr/include/c++/7/bits/stl_algo.h:5585 Looks like line #335 in observe() causes the trouble. With some print statements I found out that vector "errors" has size() = 0, so it is trying to dereference an empty vector. I traced that back to a epipolar line length of 0. I will try to investigate more when I have time! |
Yes, single thread is activated by default. Please try to use mappingThreads = 1 and see what is going on. Thanks! |
@jzubizarreta: I almost found the problem. Parsing the settings from file does something it should not and sets some of the parameters to 0. Edit: Okay, I found it. Names of the parameters in the Example settings file are not larger/lower case appropriate :) |
The settings parser transforms each line to lower case and removes spaces. In theory, there should not be any problem with that. Tell me if you find any bug please, so I can fix it. Thanks again! |
@jzubizarreta: You are right, I see it now. But there is definitely a problem reading the settings in my case. I will let you know when I found out more! |
@jzubizarreta: Okay I found the problem, though it is really weird. I am German and my "atof" function seems to expect floating point numbers to be separated by comma. I added the following line: But jeah, that might stay one of the mysteries of the C++ language... |
fixes jzubizarreta#9 If not set floating points will not be parsed correctly by atof for e.g. Germans
Hello, I had the same problem, which was solved using @laxnpander setlocale solution. It would be nice to commit it ! Brendan |
Hey hey,
I just tried running your code. Compiling it was working fine, however after trying to execute on Euroc MH1 the following problem arises: The QT window opens, I press start, I see the SLAM running but after a few failed attempts to initialise I guess he finally manages to initialise but then SegFaults.
Thread 28 "EurocExample" received signal SIGSEGV, Segmentation fault.
#0 0x00007ffff76b9e71 in dsm::CandidatePoint::observe(std::shared_ptrdsm::Frame const&) () at /home/alex/Documents/Projects/dsm_slam/dsm/build/lib/libdsm.so
#1 0x00007ffff76f12aa in dsm::FullSystem::PointObserver::operator()() () at /home/alex/Documents/Projects/dsm_slam/dsm/build/lib/libdsm.so
#2 0x00007ffff76ff6bc in dsm::WorkerThreadPool::workerLoop(unsigned long) () at /home/alex/Documents/Projects/dsm_slam/dsm/build/lib/libdsm.so
#3 0x00007ffff234866f in () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007ffff71ad6db in start_thread (arg=0x7fff88ff9700) at pthread_create.c:463
#5 0x00007ffff1da388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
FYI: I am running Ubuntu 18.04.
Best regards,
Alex
The text was updated successfully, but these errors were encountered: