PyQt5, Qt5.1.1, ASSERT failure in QVector
-
Hi! I'm experiencing a problem that might be a bug in PyQt. Example:
@class CommClient(QObject):
def init(self, parent=None):
QObject.init(self)
self._devicelist = "--"self.timer = QTimer()
self.timer.timeout.connect(self.test)
self.timer.start(2000)def setDeviceList( self, devlist ):
self._devicelist = devlist
self.deviceListUpdated.emit()def getDevicelist(self):
return self._devicelist
deviceListUpdated = pyqtSignal()
devicelist = pyqtProperty(str, getDevicelist, notify=deviceListUpdated)def test(self):
self._devicelist = "New Device"
self.deviceListUpdated.emit()
self.timer.stop()app = QApplication(sys.argv)
qmlRegisterType(CommClient, 'SDL', 1, 0, 'CommClient')
view = QQuickView()
view.setWidth(500)
view.setHeight(500)
view.setTitle('CommClient')view.setSource(QUrl('main.qml'))
view.show()
app.exec_()@
And the qml file:
@import QtQuick 2.0
import SDL 1.0Rectangle {
width: 400
height: 400Text {
id: myText
text: commClient.devicelist
anchors.horizontalCenter: parent.horizontalCenter
}CommClient { id: commClient }
}@
When the time fires and the signal is emitted I get:
@
ASSERT failure in QVector<T>::at: "index out of range", file ../../include/QtCore/../../src/corelib/tools/qvector.h, line 350
Aborted
@Does anyone have a clue if it's a bug in my code or perhaps PyQt?
I am running the latest snapshot of PyQt5.1 ( PyQt-gpl-5.1.1-snapshot-41b8f6ca2ea4. ) and stable Qt5.1.1 built from source on Ubuntu 12.04.