-
Notifications
You must be signed in to change notification settings - Fork 466
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
correctly initialise Ogre types and check return value of 'transform' #1396
correctly initialise Ogre types and check return value of 'transform' #1396
Conversation
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 this contribution. However, I think it will be sufficient to return on failure. Can you confirm?
Ogre::Quaternion orient; | ||
transform(new_message, pos, orient, scale); | ||
|
||
if(!transform(new_message, pos, orient, scale)) { return; } |
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.
Wouldn't it suffice to have this line fixed, i.e. just return on failure?
All the uninitialized variables wouldn't be used in this case.
Yes, in this case it would be sufficient to return and keep the values uninitialised. |
@christian-rauch, could you provide a marker message causing rviz to fail on this? |
The issue was related to the transforms, not the marker per se. Due to a misconfiguration from my side, I had two roots in the TF tree and
scale .
|
My point is, that if the transform is missing, the message filter should bail out before already. |
I understand. But I am unable to reproduce this issue since I fixed the original problem in the URDF and a couple of other places. |
Superseded by #1400. @christian-rauch, please validate. |
Description
In some sections of the code, the Ogre types where not correctly initialized and return values have not been checked. This PR resolves these issues to prevent crashes due to invalid marker scales from uninitialized memory.