Problem
Adding SofaPython3 as a RequiredPlugin causes a segmentation fault when running Python directly.
Description
I am writing a Python script for a scene I created, but I consistently encounter a segmentation fault at the finishing stage.
We identified that the issue occurs when including the SofaPython3 plugin as a RequiredPlugin.
-
runSofa seems to pre-load plugins, including SofaPython3, and adding it again in RequiredPlugin does not cause issues.
-
However, when running a standalone Python script that uses Sofa, explicitly adding SofaPython3 as a RequiredPlugin leads to a segmentation fault.
Steps to reproduce
Example script: test.py
import Sofa
import Sofa.Core
root = Sofa.Core.Node('rootNode')
root.addObject(
'RequiredPlugin', name='SofaPython3 Sofa.Component.AnimationLoop'
)
Running the script: python test.py results in a segmentation fault.
Removing SofaPython3 from the RequiredPlugin list prevents the crash.
Expected behavior
Listing SofaPython3 as a RequiredPlugin should be valid and not cause a crash, as it is an intuitive way to declare dependencies.
At least, a warning should be given beforehand to indicate potential conflicts or redundant plugin loading.
Environment