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

Protect against non-finite inputs on Node and OrbitViewController #655

Merged
merged 2 commits into from
Jun 25, 2022

Conversation

chapulina
Copy link
Contributor

🦟 Bug fix

Summary

While debugging gazebosim/gz-sim#1499 (review), I noticed that GUI and Sim are often providing non-finite values to Rendering, which often results in crashes. This PR adds some guards for situations that I ran into.

I'm going to keep investigating why downstream libraries are setting NaNs, but having the guards in place helps in any case.

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.

🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸

@chapulina chapulina requested a review from jennuine June 23, 2022 22:45
@chapulina chapulina requested a review from iche033 as a code owner June 23, 2022 22:45
@github-actions github-actions bot added the 🏯 fortress Ignition Fortress label Jun 23, 2022
@codecov
Copy link

codecov bot commented Jun 23, 2022

Codecov Report

Merging #655 (f310470) into ign-rendering6 (859272a) will decrease coverage by 0.01%.
The diff coverage is 51.16%.

@@                Coverage Diff                 @@
##           ign-rendering6     #655      +/-   ##
==================================================
- Coverage           54.97%   54.95%   -0.02%     
==================================================
  Files                 202      202              
  Lines               21069    21102      +33     
==================================================
+ Hits                11582    11596      +14     
- Misses               9487     9506      +19     
Impacted Files Coverage Δ
src/OrbitViewController.cc 67.64% <25.00%> (-7.94%) ⬇️
ogre2/src/Ogre2RayQuery.cc 60.55% <60.00%> (-0.84%) ⬇️
include/ignition/rendering/base/BaseNode.hh 84.05% <70.58%> (-0.80%) ⬇️

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 859272a...f310470. Read the comment docs.

Signed-off-by: Louise Poubel <[email protected]>
@chapulina chapulina added the bug Something isn't working label Jun 23, 2022
@chapulina chapulina merged commit d773877 into ign-rendering6 Jun 25, 2022
@chapulina chapulina deleted the chapulina/6/non_finite branch June 25, 2022 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 🏯 fortress Ignition Fortress
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants