opensim-core
opensim-core copied to clipboard
`prescribeControlForActuator()` can cause crashes in scripting when ownership is handed to the `Controller`
(Example files: PrescribedControllerExample.zip)
Example shows a use case in passing a pointer to a spline from a GCVSplineSet
to a Controller
using prescribeControlForActuator()
. When garbage collection occurs, this causes a crash.
Cloning the spline in the call to prescribeControlForActuator()
works around this issue.
/cc @aymanhab