[PyQt] Segfault with 5.9 snapshot when connecting to destroyed signal
me at the-compiler.org
Tue Jun 6 16:20:49 BST 2017
On Tue, Jun 06, 2017 at 03:34:12PM +0100, Phil Thompson wrote:
> On 5 Jun 2017, at 10:42 pm, Florian Bruhin <me at the-compiler.org> wrote:
> > Hi,
> > the attached script works fine with PyQt 5.8, but segfaults with the
> > current 5.9 snapshot. This is a simplified version of pytest-qt's
> > SignalBlocker: http://pytest-qt.readthedocs.io/en/latest/signals.html
> > The "self.args = args" saves a reference to the to-be-destroyed object,
> > which probably triggers this in some way - saving the arguments is done
> > as a general thing here though. It's probably a bit unorthodox, but
> > still shouldn't segfault I guess?
> Should be fixed in tonight's PyQt snapshot.
> Current snapshots have additional code to detect when certain objects
> get destroyed. This is deceptively difficult to get right (as you have
> found). I'd appreciate any testing you can do with the snapshots
> before the v5.9 release.
Thanks! Another thing I've noticed is with code like this:
def __init__(self, parent=None):
self._replies = 
def createRequest(self, *args):
reply = super().createRequest(*args)
I suddenly got "ValueError: list.remove(x): x not in list" with the
snapshot which I didn't with 5.8.
I ended up just removing that reply tracking because I didn't need it
anymore, but now I wonder whether that's expected. I'm guessing the
argument of the destroyed signal doesn't compare equal to what I
stored earlier anymore?
Let me know if you need a minimal example and I'll see if I can write one.
Other than that, my (pretty big) testsuite for qutebrowser passed
https://www.qutebrowser.org | me at the-compiler.org (Mail/XMPP)
GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
I love long mails! | https://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: not available
More information about the PyQt