-
Notifications
You must be signed in to change notification settings - Fork 52
Description
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.
-
runSofaseems to pre-load plugins, includingSofaPython3, and adding it again inRequiredPlugindoes not cause issues. -
However, when running a standalone Python script that uses Sofa, explicitly adding
SofaPython3as aRequiredPluginleads 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
-
OS: Ubuntu 24.04
-
Python Version: Python 3.12.3
-
SOFA Version: 24.12
-
SofaPython3 Version: 24.12