Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Constraint.Lagrangian.Solver] Fix assert in GenericConstraintSolver #4389

Merged
merged 4 commits into from
Jan 6, 2024

Conversation

alxbilger
Copy link
Contributor

@alxbilger alxbilger commented Dec 18, 2023

The construction of xId caused an assert when cParams->constOrder() == sofa::core::ConstraintOrder::VEL. It happens only in debug, and it had no consequence because it was not used.

Bug introduced in #4213


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@alxbilger alxbilger added pr: fix Fix a bug pr: status to review To notify reviewers to review this pull-request labels Dec 18, 2023
@alxbilger
Copy link
Contributor Author

[ci-build][with-all-tests]

@@ -141,7 +141,7 @@ class SOFA_COMPONENT_CONSTRAINT_LAGRANGIAN_SOLVER_API GenericConstraintSolver :
void computeAndApplyMotionCorrection(const core::ConstraintParams* cParams, GenericConstraintSolver::MultiVecId res1, GenericConstraintSolver::MultiVecId res2) const;
void applyMotionCorrection(
const core::ConstraintParams* cParams,
const core::MultiVecCoordId xId,
const std::unique_ptr<core::MultiVecCoordId>& xId,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change of API so breaking 😶‍🌫️

Copy link
Contributor Author

@alxbilger alxbilger Dec 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function is private. Do you see a case where changing the signature of a private method can be breaking?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hum if somebody inherits it ? (and override it)

@fredroy fredroy added the pr: breaking Change possibly inducing a compilation error label Dec 20, 2023
@bakpaul bakpaul added pr: status ready Approved a pull-request, ready to be squashed and removed pr: status to review To notify reviewers to review this pull-request labels Jan 3, 2024
alxbilger and others added 3 commits January 4, 2024 01:48
The construction of xId caused an assert when `cParams->constOrder() == sofa::core::ConstraintOrder::VEL`. It happens only in debug, and it had no consequence because it was not used.
@hugtalbot
Copy link
Contributor

[ci-build][with-all-tests][force-full-build]

@epernod epernod merged commit ff2753f into sofa-framework:master Jan 6, 2024
11 checks passed
@hugtalbot hugtalbot added pr: backport todo This PR will be backported into the release preceeding its milestone. and removed pr: backport todo This PR will be backported into the release preceeding its milestone. labels Jan 10, 2024
@hugtalbot hugtalbot added this to the v24.06 milestone Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: breaking Change possibly inducing a compilation error pr: fix Fix a bug pr: status ready Approved a pull-request, ready to be squashed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants