Unexpected segfault appearing in PyQt6 6.9.1
Jakub Fránek
j.franek95 at gmail.com
Sun Nov 16 23:36:05 GMT 2025
Hello,
I made a PyQt application which has been working without any issues for
quite some time. I updated PyQt6 from 6.9.0 to 6.9.1 and only now I get a
segmentation fault related to mapping indices with a QSortFilterProxyModel
while the source model is being updated.
What my code did previously was something like this, in Pythonesque
pseudocode:
custom_source_model.beginResetModel()
custom_source_model.load_data(new_data)
source_index = custom_source_model.get_index(some_item)
proxy_index = proxy.mapFromSource(source_index) # crash occurs here
# irrelevant lines of code which utilize the proxy_index somehow...
custom_source_model.endResetModel()
My understanding is that what I did is incorrect and I should not perform
any operations on the proxy model while the main model is in reset. When I
postpone these index related operations until after the
custom_source_model.endResetModel() call, the segmentation fault does not
occur.
What I would like to know is, what changed in 6.9.1 that makes this
segmentation fault occur? The release notes do not document any change
which would explain this.
The reason why I am asking is twofold: 1) to fully explain the appearance
of this segfault in 6.9.1 and 2) to find out whether there are any other
hidden changes that could uncover pre-existing errors in my code.
Thank you very much.
Kind regards
Jakub
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20251117/5626ddf4/attachment.htm>
More information about the PyQt
mailing list