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

Change the order of destruction to prevent use of released objects [14737] #2642

Merged
merged 2 commits into from
Jun 2, 2022

Conversation

shumov-ag
Copy link
Contributor

@shumov-ag shumov-ag commented Apr 14, 2022

Signed-off-by: Artem Shumov agshumov@sberautotech.ru

This PR changes the order of destruction of StatefulWriter members.
We need to disable all timed events before calling function deinit(), because deinit() releases all cache changes but callbacks of the timed events still use them.

Description

Contributor Checklist

  • Commit messages follow the project guidelines.
  • The code follows the style guidelines of this project.
  • N/A: Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added.
  • N/A: Any new/modified methods have been properly documented using Doxygen.
  • Fast DDS test suite has been run locally.
  • Changes are ABI compatible.
  • Changes are API compatible.
  • Documentation builds and tests pass locally.
  • N/A: New feature has been added to the versions.md file (if applicable).
  • N/A: New feature has been documented/Current behavior is correctly described in the documentation.

Reviewer Checklist

  • Check contributor checklist is correct.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

@EduPonz EduPonz added this to the v2.6.1 milestone Jun 1, 2022
@EduPonz EduPonz self-assigned this Jun 1, 2022
@EduPonz EduPonz changed the title Change the order of destruction to prevent use of released objects Change the order of destruction to prevent use of released objects [14737] Jun 1, 2022
shumov-ag and others added 2 commits June 1, 2022 15:47
Signed-off-by: Artem Shumov <agshumov@sberautotech.ru>
Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>
@EduPonz
Copy link

EduPonz commented Jun 1, 2022

This LGTM, thanks @shumov-ag!! I've added an extra commit to delete all the events one after the other just for getting a tidier code. I've also rebased the PR to master, let's see what CI says 😃

Copy link

@EduPonz EduPonz left a comment

Choose a reason for hiding this comment

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

LGTM

@EduPonz EduPonz merged commit afd8e1f into eProsima:master Jun 2, 2022
@EduPonz
Copy link

EduPonz commented Jun 2, 2022

@Mergifyio backport 2.5.x

@mergify
Copy link
Contributor

mergify bot commented Jun 2, 2022

backport 2.5.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Jun 2, 2022
…2642)

* Change destruction order to prevent using released objects

Signed-off-by: Artem Shumov <agshumov@sberautotech.ru>

* Refs #14737: Disable periodic HB event before deinit

Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>

Co-authored-by: Eduardo Ponz <eduardoponz@eprosima.com>
(cherry picked from commit afd8e1f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants