During our evaluation of PySide 1.0.0 Beta 2, we have run into a crash that I
haven't been able to fix. When run on Ubuntu 10.0, the attached program crashes
at libshiboken/basewrapper.cpp:521. (I expect that the same crash occurs on
Windows, but I haven't tried there yet.) The problem is that self->d is a NULL
pointer. GDB is telling me that self is an instance of Shiboken.Object. Going
up a few frames to Sbk_QGraphicsProxyWidgetFunc_itemChange() where
Shiboken::Converter<QVariant>::toCpp() is invoked, I find that pyargs[1] is the
PySide.QtGui.QGraphicsProxyWidget object that is passed in to
PySide.QtGui.QGraphicsProxyWidget.itemChange().
That's as much as I have been able to gather so far. I don't have enough
experience with Shiboken yet to know how Shiboken::Converter<T> ought to
behave. Can anyone provide any guidance as to how I can fix this crash? Thanks
in advance.
-Patrick
--
Patrick L. Hartling
Senior Software Engineer, Priority 5
http://www.priority5.com/
The information transmitted in this communication is intended only for
the person or entity to which it is addressed and contains proprietary
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you
received this in error, please destroy any copies, contact the sender
and delete the material from any computer.
#!/usr/bin/env python
# trimmed down diagramscene.py to demonstrate crash in sizeHint()
import sys
from PySide import QtCore, QtGui
class CustomWidget(QtGui.QGraphicsProxyWidget):
def itemChange(self, eventType, value):
QtGui.QGraphicsProxyWidget.itemChange(self, eventType, value)
class MainWindow(QtGui.QMainWindow):
def __init__(self):
QtGui.QMainWindow.__init__(self)
self.crashme()
def crashme(self):
widget = QtGui.QGraphicsProxyWidget()
custom = CustomWidget()
custom.setParentItem(widget)
if __name__ == "__main__":
app = QtGui.QApplication(sys.argv)
mainWindow = MainWindow()
mainWindow.setGeometry(10, 10, 40, 40)
mainWindow.show()
sys.exit(app.exec_())
_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside