Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-140146

Graphs crashes when plotting realtime data

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 6.9.2
    • Graphs: 2D
    • None
    • 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
    • Windows

      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

        1. CMakeLists.txt
          1 kB
        2. dataprovider.cpp
          0.7 kB
        3. dataprovider.h
          0.6 kB
        4. filmsByCategory.cpp
          4 kB
        5. filmsByCategory.h
          0.9 kB
        6. main.cpp
          0.5 kB
        7. Main.qml
          7 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            kagro Kaj Grönholm
            viettienmilo Tiên Việt Nguyễn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes