-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
6.9.2
-
QtCreator 17.0.1
12th Gen Intel(R) Core(TM) i9-12900H (2.50 GHz), 6.0 GB (15.7 GB usable), AMD Radeon Pro WX3200 series
code snippet:
cpp:
void DataProvider::onTimerTick() { double value = qSin(m_time); emit newRealtimePoint(QPointF(m_time, value)); m_time += 0.1; // program crashes at m_time equivalent to 482 }
qml:
function onNewRealtimePoint(point) {
realtimeSeries.append(point)
if(realtimeSeries.count > 100) {
realtimeSeries.remove(0)
xAxis.min = point.x - 10
xAxis.max = point.x
}
}
Explain: Each time onTimerTick() fires, new point will be added, if realtimeSeries.count > 100, first point will be removed from realtimeSeries using remove(0).
Program always crashes when m_time reachs to value 482