Bug #2487

[rsb-cpp] No error message when desired plugins are not installed

Added by C. Emmerich about 8 years ago. Updated about 8 years ago.

Status:ResolvedStart date:02/12/2016
Priority:NormalDue date:
Assignee:J. Wienke% Done:

100%

Category:C++
Target version:rsb-0.13

Description

I just figured out that, if the rsb-config wants to load plugins which are not installed, there is no warning or error message from the rsb system. Is this desired? Could you please change that?


Related issues

Blocked by Robotics Systems Commons - Tasks #2488: Plugin configurator should be able to report missing plugins Resolved 02/15/2016

Associated revisions

Revision c19edcb4
Added by J. Wienke about 8 years ago

Use new plugin configurator API from RSC

Call the required execute method in Factory for the plugin
configurator.

This will now raise an exception in case a requested plugin cannot be
found.

fixes #2487

Revision edb27829
Added by J. Wienke about 8 years ago

News: entry for plugin loading exceptions

refs #2487

Revision a2b0dfa4
Added by J. Moringen almost 8 years ago

Reset factoryWhileLoadingPlugins in src/rsb/Factory.cpp

fixes #2528, refs #2487

The Factory constructor could be unwound by an exception thrown by the
plugin system, leaving factoryWhileLoadingPlugins pointing to a
half-initialized Factory object. To prevent this, reset
factoryWhileLoadingPlugins to NULL in case an exception is thrown by the
plugin system, then re-throw.

Unfortunately, I cannot come up with a reasonable test for this. The
error would be easy to trigger by doing

setenv("RSB_PLUGINS_CPP_LOAD", "foo", 1);
try { Factory f; } catch (...) {};
Factory f => segmentation fault

but that would require making the Factory constructor public or some
equally ugly friend hackery. sigh

  • src/rsb/Factory.cpp (header): updated copyright
    (Factory::Factory): reset factoryWhileLoadingPlugins in case an
    exception is thrown

History

#1 Updated by J. Wienke about 8 years ago

  • Category set to C++
  • Target version set to rsb-0.13

#2 Updated by J. Wienke about 8 years ago

Seems to be right. This requires changes in the RSC plugin manager, which doesn't seem to expose this kind of error so far.

#3 Updated by J. Wienke about 8 years ago

  • Status changed from New to In Progress
  • Assignee set to J. Wienke

The configurator, not the manager swallows this exception.

#4 Updated by J. Wienke about 8 years ago

  • % Done changed from 0 to 50

I have a working solution for that but it requires an API change in RSC. Will have to review that on Monday with Jan.

#5 Updated by J. Wienke about 8 years ago

  • Blocked by Tasks #2488: Plugin configurator should be able to report missing plugins added

#6 Updated by J. Wienke about 8 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 50 to 100

Also available in: Atom PDF