Unexpected segfault appearing in PyQt6 6.9.1
Phil Thompson
phil at riverbankcomputing.com
Mon Nov 17 10:17:48 GMT 2025
On 16/11/2025 23:36, Jakub Fránek wrote:
> 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
I don't think there were any other changes than these...
https://www.riverbankcomputing.com/news/PyQt_v6.9.1_Released
Did you upgrade the PyQt6-Qt6 wheels at the same time?
Phil
More information about the PyQt
mailing list