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

Fix dvl integration test #348

Merged
merged 7 commits into from
Jun 6, 2023
Merged

Fix dvl integration test #348

merged 7 commits into from
Jun 6, 2023

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented May 25, 2023

🦟 Bug fix

Fixes dvl integration test that's been segfaulting on exit by making sure the sensor is destroyed before exiting, similar to what's done in #324.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
@github-actions github-actions bot added the 🎵 harmonic Gazebo Harmonic label May 25, 2023
@codecov
Copy link

codecov bot commented May 25, 2023

Codecov Report

Merging #348 (3d693f2) into main (e1a8c1f) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 3d693f2 differs from pull request most recent head b57ba67. Consider uploading reports for the commit b57ba67 to get more accurate results

@@           Coverage Diff           @@
##             main     #348   +/-   ##
=======================================
  Coverage   71.95%   71.96%           
=======================================
  Files          38       38           
  Lines        4868     4869    +1     
=======================================
+ Hits         3503     3504    +1     
  Misses       1365     1365           
Impacted Files Coverage Δ
src/Manager.cc 65.71% <100.00%> (+1.00%) ⬆️

Copy link
Contributor

@azeey azeey left a comment

Choose a reason for hiding this comment

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

Just some fly by comments/questions on why manual management is necessary.

@@ -181,6 +181,7 @@ class DopplerVelocityLogTest : public testing::Test,
seabed->SetLocalPose(seabedPose);
seabed->SetLocalScale(math::Vector3d(1e3, 1e3, 0.0));
seabed->SetMaterial(sand);
scene->DestroyMaterial(sand);
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be automatically handled when the reference count on the material goes to 0 or when the scene itself is destroyed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this call is not needed so removed.

@@ -342,6 +343,8 @@ TEST_P(DopplerVelocityLogTest, BottomTrackingWhileStatic)
4 * config.trackingNoise));
}
EXPECT_EQ(0, message.status());

this->manager.Remove(sensor->Id());
Copy link
Contributor

Choose a reason for hiding this comment

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

Should deleting the sensors be something the destructor of sensors::Manager should handle instead of requiring the user to do it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a call to clear sensors in manager destructor. Segfault still happens when exiting test so kept the Remove here. I believe this happens due to the same reason mentioned in gazebosim/gz-gui#535 (comment). Crash is likely due to shared pointers in gz-rendering removing invalid resources when they go out of scope. It's hard to debug where that's coming from since it only happens on Jammy github actions and not locally. Still need to track this down

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Still need to track this down

I'll do that separate from this PR.

@iche033 iche033 merged commit 68c1839 into main Jun 6, 2023
@iche033 iche033 deleted the dvl_test branch June 6, 2023 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎵 harmonic Gazebo Harmonic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants