opensim-org / opensim-core

SimTK OpenSim C++ libraries and command-line applications, and Java/Python wrapping.
https://opensim.stanford.edu
Apache License 2.0
800 stars 323 forks source link

`OpenSim::ExternalLoads` cannot re-finalize is copied inside of an `OpenSim::Model` #3926

Closed adamkewley closed 1 month ago

adamkewley commented 1 month ago

Downstream issue https://github.com/ComputationalBiomechanicsLab/opensim-creator/issues/924

tl;dr, if an ExternalLoads that's loaded from a file is added to an OpenSim::Model and then the original OpenSim::Model will work fine but all in-memory copies of the OpenSim::Model will break on finalizeConnections, because there's code in OpenSim::ExternalLoads that's dependent on the XMLDocument pointer in OpenSim::Object, which is wiped on-copy.

I'll post a relevant PR etc - this is just a stub issue so I have a number for the comments etc.