[PyQt] Deadlock when endResetModel() triggers QQuickImageProvider asynchronously

Phil Thompson phil at riverbankcomputing.com
Thu Mar 16 12:39:10 GMT 2017


On 16 Mar 2017, at 12:07 pm, Milorad Pop-Tosic <pop at hiri.com> wrote:
> 
> Hi,
> 
> We're experiencing a deadlock when resetting a list model assigned to a QML ListView which in the delegate has an Image that calls QQuickImageProvider with asynchronous: true. Theexecution never reaches requestImage in  QImageProvider. If asynchronous is false, everything works fine.
> 
> I also tried subclassing QQuickAsyncImageProvider, but that behaves the same.
> 
> The same example in C++ seems to work.
> 
> The gist is here: https://gist.github.com/poptosic/b341511d3a0a6b7f09278ce5da7e20e7
> 
> Tested on PyQt5.8.1 on Windows.
> 
> Are we doing something wrong here?

It should be fixed in tonight's snapshot. In the meantime you can just add /ReleaseGIL/ to the beginResetModel() and endResetModel() methods of QAbstractItemModel in qabstractitemmodel.sip.

Thanks,
Phil


More information about the PyQt mailing list