[PyQt] Freeze when pyqtsignal transport objects

oliver oliver.schoenborn at gmail.com
Sat Sep 26 12:59:35 BST 2015


My understanding was that pyqt signals could carry any type of python
object across Qt threads. But we have found that if we define signals to
carry user-defined types, we get crashes. The crashes disappear if we stop
using styled frame for our widgets that get rendered in a graphics scene,
OR if we ensure that all our signals use only built-in types like string
and int etc. The crashes are intermittent but statistically consistent: we
have a script that runs a test app over and over, and over N runs, the
average % crashes will be the same every time we run N runs, although when
they happen is unpredictable. For example if the crash rate is 5% for a
given test for 1000 runs, about 50 runs will crash every time we run 1000
runs. The test app was created by gradually pairing down our app, removing
code that did not remove the crashes (but the crash rate did decrease
gradually). Got it down to twos line of code which cause crash, changing
#either# one of them makes the crash % go from 1% to 0 for 10000 runs done
a few times, so i believe the 0% is real, not just luck. One line is a
pyqtsignal line, if we emit simple object instead of list get 0%; the other
is framed style, with style string taken from exame qt code. If we emit the
signal more often the crash % increases. Anyone else seen this kind of
weird problem?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150926/b8630fec/attachment.html>


More information about the PyQt mailing list