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 477 - PySide segfaults when using QAbstractListModel as model for a QML ListView
: PySide segfaults when using QAbstractListModel as model for a QML ListView
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: QtDeclarative
: 0.4.2
: All All
: P3 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2010-11-20 12:52 EET by Thomas Perl
Modified: 2010-11-25 17:48 EET (History)
8 users (show)

See Also:


Attachments
Python script: Application and custom list model (635 bytes, text/x-python)
2010-11-20 12:52 EET, Thomas Perl
Details
QML File: Displaying the data in a ListView (330 bytes, application/octet-stream)
2010-11-20 12:53 EET, Thomas Perl
Details
updated example (698 bytes, text/x-python)
2010-11-22 11:09 EET, renato filho
Details
updated qml file (331 bytes, application/octet-stream)
2010-11-22 11:09 EET, renato filho
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Perl 2010-11-20 12:52:22 EET
Trying to display data of a custom subclass of QAbstractListModel in a QML
ListView crashes my application with a segfault. Will attach example code.
Comment 1 Thomas Perl 2010-11-20 12:52:58 EET
Created attachment 144 [details]
Python script: Application and custom list model
Comment 2 Thomas Perl 2010-11-20 12:53:22 EET
Created attachment 145 [details]
QML File: Displaying the data in a ListView
Comment 3 Thomas Perl 2010-11-20 12:57:53 EET
Steps to reproduce:

 1.) Download both attachments
 2.) Start: python crash.py

I'm using the following versions of PySide packages:

libpyside0.4                 0.4.2-0pyside1
libshiboken0.5               0.5.1-0pyside2
python-pyside.qtcore         0.4.2-0pyside1
python-pyside.qtdeclarative  0.4.2-0pyside1
python-pyside.qtgui          0.4.2-0pyside1
python-pyside.qtnetwork      0.4.2-0pyside1

(from the PySide Ubuntu PPA)

I'm using the following versions of Qt4 packages:

libqt4-dbus          4:4.7.0-0ubuntu4
libqt4-declarative   4:4.7.0-0ubuntu4
libqt4-designer      4:4.7.0-0ubuntu4
libqt4-dev           4:4.7.0-0ubuntu4
libqt4-help          4:4.7.0-0ubuntu4
libqt4-network       4:4.7.0-0ubuntu4
libqt4-opengl        4:4.7.0-0ubuntu4
libqt4-opengl-dev    4:4.7.0-0ubuntu4
libqt4-qt3support    4:4.7.0-0ubuntu4
libqt4-script        4:4.7.0-0ubuntu4
libqt4-scripttools   4:4.7.0-0ubuntu4
libqt4-sql           4:4.7.0-0ubuntu4
libqt4-sql-mysql     4:4.7.0-0ubuntu4
libqt4-svg           4:4.7.0-0ubuntu4
libqt4-test          4:4.7.0-0ubuntu4
libqt4-xml           4:4.7.0-0ubuntu4
libqt4-xmlpatterns   4:4.7.0-0ubuntu4
qt4-qmake            4:4.7.0-0ubuntu4
qt4-qmlviewer        4:4.7.0-0ubuntu4


Running "gdb --args python crash.py" and then "run" gives:

Program received signal SIGSEGV, Segmentation fault.
0x03452b4c in ?? () from /usr/lib/libQtDeclarative.so.4
(gdb) bt
#0  0x03452b4c in ?? () from /usr/lib/libQtDeclarative.so.4
#1  0x033ba1f1 in QDeclarativeOpenMetaObject::metaCall(QMetaObject::Call, int,
void**) ()
   from /usr/lib/libQtDeclarative.so.4
#2  0x00b248ca in QMetaObject::metacall(QObject*, QMetaObject::Call, int,
void**) () from /usr/lib/libQtCore.so.4
#3  0x00b2922c in QMetaProperty::read(QObject const*) const () from
/usr/lib/libQtCore.so.4
#4  0x0352a844 in ?? () from /usr/lib/libQtDeclarative.so.4
#5  0x0352d620 in ?? () from /usr/lib/libQtDeclarative.so.4
#6  0x02ce2dce in ?? () from /usr/lib/libQtScript.so.4
#7  0x02cc7aac in ?? () from /usr/lib/libQtScript.so.4
#8  0x02ba0025 in ?? () from /usr/lib/libQtScript.so.4
#9  0x0461f32c in ?? ()
#10 0x02b4f257 in ?? () from /usr/lib/libQtScript.so.4
#11 0x02bf66ad in ?? () from /usr/lib/libQtScript.so.4
#12 0x02bc815e in ?? () from /usr/lib/libQtScript.so.4
#13 0x02cbd010 in QScriptValue::call(QScriptValue const&, QList<QScriptValue>
const&) () from /usr/lib/libQtScript.so.4
#14 0x03485d66 in ?? () from /usr/lib/libQtDeclarative.so.4
#15 0x03488ce9 in ?? () from /usr/lib/libQtDeclarative.so.4
#16 0x03488f98 in ?? () from /usr/lib/libQtDeclarative.so.4
#17 0x0348a421 in
QDeclarativeBinding::update(QFlags<QDeclarativePropertyPrivate::WriteFlag>) ()
   from /usr/lib/libQtDeclarative.so.4
#18 0x0348b86a in QDeclarativeBinding::setEnabled(bool,
QFlags<QDeclarativePropertyPrivate::WriteFlag>) ()
   from /usr/lib/libQtDeclarative.so.4
#19 0x034919ef in ?? () from /usr/lib/libQtDeclarative.so.4
#20 0x03491df6 in ?? () from /usr/lib/libQtDeclarative.so.4
#21 0x0344aef6 in ?? () from /usr/lib/libQtDeclarative.so.4
#22 0x034574a2 in ?? () from /usr/lib/libQtDeclarative.so.4
#23 0x0345ba64 in ?? () from /usr/lib/libQtDeclarative.so.4
#24 0x0345c7b6 in ?? () from /usr/lib/libQtDeclarative.so.4
#25 0x034627d8 in ?? () from /usr/lib/libQtDeclarative.so.4
#26 0x03582687 in ?? () from /usr/lib/libQtDeclarative.so.4
#27 0x00b248ca in QMetaObject::metacall(QObject*, QMetaObject::Call, int,
void**) () from /usr/lib/libQtCore.so.4
#28 0x0348d66e in QDeclarativePropertyPrivate::write(QObject*,
QDeclarativePropertyCache::Data const&, QVariant const&, ---Type <return> to
continue, or q <return> to quit---
QDeclarativeContextData*, QFlags<QDeclarativePropertyPrivate::WriteFlag>) ()
from /usr/lib/libQtDeclarative.so.4
#29 0x0348e1af in QDeclarativePropertyPrivate::writeValueProperty(QVariant
const&, QFlags<QDeclarativePropertyPrivate::WriteFlag>) () from
/usr/lib/libQtDeclarative.so.4
#30 0x0348e2a4 in QDeclarativePropertyPrivate::write(QDeclarativeProperty
const&, QVariant const&, QFlags<QDeclarativePropertyPrivate::WriteFlag>) ()
from /usr/lib/libQtDeclarative.so.4
#31 0x0348a530 in
QDeclarativeBinding::update(QFlags<QDeclarativePropertyPrivate::WriteFlag>) ()
   from /usr/lib/libQtDeclarative.so.4
#32 0x034892a4 in ?? () from /usr/lib/libQtDeclarative.so.4
#33 0x034951d8 in ?? () from /usr/lib/libQtDeclarative.so.4
#34 0x034951c0 in ?? () from /usr/lib/libQtDeclarative.so.4
#35 0x03497564 in QDeclarativeContext::setContextProperty(QString const&,
QVariant const&) ()
   from /usr/lib/libQtDeclarative.so.4
#36 0x029622e0 in ?? () from
/usr/lib/pymodules/python2.6/PySide/QtDeclarative.so
#37 0x080ddd23 in PyEval_EvalFrameEx ()
#38 0x080dfbb2 in PyEval_EvalCodeEx ()
#39 0x080dfca7 in PyEval_EvalCode ()
#40 0x080fd956 in PyRun_FileExFlags ()
#41 0x080fdbb2 in PyRun_SimpleFileExFlags ()
#42 0x0805b6d3 in Py_Main ()
#43 0x0805a8ab in main ()

I don't have the PySide debug symbols installed, as the package is quite big (>
100 MB).
Comment 5 renato filho 2010-11-20 17:07:15 EET
I recommed you to try the new QML features only on PySide git source, a lot of
bugs related to QML was fixed on mainline. A new release will be available on
next week.
Comment 6 renato filho 2010-11-22 11:08:42 EET
fixed on pyside commit:
commit f7cb52d3822cb8d1897498cf04ca58813c530af6
Author: Renato Araujo Oliveira Filho <renato.filho@openbossa.org>
Date:   Sun Nov 21 19:01:11 2010 -0300
Comment 7 renato filho 2010-11-22 11:09:12 EET
Created attachment 148 [details]
updated example
Comment 8 renato filho 2010-11-22 11:09:27 EET
Created attachment 149 [details]
updated qml file
Comment 9 renato filho 2010-11-22 11:09:56 EET
I did some changes on your example to get this running correct, check if these
changes are valid.

Thanks
Comment 10 renato filho 2010-11-25 17:48:25 EET
released on 1.0.0~beta1