coppeliaSim crash problem

Report crashes, strange behaviour, or apparent bugs
Post Reply
lyz
Posts: 46
Joined: 07 Mar 2019, 07:34

coppeliaSim crash problem

Post by lyz »

Hi,
The software crashed today. I want to connect to the host remotely through `ssh -X `, and then start coppeliaSim.sh in interface mode, but the following problem is displayed:

Code: Select all

sim@sim:~/coppelia_ws/src/coppelia_software$ ./coppeliaSim.sh                                                                                                                            
Loading the CoppeliaSim library...
Done!
Launching CoppeliaSim...
lib: 1
lic: 1

CoppeliaSim Edu V4.0.0. (rev. 4)
Using the default Lua library.
Loaded the video compression library.
Add-on script 'simAddOnScript-addOnScriptDemo.lua' was loaded.
Add-on script 'simAddOnScript-b0RemoteApiServer.lua' was loaded.
Add-on script 'simAddOnScript_PyRep.lua' was loaded.
If CoppeliaSim crashes now, try to install libgl1-mesa-dev on your system:
>sudo apt install libgl1-mesa-dev


Error: signal 11:

/home/sim/coppelia_ws/src/coppelia_software/libcoppeliaSim.so(_Z11_segHandleri+0x28)[0x7f206c3742f8]
/lib/x86_64-linux-gnu/libc.so.6(+0x354b0)[0x7f20701e04b0]
/lib/x86_64-linux-gnu/libc.so.6(strlen+0x26)[0x7f2070236746]
/home/sim/coppelia_ws/src/coppelia_software/libcoppeliaSim.so(_Z15initGl_ifNeededv+0x110)[0x7f206c528880]
/home/sim/coppelia_ws/src/coppelia_software/libcoppeliaSim.so(_ZN11CMainWindowC1Ev+0x806)[0x7f206c8139c6]
/home/sim/coppelia_ws/src/coppelia_software/libcoppeliaSim.so(_ZN3App16createMainWindowEv+0x44)[0x7f206c519064]
/home/sim/coppelia_ws/src/coppelia_software/libcoppeliaSim.so(_Z24simRunSimulator_internalPKciPFvvES2_S2_iS0_b+0x304)[0x7f206c381784]
/home/sim/coppelia_ws/src/coppelia_software/libcoppeliaSim.so(simRunSimulatorEx+0xf)[0x7f206c371ccf]
/home/sim/coppelia_ws/src/coppelia_software/coppeliaSim[0x401c48]
/home/sim/coppelia_ws/src/coppelia_software/coppeliaSim[0x401298]
And I have installed the libgl1-mesa-dev, but it still has this problem.

So I changed to the headless mode to start coppeliaSim. sh -h test.ttt, and the crash showed as follows:

Code: Select all

sim@sim:~/coppelia_ws/src/coppelia_software$ ./coppeliaSim.sh -h test.ttt 
Loading the CoppeliaSim library...
Done!
Launching CoppeliaSim...
lib: 1
lic: 1

CoppeliaSim Edu V4.0.0. (rev. 4)
Using the default Lua library.
Add-on script 'simAddOnScript-addOnScriptDemo.lua' was loaded.
Add-on script 'simAddOnScript-b0RemoteApiServer.lua' was loaded.
Add-on script 'simAddOnScript_PyRep.lua' was loaded.
Simulator launched.
Plugin 'Geometric': loading...
Plugin 'Geometric': load succeeded.
Plugin 'Assimp': loading...
Plugin 'Assimp': warning: replaced variable 'simAssimp'
Plugin 'Assimp': load succeeded.
Plugin 'BlueZero': loading...
Plugin 'BlueZero': warning: replaced variable 'simB0'
Plugin 'BlueZero': load succeeded.
Plugin 'BubbleRob': loading...
Plugin 'BubbleRob': load succeeded.
Plugin 'Bwf': loading...
Plugin 'Bwf': load succeeded.
Plugin 'CodeEditor': loading...
CodeEditor: cannot load in headless mode
Error with plugin 'CodeEditor': load failed (failed initialization).
Plugin 'Collada': loading...
CoppeliaSim runs in headless mode. Cannot start 'Collada' plugin.
Error with plugin 'Collada': load failed (failed initialization).
Plugin 'ConvexDecompose': loading...
Plugin 'ConvexDecompose': load succeeded.
Plugin 'CustomUI': loading...
CustomUI: doesn't work in headless mode
Error with plugin 'CustomUI': load failed (failed initialization).
Plugin 'DynamicsBullet-2-78': loading...
Plugin 'DynamicsBullet-2-78': load succeeded.
Plugin 'DynamicsBullet-2-83': loading...
Plugin 'DynamicsBullet-2-83': load succeeded.
Plugin 'DynamicsNewton': loading...
Plugin 'DynamicsNewton': load succeeded.
Plugin 'DynamicsOde': loading...
Plugin 'DynamicsOde': load succeeded.
Plugin 'DynamicsVortex': loading...
Plugin 'DynamicsVortex': load succeeded.
Plugin 'ExternalRenderer': loading...
Plugin 'ExternalRenderer': load succeeded.
Plugin 'ICP': loading...
Plugin 'ICP': warning: replaced variable 'simICP'
Plugin 'ICP': load succeeded.
Plugin 'Image': loading...
Plugin 'Image': warning: replaced variable 'simIM'
Plugin 'Image': load succeeded.
Plugin 'K3': loading...
Plugin 'K3': load succeeded.
Plugin 'Lic': loading...
Plugin 'Lic': load succeeded.
Plugin 'LuaCommander': loading...
LuaCommander: cannot find the statusbar widget
Error with plugin 'LuaCommander': load failed (failed initialization).
Plugin 'LuaRemoteApiClient': loading...
Plugin 'LuaRemoteApiClient': load succeeded.
Plugin 'Mtb': loading...
Plugin 'Mtb': load succeeded.
Plugin 'OMPL': loading...
Plugin 'OMPL': warning: replaced variable 'simOMPL'
Plugin 'OMPL': load succeeded.
Plugin 'OpenGL3Renderer': loading...
Plugin 'OpenGL3Renderer': load succeeded.
Plugin 'OpenMesh': loading...
Plugin 'OpenMesh': load succeeded.
Plugin 'Qhull': loading...
Plugin 'Qhull': load succeeded.
Plugin 'ROSInterface': loading...
Plugin 'RosInterface': warning: replaced variable 'simROS'
Plugin 'ROSInterface': load succeeded.
Plugin 'RRS1': loading...
Plugin 'RRS1': load succeeded.
Plugin 'ReflexxesTypeII': loading...
Plugin 'ReflexxesTypeII': load succeeded.
Plugin 'RemoteApi': loading...
Starting a remote API server on port 19997
Plugin 'RemoteApi': load succeeded.
Plugin 'SDF': loading...
SDF: doesn't work in headless mode
Error with plugin 'SDF': load failed (failed initialization).
Plugin 'SurfaceReconstruction': loading...
Plugin 'SurfaceReconstruction': warning: replaced variable 'simSurfRec'
Plugin 'SurfaceReconstruction': load succeeded.
Plugin 'Urdf': loading...
CoppeliaSim runs in headless mode. Cannot start 'Urdf' plugin.
Error with plugin 'Urdf': load failed (failed initialization).
Plugin 'Vision': loading...
Plugin 'Vision': load succeeded.
Using the 'Geometric' plugin.
SSL: OpenSSL 1.1.1b  26 Feb 2019
Checking for an updated CoppeliaSim version...
Failed checking whether this CoppeliaSim version is up-to-date.
Please visit www.coppeliarobotics.com to verify
Initializing the Bullet physics engine in plugin 'DynamicsBullet_2_83'...
Engine version: 2.83.7
Plugin version: 11
Initialization successful.
ERROR: Failed creating an offscreen QOpenGLContext. Switching to a hidden QGLWidget.

Error: signal 11:

/home/sim/coppelia_ws/src/coppelia_software/libcoppeliaSim.so(_Z11_segHandleri+0x28)[0x7ff7cf9122f8]
/lib/x86_64-linux-gnu/libc.so.6(+0x354b0)[0x7ff7d377e4b0]
/lib/x86_64-linux-gnu/libc.so.6(strlen+0x26)[0x7ff7d37d4746]
/home/sim/coppelia_ws/src/coppelia_software/libcoppeliaSim.so(_Z15initGl_ifNeededv+0x110)[0x7ff7cfac6880]
/home/sim/coppelia_ws/src/coppelia_software/libcoppeliaSim.so(_ZN19COffscreenGlContextC1EiiiP9QGLWidgetii+0x92)[0x7ff7cfb114a2]
/home/sim/coppelia_ws/src/coppelia_software/libcoppeliaSim.so(_ZN20CVisionSensorGlStuffC2EiiibP9QGLWidgetbbii+0x74)[0x7ff7cfb12224]
/home/sim/coppelia_ws/src/coppelia_software/libcoppeliaSim.so(_ZN13CVisionSensor45createGlContextAndFboAndTextureObjectIfNeededEb+0x153)[0x7ff7cf7dabc3]
/home/sim/coppelia_ws/src/coppelia_software/libcoppeliaSim.so(_ZN13CVisionSensor13detectEntity2Eibbbb+0x1c6)[0x7ff7cf7dadf6]
/home/sim/coppelia_ws/src/coppelia_software/libcoppeliaSim.so(_ZN13CVisionSensor44detectVisionSensorEntity_executedViaUiThreadEibbbb+0x75)[0x7ff7cf7db005]
/home/sim/coppelia_ws/src/coppelia_software/libcoppeliaSim.so(_ZN9CUiThread27__executeCommandViaUiThreadEP16SUIThreadCommandS1_+0x2434)[0x7ff7cfa7a924]
QMutex: destroying locked mutex
My remote computer nvidia driver version is 430.64. And my local computer nvidia driver version is 384. Qt version is 5.8 and 5.12.
Is there any solution? At least it can running in headless mode via ssh -X. Thanks a lot.

coppelia
Site Admin
Posts: 7928
Joined: 14 Dec 2012, 00:25

Re: coppeliaSim crash problem

Post by coppelia »

Hello,

didn't you manage to run it in the past? What has changed?

Cheers

lyz
Posts: 46
Joined: 07 Mar 2019, 07:34

Re: coppeliaSim crash problem

Post by lyz »

Hi coppelia,
I have changed nothing. In the past, I tested the SSH between two IPs on only one computer, and it works now. But now I tested between two computers, there is a problem above. At present, I have not found a solution in forum.

I just tested that it works in headless mode without vision sensors.

lyz
Posts: 46
Joined: 07 Mar 2019, 07:34

Re: coppeliaSim crash problem

Post by lyz »

Hi,
Is there any other way? I've been trying to run coppelia Headless mode software over SSH-X recently, but if you add a camera, the simulation cannot start, and the above error occurs. I think my current requirement is to run coppelia in Headless mode, with a camera and laser sensor, and autostart coppelia software when computer boots, but the tests now seem to have no chance at all. It doesn't autostart on my PC, and it will report errors, as well as remote boot. Can you debug a machine remotely on your computer? This is now my bottleneck. Thanks a lot.

fferri
Posts: 627
Joined: 09 Sep 2013, 19:28

Re: coppeliaSim crash problem

Post by fferri »

It seems that CoppeliaSim requires a X11 server even when run in headless mode. That's why it is suggested to use X11 forwarding (i.e. ssh -X or ssh -Y).

In fact, when run via ssh with X11 forwarding, it would work only in headless mode. OpenGL would fail to init otherwise.

Additionally, if your local X server does not support GLX, it would fail to start too. I'm running XQuartz on macOS, and I have to start it as Xquartz +extension GLX before running coppeliaSim -h on the remote machine over ssh -Y. This is the only configuration which seems to work here.

You need to compile coppeliaSim in true headless mode (i.e. pass CONFIG+=HEADLESS_TEST to qmake when building coppeliaSimLib) if you want to get rid of this X11/GLX requirement. Of course vision sensors would not work in this case, as they use OpenGL for rendering.

If you want to do a further test, you can check if you can successfully run glxgears on the remote machine with X11 forwarding and under which conditions. On my machine, no configuration of client and server works, so it is not an issue of CoppeliaSim alone, but common to all OpenGL applications.

coppelia
Site Admin
Posts: 7928
Joined: 14 Dec 2012, 00:25

Re: coppeliaSim crash problem

Post by coppelia »

as a last option, you can try to change the OpenGL settings via the left-side toolbar button ("User settings", then "Adjust OpenGL settings", then try with a different Offscreen context type.

Cheers

lyz
Posts: 46
Joined: 07 Mar 2019, 07:34

Re: coppeliaSim crash problem

Post by lyz »

Hi coppelia and fferri:
I'm sorry to reply to you for so long. I tested the solution that you said. First, for the solution of fferri, I used ssh -X and ssh -Y to connect to the remote PC, and the result was the above error. To test GLX problem, I used `glxinfo | grep rendering` command and found the following error:

Code: Select all

sim@sim:~$ glxinfo | grep rendering
X Error of failed request: BadValue (integer parameter out of range for operation)
   Major opcode of failed request: 154 (GLX)
   Minor opcode of failed request: 24 (X_GLXCreateNewContext)
   Value in failed request: 0x0
   Serial number of failed request: 39
   Current serial number in output stream: 40
For the solution of coppelia , I modified the parameters inside. It works for the headless mode of the local PC, but it does not respond to the remote PC.

Now, I am thinking of a way to solve the problem of GLX. If there is a solution, I will share it. Of course, if you have further solutions, you can also reply to me at any time. Thank you!

coppelia
Site Admin
Posts: 7928
Joined: 14 Dec 2012, 00:25

Re: coppeliaSim crash problem

Post by coppelia »

Another solution would be:
  • compile CoppeliaSimLib as headless (i.e if you compile with Qt, add CONFIG += HEADLESS at the top of the coppeliaSimLib.pro project file). You may also get that binary from us.
  • use the Pov-Ray plugin. Binaries are here.
  • set all vision sensors you want to use the images from to render as Pov-Ray
This will compile without OpenGl dependencies, and will render those vision sensor images with the PovRay plugin (software only rendering, ray-tracing). This is much slower, but the quality is also nicer and that should work fine in any situation normally.

If you need some of the CoppeliaSim plugins, try to use up-to-date binaries from the beta version of next release.

Cheers

Post Reply