Spine Toolbox is an open source Python package to manage data, scenarios and workflows for modelling and simulation. You can have your local workflow, but work as a team through version control and SQL databases.
As I was testing my implementation for #2046, I frequently encountered segmentation faults.
I'm working on Windows with Python 3.10.11. These segfaults occur both when starting the program from the 'git bash' terminal, as well as when starting from within PyCharm. If anything, starting from PyCharm seems to make it easier to segfault.
The following steps have frequently (but not always) led to a crash:
Open spinetoolbox
In a new project, create an importer
Open the importre specification editor, selecting any connector
Create one or two source table entries (e.g. 'a' and 'b')
Switch back and forth between different source table entries a few times
Remove all mappings from source table entry 'a'
Shortly after, 'spam-click' the 'Add' button to add new mappings.
Program hangs for a moment and crashes, reporting only a segmentation fault (besides the IndexError reported in #2119 )
$ spinetoolbox
TypeError: print_exception(): Exception expected for value, str found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Sander\src\Spine-Toolbox\src\spine-items\spine_items\importer\widgets\import_mappings.py", line 171, in _change_flattened_mappings
if not current.isValid():
File "C:\Users\Sander\src\Spine-Toolbox\src\spine-items\spine_items\importer\mvcmodels\mappings_model.py", line 410, in parent
index_item = index.internalPointer()
File "C:\Users\Sander\src\Spine-Toolbox\src\spine-items\spine_items\importer\mvcmodels\mappings_model.py", line 410, in parent
index_item = index.internalPointer()
File "C:\Users\Sander\src\Spine-Toolbox\src\spine-items\spine_items\importer\mvcmodels\mappings_model.py", line 410, in parent
index_item = index.internalPointer()
[Previous line repeated 1 more time]
File "C:\Users\Sander\src\Spine-Toolbox\src\spine-items\spine_items\importer\mvcmodels\mappings_model.py", line 372, in index
return self.createIndex(row, 0, parent_item.mapping_list[row])
IndexError: list index out of range # <-- This error triggers on selecting '<rename this to add table>' to create 'b'
QAbstractItemView::closeEditor called with an editor that does not belong to this view # <-- This triggered on naming 'b'
Segmentation fault # <-- Only output when the program crashes
We do have a segmentation fault lurking somewhere. It appears randomly when our github action runs the unit tests. I haven't been able to reproduce it so I hope this is it. Good luck @sjvrijn!
As I was testing my implementation for #2046, I frequently encountered segmentation faults. I'm working on Windows with Python 3.10.11. These segfaults occur both when starting the program from the 'git bash' terminal, as well as when starting from within PyCharm. If anything, starting from PyCharm seems to make it easier to segfault.
The following steps have frequently (but not always) led to a crash:
Installed package version details:
Are you using Anaconda? If so, see this section in README.md.
We do have a segmentation fault lurking somewhere. It appears randomly when our github action runs the unit tests. I haven't been able to reproduce it so I hope this is it. Good luck @sjvrijn!
I'm not using Anaconda, just regular Python.
@sjvrijn Can this be closed?