Hi,

replying to another post from here I "accidentally stumbled" accross the
following segfault (testcase attached):

#0  0x00000369 in ?? ()
#1  0xb729530f in QTreeModel::clear (this=0x835f1d8) at 
itemviews/qtreewidget.cpp:96
#2  0xb72958d8 in ~QTreeModel (this=0x835f1d8) at itemviews/qtreewidget.cpp:79
#3  0xb6ee5e6e in ~QWidget (this=0x835cff8) at kernel/qwidget.cpp:1073
#4  0xb7147619 in ~QFrame (this=0x835cff8) at widgets/qframe.cpp:212
#5  0xb71d160d in ~QAbstractScrollArea (this=0x835cff8)
    at widgets/qabstractscrollarea.cpp:277
#6  0xb722e969 in ~QAbstractItemView (this=0x835cff8)
    at itemviews/qabstractitemview.cpp:429
#7  0xb725d435 in ~QTreeView (this=0x835cff8) at itemviews/qtreeview.cpp:132
#8  0xb7290797 in ~QTreeWidget (this=0x835cff8) at 
itemviews/qtreewidget.cpp:1828
#9  0xb75bd1e1 in ~sipQTreeWidget (this=0x835cff8) at sipQtGuipart0.cpp:19283
#10 0xb6ee5e6e in ~QWidget (this=0x835b718) at kernel/qwidget.cpp:1073
#11 0xb7924b03 in ~sipQWidget (this=0x835b718) at sipQtGuipart3.cpp:84230
#12 0xb7937bb1 in release_QWidget (ptr=0x835b718, state=6) at 
sipQtGuipart3.cpp:91538
#13 0xb7937c18 in dealloc_QWidget (sipSelf=0xb7c94b8c) at 
sipQtGuipart3.cpp:91551
#14 0xb7f6ca9a in sipWrapper_dealloc (self=0xb7c94b8c) at siplib.c:6073
#15 0x08099a6b in subtype_dealloc (self=0xb7c94b8c) at Objects/typeobject.c:703
#16 0x080897d9 in _Py_Dealloc (op=0xb7c94b8c) at Objects/object.c:1869
#17 0x08080e80 in insertdict (mp=0xb7cd7e94, key=0xb7cc8370, hash=-1947823370,
    value=0x8150e88) at Objects/dictobject.c:397
#18 0x0808145b in PyDict_SetItem (op=0xb7cd7e94, key=0xb7cc8370, 
value=0x8150e88)
    at Objects/dictobject.c:551
#19 0x0812d492 in _PyModule_Clear (m=0xb7cb71b4) at Objects/moduleobject.c:136
---Type <return> to continue, or q <return> to quit---
#20 0x080f148d in PyImport_Cleanup () at Python/import.c:396
#21 0x080fcf8f in Py_Finalize () at Python/pythonrun.c:352
#22 0x080560dc in Py_Main (argc=2, argv=0xbfb87a54) at Modules/main.c:504
#23 0x08055402 in main (argc=2, argv=0xbfb87a54) at Modules/python.c:23

Am I doing something wrong or is this a bug?

Andreas

-- 
You will stop at nothing to reach your objective, but only because your
brakes are defective.
from PyQt4.QtGui import *
from PyQt4 import QtCore

class mywid(QWidget):
	def __init__(self, parent=None):
		QWidget.__init__(self, parent)
		self.tree=QTreeWidget()
		self.tree.setColumnCount(1)
		self.lay=QVBoxLayout(self)
		self.lay.addWidget(self.tree)
		item=QTreeWidgetItem(self.tree)
		item.setText(0, "ROOT")
		item2=QTreeWidgetItem(self.tree)
		item2.setText(0, "ITEM2")
		item.addChild(item2)
		self.tree.addTopLevelItem(item)
		self.connect(self.tree, QtCore.SIGNAL("itemSelectionChanged()"), self.treeSel)
	
	def treeSel(self):
		print "Selection"

import sys
app=QApplication(sys.argv)
w=mywid()
QtCore.QObject.connect(w, QtCore.SIGNAL("close()"), app.quit)
w.show()
app.exec_()
_______________________________________________
PyKDE mailing list    [email protected]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Reply via email to