Skip to content

[src] Add SofaUtils to add static method to get paths depending on the OS#257

Open
epernod wants to merge 6 commits into
mainfrom
mac_fix
Open

[src] Add SofaUtils to add static method to get paths depending on the OS#257
epernod wants to merge 6 commits into
mainfrom
mac_fix

Conversation

@epernod
Copy link
Copy Markdown
Contributor

@epernod epernod commented May 27, 2026

No description provided.

@epernod epernod added pr: fix pr: status to review To notify reviewers to review this pull-request labels May 27, 2026
@epernod epernod requested a review from PierreFonda3D May 28, 2026 07:05
@epernod
Copy link
Copy Markdown
Contributor Author

epernod commented May 28, 2026

@PierreFonda3D could you test if this doesn't break the windows build

@PierreFonda3D
Copy link
Copy Markdown
Contributor

PierreFonda3D commented Jun 1, 2026

whithout mofication i have this :
image
I think i have to manually create the windows folder i will check that asap

@epernod
Copy link
Copy Markdown
Contributor Author

epernod commented Jun 1, 2026

whithout mofication i have this : image I think i have to manually create the windows folder i will check that asap

yes the windows path is now: "/SofaUnity/Core/Plugins/Native/Windows/x64/" Windows folder level has been added

@PierreFonda3D
Copy link
Copy Markdown
Contributor

Okay works fine with basique scene (liver.scn) for a windows build. Do i do more tests with python or more complicated scenes ?

@epernod
Copy link
Copy Markdown
Contributor Author

epernod commented Jun 1, 2026

Okay works fine with basique scene (liver.scn) for a windows build. Do i do more tests with python or more complicated scenes ?

maybe just the liver.py in Editor then Build mode

@PierreFonda3D
Copy link
Copy Markdown
Contributor

PierreFonda3D commented Jun 3, 2026

so thi still broke in build mode for python files , il will take some note of what i'm testing here :

  • I was thinking this might come from the "RegenerateSofaIni()" function but i have this print so it seemes to work well [SofaUnity] sofa.ini regenerated at: C:/projects/Unity3D/Builds/toto/LnRoboticsSimulator_Data/SofaUnity/Core/Plugins/Native/Windows/x64/sofa.ini
  • The python plugin is well loaded "Loaded plugin SofaPython3"
  • Scene and mesh are in the build

@epernod
Copy link
Copy Markdown
Contributor Author

epernod commented Jun 3, 2026

so thi still broke in build mode for python files , il will take some note of what i'm testing here :

  • I was thinking this might come from the "RegenerateSofaIni()" function but i have this print so it seemes to work well [SofaUnity] sofa.ini regenerated at: C:/projects/Unity3D/Builds/toto/LnRoboticsSimulator_Data/SofaUnity/Core/Plugins/Native/Windows/x64/sofa.ini
  • The python plugin is well loaded "Loaded plugin SofaPython3"
  • Scene and mesh are in the build

So what is the behavior? Liver not showing up? can you put the full log here

@PierreFonda3D
Copy link
Copy Markdown
Contributor

PierreFonda3D commented Jun 3, 2026

Blanc no liver loaded , error log isn't saying mutch : https://1drv.ms/t/c/be5f27fe3492f55f/IQCezkjZSMACTrCXTpRv-aPyAePF_5MCFA6xOhGNxGAI7k8?e=HtspRJ
Claude :
🟡 Problème 1 — La scène SOFA ne charge pas (silencieux mais fatal)
Regarde la séquence dans le log :
sofa.ini regenerated ✅
SofaPython3.dll chargé ✅
... tous les plugins chargés ✅
SofaDAGNodeManager Error: 4 DAGNode found in Unity instead of 1 from SOFA side ❌
SOFA n'a construit qu'1 nœud alors qu'Unity en attend 4 (root@Liver, Liver@Surf, Liver@Visu, MeshOBJLoader). Ça veut dire que la scène Python a échoué silencieusement — elle n'a pas chargé correctement, SOFA a créé un graphe vide/minimal, et Unity ne peut pas

🔴 Problème 2 — NullReferenceException dans RepairDAGNodeGraph
NullReferenceException at SofaDAGNodeManager.RepairDAGNodeGraph() line 501
→ SofaDAGNode.DestroyDAGNode()
→ SofaBaseComponent.DestroyComponent()
→ Component.get_gameObject()
C'est une conséquence directe du Problème 1 — Unity tente de détruire les GameObjects SOFA qui ne se sont pas reconnectés, mais certains sont déjà null ou partiellement détruits. Ce crash disparaîtra une fois que la scène chargera correctement.

@epernod
Copy link
Copy Markdown
Contributor Author

epernod commented Jun 3, 2026

ok I found the issue:

[SofaUnity] sofa.ini regenerated at: C:/projects/Unity/Builds/PythonTest/SurgiVi4D_Ultrasound_Data/SofaUnity/Core/Plugins/Native/x64/sofa.ini
...

(Filename: C:/projects/Unity/SofaUnity_SurgiViz4D/Assets/SofaUnity/Core/Plugins/SofaUnityAPI/SofaContextAPI.cs Line: 154)

[SofaUnity] loading sofa.ini at: C:/projects/Unity/Builds/PythonTest/SurgiVi4D_Ultrasound_Data/Plugins/x86_64/sofa.ini

@epernod
Copy link
Copy Markdown
Contributor Author

epernod commented Jun 3, 2026

should be working now @PierreFonda3D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: fix pr: status to review To notify reviewers to review this pull-request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants