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

Core Dumps with No Plugins on ClassLoader constructor #9

Closed
DLu opened this issue Jan 18, 2013 · 4 comments
Closed

Core Dumps with No Plugins on ClassLoader constructor #9

DLu opened this issue Jan 18, 2013 · 4 comments
Assignees

Comments

@DLu
Copy link

DLu commented Jan 18, 2013

I was refactoring code, and mistakenly didn't change the export tags on a plugin. Hence there were no available plugins for the given type.

terminate called after throwing an instance of 'pluginlib::LibraryLoadException'
  what():  rospack could not find the layered_costmap package containing layered_costmap::CostmapPlugin

Program received signal SIGABRT, Aborted.
0x00007ffff6b05425 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x00007ffff6b05425 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff6b08b8b in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff715b69d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007ffff7159846 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff7159873 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff715996e in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007ffff73e139f in pluginlib::ClassLoader<layered_costmap::CostmapPlugin>::determineAvailableClasses (this=0x7fffffffe010)
    at /opt/ros/fuerte/stacks/pluginlib/include/pluginlib/class_loader_imp.h:418
#7  0x00007ffff73e1947 in pluginlib::ClassLoader<layered_costmap::CostmapPlugin>::ClassLoader (this=0x7fffffffe010, package=..., base_class=..., 
    attrib_name=...) at /opt/ros/fuerte/stacks/pluginlib/include/pluginlib/class_loader_imp.h:51
#8  0x00007ffff73cb25a in layered_costmap::LayeredCostmap::LayeredCostmap (this=0x7fffffffdd40, name=..., tf=...)
    at /wg/stor5/dlu/ros/navigation/layered_costmap/src/layered_costmap.cpp:50
@ghost ghost assigned mirzashah Jan 18, 2013
@mirzashah
Copy link
Member

I forgot to follow up on this. Could you explain in a little more detail the conditions for recreating the bug:
-What part of the export tags were incorrect, the lookup name, the base class, or the derived class?
-Could you provide a simple sample program recreating the bug?

If the issue turns out to be Fuerte-only, I likely won't backport a fix as it's easy to workaroundl

@DLu
Copy link
Author

DLu commented Jan 24, 2013

#include <ros/ros.h>
#include <pluginlib/class_loader.h>
class Jedi { };
int main(int argc, char **argv)
{
  ros::init(argc, argv, "plugin_test");
  pluginlib::ClassLoader<Jedi> x("plugin_test", "Jedi");
  //x.createClassInstance("Obiwan");
  return 0;
}

Here is a simple test case. There are no plugins of type Jedi defined anywhere. However, you would expect it to only error out on the commented out line, not the ClassLoader line.

I have not tested in Groovy.

@mirzashah
Copy link
Member

Oh that is odd...that case should be covered by unit test. I'll try to recreate and get back to you.

@mirzashah
Copy link
Member

I misread your output, it's actually correct. The SIGABRT is triggered by the exception that is raised, which is the correct behavior. When a ClassLoader is created, it queries rospack for all plugin XML files exported by the package it is bound to. It seems that if there are no XML files exported by a package, it raises a LibraryLoadException.

Though the behavior is correct, the exception type and encapsulating error message is not very helpful I may just prevent the constructor from raising an exception and throwing it at plugin creation time (as you were expecting).. I will refactor this for groovy, but will not bother with fuerte.

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

No branches or pull requests

2 participants