Confusing error message when loading backend twice

Open
#75 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
backend

Research direction

Start by tracing the plugin-loading path that checks whether the number of registered backends increased, then inspect how backend constructor creator functions are registered. Reproduce loading the same backend twice and confirm that an already-registered backend no longer produces the misleading invalid-plugin error.

Written by the indexing model from the issue text.

Description

bug

When loading a backend twice, it is only registered the first time, which is ok because it is already known.
However, an error message is printed:

Error: Caught exception loading plugin '/export/doocs/server/llrfCtrl_server/libChimeraTK-DeviceAccess-DoocsBackend.so' specified in dmap file: '/export/doocs/server/llrfCtrl_server/libChimeraTK-DeviceAccess-DoocsBackend.so' is not a valid DeviceAccess plugin, it does not register any backends!
Some backends will not be available!

Although this will change when the plugin loading mechanism is changes, this is confusing and should be fixed. One could add a function to the backend which checks if the constructor creator function is already registered, instread of just checking that the count of registered backends has increased, which is not true in this case.

Dominant language
C++
Stars
12
Forks
12
Avg merge
2d 14h
Merged PRs (30d)
13

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ChimeraTK/DeviceAccess

All issues in ChimeraTK/DeviceAccess

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.