Personal tools
You are here: Home Forum Install & build YACS genericGui::CatalogWidget::addCatalogFromFile bugfix

YACS genericGui::CatalogWidget::addCatalogFromFile bugfix

Up to Install & build

YACS genericGui::CatalogWidget::addCatalogFromFile bugfix

Posted by Gregor Simic at July 20. 2020

Hello developers,


I tried using YACS and it always returned Segmentation Fault at 0x15 address. The OS-es that I tested it on was on Debian 10 and CentOS 8 (Compiled SALOME from sources). Even the provided distributions (at least for Debian 10) crashed when I tried activating the YACS module.


I do not know how much YACS is in use, but I am willing to have a go with it since I have parametric simulation study and I would like to see if YACS scripting is a viable option.


Long story short, debugging for a long time and having no C++ experience, the problem was simple. The  bool CatalogWidget::addCatalogFromFile returned nothing when it loaded a Catalog and for some reason it called the underlying CatalogWidget::addCatalog twice, with the second call having no initialized arguments, leading to UB. At least that is what valgrind reported. So adding a simple return true at the end of the function solves the problem. The module finally loads.


I've checked YACS git repository (9.5.0) and the code haven't changed. So attached is the patch file.


Another note: Running salome with the following options

./salome start --gdb-session

./salome start --ddd-session

Fails on Debian 10 due to miss-matched SRE versions in python modules. gdb and ddd uses system python which then tries to import packages from the SALOME environment and since the Python versions differ (3.7 from system and 3.6 from SALOME) these sessions fail to start.


Final question, any news about 9.5.0 release date?


Best regards



Re: YACS genericGui::CatalogWidget::addCatalogFromFile bugfix

Posted by Nabil Ghodbane at July 20. 2020

Thanks for the patch. It was submitted to our developers team for integration.

I confirm that there is a mismatch between SRE versions. Running salome  context and gdb returns:

    assert _sre.MAGIC == MAGIC, "SRE module mismatch"
    AssertionError: SRE module mismatch


You can follow the reply by Vadim, you can attach gdb to your SALOME session:

This can be achieved like:

# launch SALOME


# retrieve the pid of SALOME session server

ps -ef | grep SALOME_Session_Server

# run gdb and attach the pip


attach <pid of SALOME_Session_Server>

Powered by Ploneboard
Document Actions