Vrep crashes with seg falut signal 11 when run a C++ plugin
Posted: 06 May 2019, 10:18
Hi,
I am using vrep c++ plugin in robot machine learning stuff and it always crashes randomly after thousands of training episodes. My system is Ubuntu 18.04 and my vrep is latest version.
And I googled a little bit and found a way to write a seg fault handler to trace where the crash happened and here is the output:
The output pointed out that a free() function failed in these two libraries(liblua5.1.so, libv_rep.so) caused this crash. But it didn't tell me if I made something wrong in my own library(libv_repExtTRTT.so)
And to be more specific, I write all my code in C++ and generate this external library running in vrep but I didn't have any lua code in my simulation. Another thing to mention is that I use c++ 11 and all the data structure in my code is from standard library, such as std::vector, std::array or std::unique_ptr, std::shared_ptr etc.
I cannot easily say that this crash is caused by Vrep, because maybe I made some mistakes when I call the API functions. Therefore I would like to ask for some suggestion to debug.
Thank you in advance.
FItz
I am using vrep c++ plugin in robot machine learning stuff and it always crashes randomly after thousands of training episodes. My system is Ubuntu 18.04 and my vrep is latest version.
And I googled a little bit and found a way to write a seg fault handler to trace where the crash happened and here is the output:
Code: Select all
Error: signal 11:
/is/ei/gli/Documents/VREP/libv_repExtTRTT.so(_ZN9Utilities24SegmentationFaultHandlerEi+0x34)[0x7fffcfd82bf3]
/lib/x86_64-linux-gnu/libc.so.6(+0x3ef20)[0x7ffff6ceef20]
liblua5.1.so(+0xda1a)[0x7ffff7ed8a1a]
liblua5.1.so(+0xdaa6)[0x7ffff7ed8aa6]
liblua5.1.so(+0xddd6)[0x7ffff7ed8dd6]
liblua5.1.so(+0xe18f)[0x7ffff7ed918f]
liblua5.1.so(+0xbd77)[0x7ffff7ed6d77]
liblua5.1.so(+0xbdf5)[0x7ffff7ed6df5]
liblua5.1.so(lua_pcall+0x55)[0x7ffff7ed2d35]
libv_rep.so(_ZN16CLuaScriptObject9_luaPCallEPviiiPKc+0xd8)[0x7ffff2d84738]
free(): invalid pointer
libv_rep.so(_ZN16CLuaScriptObject30_runScriptOrCallScriptFunctionEiPK15CInterfaceStackPS0_PNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPbSB_SB_+0x18e)[0x7ffff2d85fee]
libv_rep.so(_ZN16CLuaScriptObject17_runMainScriptNowEiPK15CInterfaceStackPS0_Pb+0x94)[0x7ffff2d86f24]
libv_rep.so(_ZN16CLuaScriptObject14_runMainScriptEiPK15CInterfaceStackPS0_Pb+0x176)[0x7ffff2d876c6]
libv_rep.so(_ZN16CLuaScriptObject13runMainScriptEiPK15CInterfaceStackPS0_Pb+0x101)[0x7ffff2d87891]
libv_rep.so(_Z28simHandleMainScript_internalv+0x1c4)[0x7ffff2e28b34]
/is/ei/gli/Documents/VREP/vrep[0x4024d2]
And to be more specific, I write all my code in C++ and generate this external library running in vrep but I didn't have any lua code in my simulation. Another thing to mention is that I use c++ 11 and all the data structure in my code is from standard library, such as std::vector, std::array or std::unique_ptr, std::shared_ptr etc.
I cannot easily say that this crash is caused by Vrep, because maybe I made some mistakes when I call the API functions. Therefore I would like to ask for some suggestion to debug.
Thank you in advance.
FItz