PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 134 - closeEditor() emission segfaults in QAbstractItemDelegate subclassing
: closeEditor() emission segfaults in QAbstractItemDelegate subclassing
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: QtGui
: HEAD
: All All
: P5 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2010-01-21 17:51 EET by Lauro Moura
Modified: 2010-05-04 18:43 EEST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lauro Moura 2010-01-21 17:51:08 EET
Example: tools/settingseditor.py

Backtrace:

Program received signal SIGSEGV, Segmentation fault.
QWidget::hasFocus (this=0x7ffff4b75710) at kernel/qwidget.cpp:5655
5655    kernel/qwidget.cpp: No such file or directory.
    in kernel/qwidget.cpp
Current language:  auto
The current source language is "auto; currently c++".
(gdb) where
#0  QWidget::hasFocus (this=0x7ffff4b75710) at kernel/qwidget.cpp:5655
#1  0x00007ffff3289584 in QAbstractItemView::closeEditor (this=0x13989e0,
editor=0x7ffff4b75710, hint=QAbstractItemDelegate::NoHint) at
itemviews/qabstractitemview.cpp:2468
#2  0x00007ffff432aeaa in qtreewidget_wrapper::closeEditor(QWidget*,
QAbstractItemDelegate::EndEditHint) () from
/opt/sandbox/lib/python2.6/site-packages/PySide/QtGui.so
#3  0x00007ffff3284319 in QAbstractItemView::qt_metacall (this=0x13989e0,
_c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffffffa750)
at .moc/release-shared/moc_qabstractitemview.cpp:238
#4  0x00007ffff32c8ca5 in QTreeView::qt_metacall (this=0x7ffff4b75710,
_c=4128294688, _id=0, _a=0xf4b7a8ef) at
.moc/release-shared/moc_qtreeview.cpp:124
#5  0x00007ffff32fed55 in QTreeWidget::qt_metacall (this=0x7ffff4b75710,
_c=4128294688, _id=0, _a=0xf4b7a8ef) at
.moc/release-shared/moc_qtreewidget.cpp:123
#6  0x00007ffff5e30ddc in QMetaObject::activate (sender=0x13abcb0,
from_signal_index=<value optimized out>, to_signal_index=<value optimized out>,
argv=0xf4b7a8ef) at kernel/qobject.cpp:3113
#7  0x00007ffff33b4cf5 in QAbstractItemDelegate::closeEditor
(this=0x7ffff4b75710, _t1=0x7ffff4b75710, _t2=QAbstractItemDelegate::NoHint) at
.moc/release-shared/moc_qabstractitemdelegate.cpp:103
#8  0x00007ffff33b4dc1 in QAbstractItemDelegate::qt_metacall (this=0x13abcb0,
_c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffffffa7e0)
at .moc/release-shared/moc_qabstractitemdelegate.cpp:81
#9  0x00007ffff32cadb5 in QItemDelegate::qt_metacall (this=0x7ffff4b75710,
_c=4128294688, _id=0, _a=0xf4b7a8ef) at
.moc/release-shared/moc_qitemdelegate.cpp:65
#10 0x00007ffff5ac9bee in PySide::signal_manager::emit_native_signal(QObject*,
int, PySide::pyqt_signal const&, boost::python::api::object const&) () from
/home/lauro/dev/pyside/pyside/build/base/libpysidebase.so.0
#11 0x00007ffff5ac9e64 in PySide::signal_manager::emit_(QObject*,
PySide::pyqt_signal const&, boost::python::api::object const&) () from
/home/lauro/dev/pyside/pyside/build/base/libpysidebase.so.0
#12 0x00007ffff69cc3a9 in emit_python_signal(boost::python::tuple const&,
boost::python::dict const&) () from
/opt/sandbox/lib/python2.6/site-packages/PySide/QtCore.so
#13 0x00007ffff69cba34 in
boost::python::objects::full_py_function_impl<boost::python::detail::raw_dispatcher<boost::python::tuple
(*)(boost::python::tuple const&, boost::python::dict const&)>,
boost::mpl::vector1<_object*> >::operator()(_object*, _object*) () from
/opt/sandbox/lib/python2.6/site-packages/PySide/QtCore.so
Comment 1 Matti Airas 2010-03-18 19:21:53 EET
This is might actually be valid even on the Shiboken version. I get this:

Traceback (most recent call last):
  File "./settingseditor.py", line 416, in event
    if event.type() == QtCore.QEvent.WindowActivate:
  File "./settingseditor.py", line 578, in paint
    QtGui.QItemDelegate.paint(self, painter, option, index)
TypeError: 'PySide.QtGui.QItemDelegate.paint' called with wrong argument types:
  PySide.QtGui.QItemDelegate.paint(PySide.QtGui.QStyleOptionViewItem,
PySide.QtGui.QStyleOptionViewItem, PySide.QtCore.QModelIndex)
Supported signatures:
  PySide.QtGui.QItemDelegate.paint(PySide.QtGui.QPainter,
PySide.QtGui.QStyleOptionViewItem, PySide.QtCore.QModelIndex)
Comment 2 Hugo Parente Lima 2010-04-08 17:44:29 EEST
I tried with the last pyside-shiboken from git HEAD and it didn't crashed, but
you forgot to say how to can I reproduce it.
Comment 3 Hugo Parente Lima 2010-04-12 17:28:55 EEST
(In reply to comment #1)
> This is might actually be valid even on the Shiboken version. I get this:
> 
> Traceback (most recent call last):
>   File "./settingseditor.py", line 416, in event
>     if event.type() == QtCore.QEvent.WindowActivate:
>   File "./settingseditor.py", line 578, in paint
>     QtGui.QItemDelegate.paint(self, painter, option, index)
> TypeError: 'PySide.QtGui.QItemDelegate.paint' called with wrong argument types:
>   PySide.QtGui.QItemDelegate.paint(PySide.QtGui.QStyleOptionViewItem,
> PySide.QtGui.QStyleOptionViewItem, PySide.QtCore.QModelIndex)
> Supported signatures:
>   PySide.QtGui.QItemDelegate.paint(PySide.QtGui.QPainter,
> PySide.QtGui.QStyleOptionViewItem, PySide.QtCore.QModelIndex)

I executed the code paths in this traceback and everything works now with git
HEAD :-)