[PyQt] Python has stopped working in PyQt application

Florian Bruhin me at the-compiler.org
Tue Mar 31 13:24:36 BST 2015


* redstone-cold <redstone-cold at 163.com> [2015-03-31 09:45:49 +0800]:
> code here 
> https://bpaste.net/show/7a73adda2a4b
> 
> 
> After it  running for about half a minute ,then close the window,
> then the "Python has stopped working" dialog pops up(you had better
> try more than once. )
>
>  I wonder why this happen ?any solution to this ?

Seems like the crash happens in QObject::thread() when exiting Python.

It seems it doesn't happen anymore when doing:

    import sip
    sip.setdestroyonexit(False)

See:
http://pyqt.sourceforge.net/Docs/sip4/python_api.html#sip.setdestroyonexit

This is also the default with PyQt5 where I also can't reproduce the
crash.

Florian

-- 
http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | 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/20150331/04f8e397/attachment.sig>


More information about the PyQt mailing list