[PyQt] Segfault on exceptions in QNetworkAccessManager::createRequest

Florian Bruhin me at the-compiler.org
Thu Sep 25 10:13:09 BST 2014

* Phil Thompson <phil at riverbankcomputing.com> [2014-09-22 18:03:54 +0100]:
> On 16/09/2014 7:00 pm, Florian Bruhin wrote:
> >I noticed I get a segfault when there's an exception in
> >QNetworkAccessManager::createRequest.
> >
> >Is this a bug in PyQt? Or is it just a tricky situation maybe (wild
> >guesses following) because the code there is running in another
> >thread, and Qt expects to get a proper QNetworkRequest?
> >
> >An example script is attached.
> I think it's just that Qt expects a QNetworkRequest and doesn't handle a
> NULL pointer.

So PyQt returns NULL when an exception happens inside a Qt method, is
that correct?

I noticed when I returns an invalid return type (like False), I get
PyQt's TypeError as an exception without any segfault. What happens on
a C++ level there? Maybe other exceptions in there should be handled
the same way?


http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
             GPG 0xFD55A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140925/f4f01b28/attachment.sig>

More information about the PyQt mailing list