[PyQt] PyQt & Twisted
Christian Caron
ccaron at fattoc.com
Fri Oct 9 23:40:51 BST 2009
I used to have this crash rather infrequently but it got more frequent
when I moved to PyQt 4.6 / Snow Leopard.
Configuration
---------------------
Mac OSX 10.6.1
Qt 4.5.3
sip-4.9.1-snapshot-20091007
PyQt-mac-gpl-4.6.1-snapshot-20091007
Crash
-----------
My investigation so far shows that PyQtProxy::unislot deletes memory
that was already deleted (in attempting to self destruct).
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000028
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 QtCore.so 0x00000001030db619
PyQtProxy::unislot(void**) + 133
1 QtCore.so 0x00000001030db6f5
PyQtProxy::qt_metacall(QMetaObject::Call, int, void**) + 119
2 QtCore 0x00000001005c1183
QMetaObject::activate(QObject*, int, int, void**) + 675
3 QtCore.so 0x000000010302ae97
sipQTimer::timerEvent(QTimerEvent*) + 77
4 QtCore 0x00000001005bf19e QObject::event
(QEvent*) + 446
5 QtCore.so 0x000000010302ae2d sipQTimer::event
(QEvent*) + 77
6 QtGui 0x00000001019fd3ed
QApplicationPrivate::notify_helper(QObject*, QEvent*) + 189
7 QtGui 0x0000000101a0405e
QApplication::notify(QObject*, QEvent*) + 238
8 QtGui.so 0x000000010136e1d1
sipQApplication::notify(QObject*, QEvent*) + 95
9 QtCore 0x00000001005aec3c
QCoreApplication::notifyInternal(QObject*, QEvent*) + 124
Repro
-----------
Using the qt4reactor found here: http://twistedmatrix.com/trac/browser/sandbox/therve/qt4reactor.py?rev=22736&format=txt
You may need to run the program a few times for it to crash.
import qt4reactor
qt4reactor.install()
# Control-C
from twisted.internet import reactor
import signal; signal.signal(signal.SIGINT, lambda *args:reactor.stop())
# Get web page.
from twisted.web import client
url = 'http://www.google.com'
client.getPage(url)
reactor.run()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20091009/ac0ab365/attachment.html
More information about the PyQt
mailing list