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

Cherry-Pick #1317: Fix segfault at exit #1441

Merged
merged 1 commit into from
Apr 13, 2022
Merged

Conversation

azeey
Copy link
Contributor

@azeey azeey commented Apr 12, 2022

➡️ Forward Cherry Pick

Cherry-pick #1317.

There seems to be a separate segfault at exit on main causing UNIT_Gui_clean_exit_TEST to fail locally.

Note to maintainers: Remember to Merge with commit (not squash-merge or rebase)

@azeey azeey requested a review from chapulina as a code owner April 12, 2022 20:36
@github-actions github-actions bot added the 🌱 garden Ignition Garden label Apr 12, 2022
@codecov
Copy link

codecov bot commented Apr 12, 2022

Codecov Report

Merging #1441 (7531f08) into main (b2549dd) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1441   +/-   ##
=======================================
  Coverage   35.39%   35.39%           
=======================================
  Files          43       43           
  Lines        2331     2331           
=======================================
  Hits          825      825           
  Misses       1506     1506           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b2549dd...7531f08. Read the comment docs.

As discussed in gazebosim#1158, a segfault occurs during exit because Views created as a result of an ECM query by plugins have their destructors stored in the shared library of the plugin. For GUI plugins, the plugins are unloaded from memory before the ECM is destructed, so when it's time to destruct the Views, a segfault occurs because the pointer to the virtual destructor is invalid. This PR is fixes the problem by making View a regular class instead of a template. This ensures that the destructor of View is stored in the core library of ignition-gazebo. As a result, the ECM can be destructed after GUI plugins have been unloaded.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

Co-authored-by: Michael Carroll <michael@openrobotics.org>
Co-authored-by: Ashton Larkin <42042756+adlarkin@users.noreply.github.com>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
@azeey
Copy link
Contributor Author

azeey commented Apr 12, 2022

I have disabled UNIT_Gui_clean_exit_TEST for now till #1443 is resolved.

Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

Thanks!

@chapulina chapulina merged commit 440adc1 into gazebosim:main Apr 13, 2022
@j-rivero j-rivero mentioned this pull request Sep 16, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱 garden Ignition Garden
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants