[Bug 584713] [NEW] PyQt4 crashes when destroying QApplication in trivial program

Brian Crowell brian at fluggo.com
Sun May 23 20:03:07 UTC 2010


Public bug reported:

Binary package hint: python-qt4

PyQt4 crashes most of the time when exiting the program below. (This is
NOT a dupe of #561303.)

A stack trace shows that it dies when trying to destroy the QApplication
object when removing it from the module's dictionary:

#0  0x00000000 in ?? ()
#1  0x0507d157 in ?? () from /usr/lib/pymodules/python2.6/PyQt4/QtGui.so
#2  0x0507d21f in ?? () from /usr/lib/pymodules/python2.6/PyQt4/QtGui.so
#3  0x003efbab in ?? () from /usr/lib/pymodules/python2.6/sip.so
#4  0x003efbe1 in ?? () from /usr/lib/pymodules/python2.6/sip.so
#5  0x080ab5c3 in subtype_dealloc (self=<unknown at remote 0x3fdff4>) at ../Objects/typeobject.c:1019
#6  0x0808ecd9 in insertdict (mp=0xb77f924c, key='app', hash=-1582925558, value=None) at ../Objects/dictobject.c:459
#7  0x08091037 in PyDict_SetItem (op=
    {'QAbstractButton': None, 'QSizePolicy': None, 'QMatrix3x4': None, 'QMatrix3x3': None, 'QMatrix3x2': None, 'QGraphicsColorizeEffect': None, 'qRound64': None, 'QSizeGrip': None, 'QStyleOptionComboBox': None, 'QStringListModel': None, 'QAbstractSpinBox': None, 'QTreeView': None, 'QWorkspace': None, 'QPoint': None, 'QFontComboBox': None, 'QGraphicsTextItem': None, 'QSyntaxHighlighter': None, 'QGraphicsRectItem': None, 'QSpacerItem': None, 'QModelIndex': None, 'QLocale': None, 'QFinalState': None, 'QGraphicsPixmapItem': None, 'QStyle': None, 'QX11EmbedContainer': None, 'QMutexLocker': None, 'QClipboard': None, 'QInputContext': None, 'uppercasebase': None, 'QtSystemMsg': None, 'QWhatsThisClickedEvent': None, 'QSwipeGesture': None, 'QPicture': None, 'QAbstractTransition': None, 'QTextLength': None, 'QTextOption': None, 'QMessageBox': None, 'QGesture': None, 'QFileSystemWatcher': None, 'QGestureEvent': None, 'qIsNull': None, 'QTime': None, 'PyQt4': None, 'qBlue': None, 'QStyleOptionViewItemV4': None, 'QtMsgType': No...(truncated), key='app', value=None) at ../Objects/dictobject.c:701
#8  0x08092cb3 in _PyModule_Clear (m=<module at remote 0xb77c711c>) at ../Objects/moduleobject.c:138
#9  0x080f2c55 in PyImport_Cleanup () at ../Python/import.c:441
#10 0x080ffdec in Py_Finalize () at ../Python/pythonrun.c:438
#11 0x0805d826 in Py_Main (argc=2, argv=0xbf913084) at ../Modules/main.c:596
#12 0x0805d03b in main (argc=2, argv=0xbf913084) at ../Modules/python.c:23

(by the way, python-qt4-dbg is installed, that doesn't seem to make a
difference with the unknown symbols above)

If the line that creates the file menu is removed, the program exits
cleanly.

# Python
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import sys

class MainWindow(QMainWindow):
    def __init__(self):
        QMainWindow.__init__(self)
        self.file_menu = self.menuBar().addMenu('&File')

app = QApplication(sys.argv)

window = MainWindow()
window.show()

quit(app.exec_())

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: python-qt4 4.7.2-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.32-22.33-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-generic i686
Architecture: i386
Date: Sun May 23 14:53:26 2010
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: python-qt4

** Affects: python-qt4 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apport-bug i386 lucid

-- 
PyQt4 crashes when destroying QApplication in trivial program
https://bugs.launchpad.net/bugs/584713
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to python-qt4 in ubuntu.




More information about the kubuntu-bugs mailing list