[PyQt] internalPointer crashes
Joel B. Mohler
joel at kiwistrawberry.us
Fri Aug 26 19:12:08 BST 2011
Hi,
Back in April of this year Jeremy Sanders reported crashes when storing a
python object in QModelIndex internalPointer. I've had crashes of this nature
as well. It seems to work the vast majority of the time but I now have a case
that seems to consistently crash although not always with the same error.
Jeremy's report is at http://www.riverbankcomputing.com/pipermail/pyqt/2011-
April/029719.html . The suggestion in replies there was to make sure that
python had pointers to all the things in internalPointer -- I'm quite certain
that my python object structure does in fact have live references so I think
there is an additional bug (although maintaining live python references seems
quite sensible to me).
I'm currently on ubuntu 11.04 with PyQt 4.8.3 and Qt 4.7.2. I think this same
crash is happening on windows vista (with Qt versions I don't have at the
moment). My model source is at
https://bitbucket.org/jbmohler/qtalchemy/src/69e8f006fee2/qtalchemy/PyQtModels.py
in the class PBTableModel. I'd have to work a bit to prune this down to
something self-complete.
Of additional note is that converting everything in sight to PySide results in
a non-crashing application. I'm hesitant to rush off to PySide on the basis
of this bug, but it's tempting.
Joel
More information about the PyQt
mailing list