Skip to content

Got LibraryUnloadException on correct unloading #227

@roversch

Description

@roversch

I'm on 1.13.0-1focal.20210727.062753 with ROS noetic.

I have the following plugin situation, both are part of the same dynamic library:

  <class type="Child1" base_class_type="Parent"/>
  <class type="Child2" base_class_type="Parent"/>

When I call createUnmanagedInstance with the name of Child1, it correctly gets resolved_library_path_ set. When I do the same for Child2, it is not updated from UNRESOLVED.

When I then try to call unloadLibraryForClass, the Child1 is correctly unloaded, but for Child2 I get LibraryUnloadException, since there is a check for the resolved_library_path_:

  if (it != classes_available_.end() && it->second.resolved_library_path_ != "UNRESOLVED") {
    ...
  }

Basically, I'm not able to correctly unload it.

How can I get around this? Is it correct to assume that resolved_library_path_ should always be set, and thus we have a bug here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions