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

[SofaConstraint] Fix crash when constraint correction is missing #2222

Conversation

alxbilger
Copy link
Contributor

The LCPConstraintSolver in its unbuilt version crashed when a contact does not have an associated constraint correction, because of a null pointer dereference.

Now, the pointer is checked for null. Also, if there are only contacts without constraint correction, the algorithm stops.


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 Jul 2, 2021
@fredroy
Copy link
Contributor

fredroy commented Jul 2, 2021

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

@fredroy fredroy 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 Jul 8, 2021
@fredroy fredroy merged commit 4cfa1d9 into sofa-framework:master Jul 9, 2021
@guparan guparan added this to the v21.12 milestone Oct 1, 2021
@alxbilger alxbilger deleted the fix_crash_missingconstraintcorrection branch June 28, 2022 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

3 participants