[Python-modules-team] Bug#588556: python-pyside.qtgui: diagramscene.py from pyside-examples coredumps
Kirill Smelkov
kirr at landau.phys.spbu.ru
Fri Jul 9 16:23:10 UTC 2010
Package: python-pyside.qtgui
Version: 0.3.2-3
Severity: normal
I've tried recently-migrated-to-testing PySide on pyside-examples [1]
repository and discovered that graphicsview/diagramscene/diagramscene.py
coredumps (with both python2.5 & python2.6):
$ ./diagramscene.py
Segmentation fault (core dumped)
I've tracked this down to a smaller script which is below:
---- 8< d.py ----
#!/usr/bin/env python
# trimmed down diagramscene.py to demonstrate crash in sizeHint()
import sys
from PySide import QtCore, QtGui
class MainWindow(QtGui.QMainWindow):
def __init__(self):
QtGui.QMainWindow.__init__(self)
self.crashme()
def crashme(self):
layout = QtGui.QGridLayout()
textLayout = QtGui.QGridLayout()
textLayout.addWidget(QtGui.QLabel("Text"), 1, 0, QtCore.Qt.AlignCenter)
textWidget = QtGui.QWidget()
textWidget.setLayout(textLayout)
layout.addWidget(textWidget, 1, 1)
itemWidget = QtGui.QWidget()
itemWidget.setLayout(layout)
# this crashes
h = itemWidget.sizeHint()
if __name__ == "__main__":
app = QtGui.QApplication(sys.argv)
mainWindow = MainWindow()
mainWindow.setGeometry(100, 100, 800, 500)
mainWindow.show()
sys.exit(app.exec_())
---- 8< -----
The backtrace (without -dbg packages installed) is
Program received signal SIGSEGV, Segmentation fault.
0xb5a8df09 in QWidgetItem::isEmpty() const () from /usr/lib/libQtGui.so.4
(gdb) bt
#0 0xb5a8df09 in QWidgetItem::isEmpty() const () from /usr/lib/libQtGui.so.4
#1 0xb5a8e7f8 in QWidgetItemV2::minimumSize() const () from /usr/lib/libQtGui.so.4
#2 0xb5a81dfa in ?? () from /usr/lib/libQtGui.so.4
#3 0xb5a82d21 in ?? () from /usr/lib/libQtGui.so.4
#4 0xb5a82fff in ?? () from /usr/lib/libQtGui.so.4
#5 0xb5a83073 in QGridLayout::sizeHint() const () from /usr/lib/libQtGui.so.4
#6 0xb6711417 in ?? () from /usr/lib/pymodules/python2.6/PySide/QtGui.so
#7 0xb5a89a38 in QLayout::totalSizeHint() const () from /usr/lib/libQtGui.so.4
#8 0xb5aa3ce3 in QWidget::sizeHint() const () from /usr/lib/libQtGui.so.4
#9 0xb6b36497 in ?? () from /usr/lib/pymodules/python2.6/PySide/QtGui.so
#10 0xb5a8d803 in QWidgetItemV2::updateCacheIfNecessary() const () from /usr/lib/libQtGui.so.4
#11 0xb5a8e840 in QWidgetItemV2::minimumSize() const () from /usr/lib/libQtGui.so.4
#12 0xb5a81dfa in ?? () from /usr/lib/libQtGui.so.4
#13 0xb5a82d21 in ?? () from /usr/lib/libQtGui.so.4
#14 0xb5a82fff in ?? () from /usr/lib/libQtGui.so.4
#15 0xb5a83073 in QGridLayout::sizeHint() const () from /usr/lib/libQtGui.so.4
#16 0xb6711417 in ?? () from /usr/lib/pymodules/python2.6/PySide/QtGui.so
#17 0xb5a89a38 in QLayout::totalSizeHint() const () from /usr/lib/libQtGui.so.4
#18 0xb5aa3ce3 in QWidget::sizeHint() const () from /usr/lib/libQtGui.so.4
#19 0xb6b42a23 in ?? () from /usr/lib/pymodules/python2.6/PySide/QtGui.so
#20 0x080e0f2c in PyEval_EvalFrameEx ()
#21 0x080e1b40 in PyEval_EvalFrameEx ()
#22 0x080e2797 in PyEval_EvalCodeEx ()
#23 0x0816bb3c in ?? ()
#24 0x0806232a in PyObject_Call ()
#25 0x0806a311 in ?? ()
#26 0x0806232a in PyObject_Call ()
#27 0x080b50a4 in ?? ()
#28 0x080acd45 in ?? ()
#29 0x0806232a in PyObject_Call ()
#30 0x080e03fb in PyEval_EvalFrameEx ()
#31 0x080e2797 in PyEval_EvalCodeEx ()
#32 0x080e2897 in PyEval_EvalCode ()
#33 0x080fff4d in PyRun_FileExFlags ()
#34 0x081001b2 in PyRun_SimpleFileExFlags ()
#35 0x0805dd81 in Py_Main ()
#36 0x0805cf6b in main ()
Also the following examples coredumps in the same way (judging by backtrace):
- layouts/{basiclayouts,flowlayout}.py
- widgets/movie/movie.py
- widgets/groupbox.py
- widgets/tetrix.py
Thanks,
Kirill
[1] http://qt.gitorious.org/pyside/pyside-examples
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.33.6-roro-00002-gf825b2a-dirty (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages python-pyside.qtgui depends on:
ii libc6 2.11.2-2 Embedded GNU C Library: Shared lib
ii libgcc1 1:4.4.4-6 GCC support library
ii libpyside0.3 0.3.2-3 Python bindings for Qt 4 (base fil
ii libpython2.6 2.6.5+20100630-2 Shared Python runtime library (ver
ii libqtcore4 4:4.6.3-1 Qt 4 core module
ii libqtgui4 4:4.6.3-1 Qt 4 GUI module
ii libshiboken0.3 0.3.2-2 CPython bindings generator for C++
ii libstdc++6 4.4.4-6 The GNU Standard C++ Library v3
ii python 2.6.5-5 An interactive high-level object-o
ii python-support 1.0.9 automated rebuilding support for P
ii python2.5 2.5.5-6 An interactive high-level object-o
python-pyside.qtgui recommends no packages.
python-pyside.qtgui suggests no packages.
-- no debconf information
More information about the Python-modules-team
mailing list