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

nodelet loader hides load error #23

Closed
xqms opened this issue Jun 27, 2014 · 8 comments · Fixed by #24
Closed

nodelet loader hides load error #23

xqms opened this issue Jun 27, 2014 · 8 comments · Fixed by #24
Assignees

Comments

@xqms
Copy link
Contributor

xqms commented Jun 27, 2014

As of commit 4670f32, load errors (such as undefined references) can be hidden under certain circumstances.

If the loader is constructed using the

Loader::Loader(const boost::function<boost::shared_ptr<Nodelet> (const std::string& lookup_name)>& create_instance)

constructor, the refresh_classes_ call in https://github.com/ros/nodelet_core/blob/indigo-devel/nodelet/src/loader.cpp#L272 will fail, causing an exception and hiding the initial load error from the user.

This means that e.g. rqt plugin developers get an error message like

[ERROR][/rqt_gui_cpp_node_26375->Loader::load]: Failed to load nodelet [nodelet_name] of type [nodelet_type]: call to empty boost::function

which is not very helpful.

@esteve esteve self-assigned this Jun 27, 2014
xqms added a commit to xqms/nodelet_core that referenced this issue Jun 27, 2014
This fixes ros#23. The call on an uninitialized boost::function was causing
an exception, which was reported to the user instead of the underlying
exception from the failed library load.
@jdschw
Copy link

jdschw commented Aug 4, 2014

Hi,

I'm getting the error described above when I attempt to run rqt_image_view. I am on Ubuntu 14.04, using the ROS prebuilt rqt packages, i.e. on this project I'm a user, not a developer. Has this error been seen by other users, and if so, do you know if there is workaround?

@xqms
Copy link
Contributor Author

xqms commented Aug 4, 2014

There is no generic workaround. The bug in the nodelet_core package is that it displays this error message instead of the specific error that occurred, which misleads everyone involved.

To investigate your problem, you could build nodelet_core with my fix from #24, re-run the image viewer and report a bug on rqt_image_view with the specific error.

@xqms
Copy link
Contributor Author

xqms commented Aug 4, 2014

@esteve as this is affecting more people, would you consider merging my fix in #24? Nodelet development/debugging is really tedious without it.

@jdschw
Copy link

jdschw commented Aug 5, 2014

Thanks for the response. I was able to identify my problem through other means, and it was unrelated to this codebase, but the "true" error was indeed shadowed by the above error.

@esteve
Copy link
Member

esteve commented Aug 5, 2014

@xqms thanks for your patch and sorry for the slow response. Is there a way I could reproduce the issue? I'd like to add a regression test.

xqms added a commit to xqms/nodelet_core that referenced this issue Aug 8, 2014
xqms added a commit to xqms/nodelet_core that referenced this issue Aug 8, 2014
This fixes ros#23. The call on an uninitialized boost::function was causing
an exception, which was reported to the user instead of the underlying
exception from the failed library load.
@xqms
Copy link
Contributor Author

xqms commented Aug 8, 2014

I've added a unit test to the PR. If you want to see it fail, check out 79dbd5b.

@esteve esteve closed this as completed in #24 Aug 8, 2014
@esteve
Copy link
Member

esteve commented Aug 8, 2014

@xqms Thank you so much! Just merged it.

@DorianScholz
Copy link

This bug still persists on Hydro. Would it be possible to backport the PR #24 for Hydro?

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 a pull request may close this issue.

4 participants