[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Deadlock when endResetModel() triggers QQuickImageProvider asynchronously
From:       Milorad Pop-Tosic <pop () hiri ! com>
Date:       2017-03-16 16:40:09
Message-ID: AMSPR06MB1668483E9F55FF74640607FC0260 () AMSPR06MB166 ! eurprd06 ! prod ! outlook ! com
[Download RAW message or body]

That did the trick. Thanks a lot!

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

On 16 Mar 2017, at 12:07 pm, Milorad Pop-Tosic <pop@hiri.com> wrote:
>
> Hi,
>
> We're experiencing a deadlock when resetting a list model assigned to a Q=
ML ListView which in the delegate has an Image that calls QQuickImageProvid=
er with asynchronous: true. Theexecution never reaches requestImage in  QIm=
ageProvider. If asynchronous is false, everything works fine.
>
> I also tried subclassing QQuickAsyncImageProvider, but that behaves the s=
ame.
>
> The same example in C++ seems to work.
>
> The gist is here: https://gist.github.com/poptosic/b341511d3a0a6b7f09278c=
e5da7e20e7
>
> 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 QAbstr=
actItemModel in qabstractitemmodel.sip.

Thanks,
Phil

[Attachment #3 (text/html)]

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: \
4pt; border-left: #800000 2px solid; } --></style> </head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
	{margin-top:0;
	margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; \
font-family:Calibri,Arial,Helvetica,sans-serif"> <p><span style="font-size:12pt">That \
did the trick. Thanks a lot!</span><br> </p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" \
style="font-size:11pt"><b>From:</b> Phil Thompson \
&lt;phil@riverbankcomputing.com&gt;<br> <b>Sent:</b> Thursday, March 16, 2017 \
12:39:10 PM<br> <b>To:</b> Milorad Pop-Tosic<br>
<b>Cc:</b> pyqt@riverbankcomputing.com<br>
<b>Subject:</b> Re: [PyQt] Deadlock when endResetModel() triggers QQuickImageProvider \
asynchronously</font> <div>&nbsp;</div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">On 16 Mar 2017, at 12:07 pm, Milorad Pop-Tosic \
&lt;pop@hiri.com&gt; wrote:<br> &gt; <br>
&gt; Hi,<br>
&gt; <br>
&gt; 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&nbsp; QImageProvider. \
If asynchronous is  false, everything works fine.<br>
&gt; <br>
&gt; I also tried subclassing QQuickAsyncImageProvider, but that behaves the \
same.<br> &gt; <br>
&gt; The same example in C&#43;&#43; seems to work.<br>
&gt; <br>
&gt; The gist is here: <a \
href="https://gist.github.com/poptosic/b341511d3a0a6b7f09278ce5da7e20e7"> \
https://gist.github.com/poptosic/b341511d3a0a6b7f09278ce5da7e20e7</a><br> &gt; <br>
&gt; Tested on PyQt5.8.1 on Windows.<br>
&gt; <br>
&gt; Are we doing something wrong here?<br>
<br>
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.<br> <br>
Thanks,<br>
Phil</div>
</span></font>
</body>
</html>


[Attachment #4 (unknown)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic