opensim-core icon indicating copy to clipboard operation
opensim-core copied to clipboard

`prescribeControlForActuator()` can cause crashes in scripting when ownership is handed to the `Controller`

Open carmichaelong opened this issue 11 months ago • 0 comments

(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

carmichaelong avatar Mar 22 '24 22:03 carmichaelong