introlab / rtabmap

RTAB-Map library and standalone application
https://introlab.github.io/rtabmap
Other
2.6k stars 761 forks source link

DbViewer: Crash when PyMatcher (SuperGlue) is initializing #1273

Closed matlabbe closed 2 months ago

matlabbe commented 2 months ago

gdb log:

[ INFO] (2024-04-28 17:41:39.842) PyMatcher.cpp:35::PyMatcher() path = /home/mathieu/workspace/SuperGluePretrainedNetwork/rtabmap_superglue.py
[ INFO] (2024-04-28 17:41:39.842) PyMatcher.cpp:36::PyMatcher() model = indoor
--Type <RET> for more, q to quit, c to continue without paging--

Thread 1 "rtabmap-databas" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in  ()
#1  0x00007fffedac84ac in _PyEval_GetFrame (tstate=0x5555555617d0) at ../Python/ceval.c:4778
#2  PyEval_GetBuiltins () at ../Python/ceval.c:4778
#3  0x00007ffff738e3ef in pybind11::detail::get_internals() () at /home/mathieu/workspace/rtabmap/build/bin/librtabmap_core.so.0.21
#4  0x00007ffff738f542 in pybind11::gil_scoped_acquire::gil_scoped_acquire() ()
    at /home/mathieu/workspace/rtabmap/build/bin/librtabmap_core.so.0.21
#5  0x00007ffff7398cb9 in rtabmap::PyMatcher::PyMatcher(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, float, int, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
matlabbe commented 2 months ago

The issue is that the PythonInterface was not initialized (like done automatically when Rtabmap object is created). This should be fixed by https://github.com/introlab/rtabmap/commit/9505a21a7eaa2087c1d143090229436afe61b6bf