opensim-org / opensim-core

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

Bug Fix in the Component API #3804

Closed fcanderson closed 1 week ago

fcanderson commented 3 weeks ago

Fixes issue #3803

This PR addresses an assertion failure that was occurring in Debug mode and fixes bugs in Component::setModelingOption() and Component::getModelingOption().

Brief summary of changes

Testing I've completed

I re-ran testComponentInterface in both Release and Debug modes. All tests are passing.

CHANGELOG.md (choose one)


This change is Reviewable

fcanderson commented 3 weeks ago

@nickbianco and @aymanhab. Do either of you have time to review my bug fixes and merge this PR? There are just a few tweaks to existing code and a few added lines.

Thanks, -Clay

aymanhab commented 3 weeks ago

Thanks @fcanderson I'll try to review today.

fcanderson commented 1 week ago

@aymanhab @nickbianco I'm working to identify the reason for the C-I failure for the "Windows" build. testPrescribedForce is the specific test that is failing.

All tests pass on my desktop for both Visual Studio 2019 and Visual Studio 2022 builds.

At this point I'm wondering if the difference in behavior between my desktop and C-I has to do with either the version of Visual Studio or the version of Windows.

In the past I have seen differences in the standard C++ libraries on Windows 10 vs. Windows 11. I had to program around them in Simbody. See https://github.com/simbody/simbody/issues/780.

So, for C-I, I'm specifically wondering:

  1. What version of Windows is running (10 or 11)?
  2. What version of Visual Studio Community 2019 is running?

I'm assuming I need to get to the bottom of this before the bug fixes in this PR are merged? Merger of these bug fixes is a prerequisite for the PR I will submit for the new StatesDocument class.

Thanks. I know you guys are busy.

nickbianco commented 1 week ago

@fcanderson the testPrescribedForce failure is unrelated to your changes here. We've been running into this issue in other PRs and not sure what the root cause is yet.

Sorry if you went down the rabbit hole on this! You can ignore that failure if it continues to persist (although sometimes re-running the CI will get it to pass).

fcanderson commented 1 week ago

@nickbianco @aymanhab

Thanks for the response, Nick. I didn't go too far down the rabbit hole.

Given that the failure is unrelated to my changes, would one of you merge this PR? Or, is a review from another person needed?

aymanhab commented 1 week ago

Merged, thanks @fcanderson

fcanderson commented 1 week ago

@aymanhab @nickbianco Awesome. Thanks, Ayman.