Hi
Coppeliasim keeps crashing but only intermittently and the only reason it gives is std::bad_alloc.
Full description from terminal:
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
./coppeliaSim.sh: line 33: 4985 Aborted (core dumped) "$dirname/$appname" "${PARAMETERS[@]}"
I believe it is something to do with a height field I am creating from a Python program by calling a Lua function.
https://drive.google.com/drive/folders/ ... sp=sharing
Above is a link to basically everything I am using:
18w 30t.ttm - is the robot model I have been using
terrain test ground mar20.ttt - the scene with the lua script in
createterrain1.py - program that creates the terrain
controlTerrain.py - program that controls the robot, start/stop scene and calls createterrain1.py
Other info - using latest coppeliasim on ubuntu 18 but the computer is reasonably basic. Processor: Intel® Core™ i5 CPU 650 @ 3.20GHz × 4 , Graphics: Intel® Ironlake Desktop
Been trying for about a week to try and figure out what might be causing this. Any help would be much appreciated. If there is any other info you need let me know.
:)
Crash with not too much info why
Re: Crash with not too much info why
Hello,
you are saying it crashes intermittently... that means you can't easily reproduce the crash, right? So it happens every x minutes, or y hours approximately?
If you could find out which Python call happens last, that would already be a beginning. Are you using the legacy remote API? Does it happen only with one physics engine or with all of them?
Also, you could try to enable printing debug info via [menu bar --> Help -->Debug ] and enable Debug internal function access, Debug C API access and Debug Lua API access. Things will run much much slower however...
Cheers
you are saying it crashes intermittently... that means you can't easily reproduce the crash, right? So it happens every x minutes, or y hours approximately?
If you could find out which Python call happens last, that would already be a beginning. Are you using the legacy remote API? Does it happen only with one physics engine or with all of them?
Also, you could try to enable printing debug info via [menu bar --> Help -->Debug ] and enable Debug internal function access, Debug C API access and Debug Lua API access. Things will run much much slower however...
Cheers
Re: Crash with not too much info why
It can be reproduced but with a bit of time as I am looping the simulation run it happens within the first 1-15 min. It happens mid-run so when the robot it moving towards a target coordinate. I was using ODE with coppeliasim, downloaded old vrep and tried that with bullet 2.78 & ODE which did still created the crash. Currently trying it with Bullet and coppeliasim which so far hasn't crashed.
In the python script during the sim it only calls 4 function : Settargetvelocity, getposition, getorientation and getLastcmdtime.
The inputs to the function for the last three don't change and I printed to values of the target velocities which were always numbers so wouldn't be causing an error.
I did already run the Debug printing but couldn't make much sense of it, will upload that to the google drive folder.
The main thing is if I change the terrain to a bunch of steps instead (in my code t =2) it doesn't crash. So it seems to be some sort of interaction with the height field that I am creating.
Thanks for your help, it is much appreciated.
In the python script during the sim it only calls 4 function : Settargetvelocity, getposition, getorientation and getLastcmdtime.
The inputs to the function for the last three don't change and I printed to values of the target velocities which were always numbers so wouldn't be causing an error.
I did already run the Debug printing but couldn't make much sense of it, will upload that to the google drive folder.
The main thing is if I change the terrain to a bunch of steps instead (in my code t =2) it doesn't crash. So it seems to be some sort of interaction with the height field that I am creating.
Thanks for your help, it is much appreciated.
Re: Crash with not too much info why
Update: Well sticking with coppelia and changing the physics engine to bullet 2.78 might have fixed it. Its been running for about a hour now without crashing. I would still like to know what was going wrong if possible. The reason I was using ODE was it seems to be the only one that deals with a cylinder on its side in a sensible manner (try it, its great).
Rob
Rob