MRPT / mrpt

:zap: The Mobile Robot Programming Toolkit (MRPT)
https://docs.mrpt.org/reference/latest/
BSD 3-Clause "New" or "Revised" License
1.93k stars 630 forks source link

Segmentation fault during the call to get3DSceneAndLock on virtualmachine #1128

Closed nrasulnrasul closed 3 years ago

nrasulnrasul commented 3 years ago

Hi,

I am using CDisplayWindow3D to to plot points, but I get segmentation fault during the call to get3DSceneAndLock,

code


CDisplayWindow3D *grid3D;
grid3D = new CDisplayWindow3D();
grid3D->setWindowTitle("VIsualization");
grid3D->resize(800, 600);
opengl::COpenGLScene::Ptr &ptrScene = grid3D->get3DSceneAndLock();

opengl::CTextPtr rText = opengl::CText::Create();
rText->setName("Label");
rText->setColor(0, 0, 0);
ptrScene->insert(robotText);

log

received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffcffff700 (LWP 19416)]

__GI___pthread_mutex_lock (mutex=0xc8) at ../nptl/pthread_mutex_lock.c:67
67      ../nptl/pthread_mutex_lock.c: No such file or directory.
(gdb) bt
#0  __GI___pthread_mutex_lock (mutex=0xc8) at ../nptl/pthread_mutex_lock.c:67
#1  0x00007ffff7f4b72e in mrpt::gui::CDisplayWindow3D::get3DSceneAndLock() () at /lib/x86_64-linux-gnu/libmrpt-gui.so.2.1
jlblancoc commented 3 years ago

Hi, Can you please post a complete CMakeLists.txt + main.cpp test case showing this error? Attach it as a ZIP, please.