-
Notifications
You must be signed in to change notification settings - Fork 112
Fix Crash On Negative Value #1553
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
Conversation
Signed-off-by: Shady Gmira <shady.gmira@gmail.com>
Signed-off-by: Shady Gmira <shady.gmira@gmail.com>
Signed-off-by: Shady Gmira <shady.gmira@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for being super thorough.
Some minor style issues were highlighted by the CI:
/usr/share/gz/gz-cmake4/codecheck/cpplint.py:55: DeprecationWarning: module 'sre_compile' is deprecated
import sre_compile
/github/workspace/src/Box_TEST.cc:156: At least two spaces is best between code and comments [whitespace/comments] [2]
/github/workspace/src/Cone_TEST.cc:190: At least two spaces is best between code and comments [whitespace/comments] [2]
/github/workspace/src/Cone_TEST.cc:198: At least two spaces is best between code and comments [whitespace/comments] [2]
/github/workspace/src/Cylinder_TEST.cc:186: At least two spaces is best between code and comments [whitespace/comments] [2]
/github/workspace/src/Cylinder_TEST.cc:194: At least two spaces is best between code and comments [whitespace/comments] [2]
/github/workspace/src/Plane.cc:104: Line ends in whitespace. Consider deleting these extra spaces. [whitespace/end_of_line] [4]
Otherwise LGTM
|
I think you forgot to sign-off on the last two commits. You may have to force push. Instructions are here: https://github.com/gazebosim/sdformat/pull/1553/checks?check_run_id=39982138989 |
Yes you're right, still not used to it 🥲 |
🦟 Bug fix
Fixes gazebosim/gz-sim#2616
Summary
This PR introduces a fix for Gazebo crashing whenever an
sdfelement with negative size parameter was loaded. This is done by by simply adding a check in theloadfunction of each element to identify whether the parameter that is being loaded is negative or not.You can test it by running:
gz sim -v 3 c5.xmlc5.txt
From there, you should be seeing some warnings and all of the shapes.
Checklist
codecheckpassed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-bymessages.