Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Avoid segfault and improve error warnings #603
Avoid segfault and improve error warnings #603
Changes from 2 commits
a9c983d
4bac6ac
fe953d0
3d3d1b7
08eaab1
331652f
7ba59e8
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Please revert those changes too.
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.
knowsFrameTransform()
, a few lines above, should have validated that the frame exists.Under what circumstances do you run into a segfault here?
I cannot imagine a valid frame that returns NULL here.
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.
There seem to be cases under which getRigidlyConnectedParentLinkModel returns a nullptr. Are they all covered by
knowsFrameTransform
?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.
Not sure if I am understanding it correctly. I tried to add comments to the code to make it more comprehensible in https://github.com/moveit/moveit2/pull/2969/files. Do you think they are accurate? My current understanding is that this function returns a nullptr when there is nothing connected to the parent or when the transform between the parent body and the given frame is unknown.
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.
Yes, they should be covered by
knowsFrameTransform
. If not, that's probably a bug. Please state your concrete problem.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.
IMO, this function should return NULL only if the given frame is unknown. Note that this function finds the parent link, which frame is connected to.
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.
The error message doesn't make sense: an existing frame needs to be connected to some link.
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.
Would this be more precise?
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.
As I said, I expect this to return NULL if and only if frame doesn't exist. Do you have other evidence?
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.
@sjahr: I'm still curious to learn about your concrete issue.
In which case does
getRigidlyConnectedParentLinkModel
returns NULL, which is not handled before byknowsFrameTransform
?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.
Sorry, I cannot share more info on this at the moment 😞 I'll try debugging it further and hopefully figure out what the real source behind this is.
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.
I'm not expecting a detailed error analysis, but ideally a code snippet reproducing your segfault - I assume you observed a segfault in some code.
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.
Yes, unfortunately I don't have access to the code that causes the error and it seems to happen only in a HW setup. If you'd prefer that I can close this PR for now and come back later with more solid changes.