[PyQt] Deadlock when endResetModel() triggers QQuickImageProvider asynchronously

Milorad Pop-Tosic pop at hiri.com
Thu Mar 16 16:40:09 GMT 2017


That did the trick. Thanks a lot!

________________________________
From: Phil Thompson <phil at riverbankcomputing.com>
Sent: Thursday, March 16, 2017 12:39:10 PM
To: Milorad Pop-Tosic
Cc: pyqt at riverbankcomputing.com
Subject: Re: [PyQt] Deadlock when endResetModel() triggers QQuickImageProvider asynchronously

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170316/f824d692/attachment.html>


More information about the PyQt mailing list