-
Notifications
You must be signed in to change notification settings - Fork 311
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
[Sofa.Helper] PluginManager: check if a plugin is already loaded with a different path #2352
Merged
epernod
merged 3 commits into
sofa-framework:master
from
fredroy:update_helper_pluginmanager
Sep 29, 2021
Merged
[Sofa.Helper] PluginManager: check if a plugin is already loaded with a different path #2352
epernod
merged 3 commits into
sofa-framework:master
from
fredroy:update_helper_pluginmanager
Sep 29, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fredroy
added
pr: fix
Fix a bug
pr: status to review
To notify reviewers to review this pull-request
labels
Sep 21, 2021
It will probably help to diagnose this issue #2338 |
alxbilger
reviewed
Sep 21, 2021
SofaKernel/modules/SofaHelper/src/sofa/helper/system/PluginManager.cpp
Outdated
Show resolved
Hide resolved
…ager.cpp Co-authored-by: Alex Bilger <alxbilger@users.noreply.github.com>
"déjà vu", no ? |
guparan
added
pr: status ready
Approved a pull-request, ready to be squashed
and removed
pr: status to review
To notify reviewers to review this pull-request
labels
Sep 29, 2021
damienmarchal
pushed a commit
to CRIStAL-PADR/sofa
that referenced
this pull request
Oct 11, 2021
… a different path (sofa-framework#2352) * add a check if plugin has already been loaded with a different path * Update SofaKernel/modules/SofaHelper/src/sofa/helper/system/PluginManager.cpp Co-authored-by: Alex Bilger <alxbilger@users.noreply.github.com> * fix compil Co-authored-by: Alex Bilger <alxbilger@users.noreply.github.com>
guparan
added
the
pr: backport todo
This PR will be backported into the release preceeding its milestone.
label
Oct 25, 2021
guparan
pushed a commit
that referenced
this pull request
Oct 25, 2021
… a different path (#2352) * add a check if plugin has already been loaded with a different path * Update SofaKernel/modules/SofaHelper/src/sofa/helper/system/PluginManager.cpp Co-authored-by: Alex Bilger <alxbilger@users.noreply.github.com> * fix compil Co-authored-by: Alex Bilger <alxbilger@users.noreply.github.com>
guparan
pushed a commit
that referenced
this pull request
Oct 26, 2021
… a different path (#2352) * add a check if plugin has already been loaded with a different path * Update SofaKernel/modules/SofaHelper/src/sofa/helper/system/PluginManager.cpp Co-authored-by: Alex Bilger <alxbilger@users.noreply.github.com> * fix compil Co-authored-by: Alex Bilger <alxbilger@users.noreply.github.com>
guparan
added
pr: backport done
This PR has been backported into the release before its milestone.
and removed
pr: backport todo
This PR will be backported into the release preceeding its milestone.
labels
Nov 4, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
pr: backport done
This PR has been backported into the release before its milestone.
pr: fix
Fix a bug
pr: status ready
Approved a pull-request, ready to be squashed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The case arises mostly because of running runSofa from a build directory but you set SOFA_ROOT. It will then tried to load plugins from the install afterwards, etc..., leading to stuff like:
or with a cryptic error message if you try to use the PluginManager from the GUI:
Now, if you try to load twice the plugins (from differents paths then), it will print:
(one dll is in
build/bin/Release/
and the other one directly inbuild/
The "double information" comes from the fact that in the end we consider the plugin as loaded ; the code afterwards will try to load the plugin nevertheless (hence having to detect twice the duplication)
In the GUI code for example:
sofa/modules/SofaGuiQt/src/sofa/gui/qt/SofaPluginManager.cpp
Line 120 in 7169130
Obviously it is really not advised to continue to use Sofa if this case occurs but at least the user will know what is going on.
By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).
Reviewers will merge this pull-request only if