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

Avoid throwing on symlink loops. #244

Conversation

iwanders
Copy link

Hi, we were seeing a throw from rviz with the following message:

terminate called after throwing an instance of 'boost::filesystem::filesystem_error'
  what():  boost::filesystem::status: Too many levels of symbolic links: "/nix/store/44kcmy9bsw44y13bf7x5kzlm9s4cdhpr-libgccjit-10.3.0/lib/lib/libcpr_viz.so"
Aborted

Here, the /nix/store/44kcmy9bsw44y13bf7x5kzlm9s4cdhpr-libgccjit-10.3.0/lib/ directory is a symlink to itself, so there's an endless recursion. The boost::filesystem::exists method throws in this instance, but the exception is not caught anywhere, so rviz exits.

Instead, it is safer to use the overload that takes the error code and ensure that the function returned success, I don't think pluginlib should ever result in an uncaught throw?

fyi @mikepurvis, @jasonimercer, @nlunscher-cpr (CORE-23076)

@jasonimercer
Copy link

LGTM

@ahcorde ahcorde merged commit dcf3ec2 into ros:noetic-devel Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants