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,Helper] Prevent to create objects from unloaded plugins #4722

Merged
merged 6 commits into from
Aug 1, 2024

Conversation

alxbilger
Copy link
Contributor

@alxbilger alxbilger commented May 6, 2024

When a plugin is loaded, the ObjectFactory is populated of Components from this plugin. However, when this plugin is "unloaded", it was still possible to create a component from the plugin. This PR detects that the ObjectFactory tries to instantiate an object that is from an unloaded plugin.
It is particularly useful when the initialization of the plugin fails (SofaCUDA for example). When the initialization fails, the plugin is unloaded.
A unit test is provided


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

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@alxbilger alxbilger added the pr: status to review To notify reviewers to review this pull-request label May 6, 2024
@alxbilger alxbilger added this to the v24.06 milestone May 14, 2024
@bakpaul bakpaul added pr: status postponed To keep in mind that this PR was interesting but no one has time to make it mergeable now. and removed pr: status to review To notify reviewers to review this pull-request labels May 14, 2024
@bakpaul
Copy link
Contributor

bakpaul commented May 14, 2024

To be discussed at the STC.

@bakpaul bakpaul modified the milestones: v24.06, v24.12 May 27, 2024
@alxbilger alxbilger added pr: status to review To notify reviewers to review this pull-request pr: dev meeting topic PR to be discussed in sofa-dev meeting and removed pr: status postponed To keep in mind that this PR was interesting but no one has time to make it mergeable now. labels Jul 25, 2024
@alxbilger
Copy link
Contributor Author

[ci-build][with-all-tests]

@hugtalbot hugtalbot added the pr: clean Cleaning the code label Jul 29, 2024
@hugtalbot
Copy link
Contributor

else it looks good to me

@hugtalbot hugtalbot added pr: status wip Development in the pull-request is still in progress and removed pr: status to review To notify reviewers to review this pull-request pr: dev meeting topic PR to be discussed in sofa-dev meeting labels Jul 31, 2024
@fredroy
Copy link
Contributor

fredroy commented Aug 1, 2024

[ci-build][with-all-tests]

@fredroy fredroy added pr: status ready Approved a pull-request, ready to be squashed and removed pr: status wip Development in the pull-request is still in progress labels Aug 1, 2024
@fredroy
Copy link
Contributor

fredroy commented Aug 1, 2024

Tests are fixed, ready then 👮

@fredroy fredroy merged commit ff3931c into sofa-framework:master Aug 1, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: clean Cleaning the code pr: status ready Approved a pull-request, ready to be squashed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants