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

DelegateModel leaks m_cache entries when removing incubating elements

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 5.12.0 Beta 3
    • None

    Description

      It seems that when the delegate model updates as a result of the input model, entries in m_cache aren't deleted, resulting in the delegate model slowing more and more as the model keeps changing.

      To reproduce:
      1- patch QtLocation with https://codereview.qt-project.org/243943
      2- open the sample 71264_BrokenMIV.tar.gz from QTBUG-71264
      3- zoom out a bit to let the map populate
      4- pan to verify the initial speed of the view (at every movement of the map, the model changes)
      5- use the Ctrl+P shortcut many times, this will trigger the leak
      6- pan again

      at this point the speed of the application should have decreased considerably. Debugging it reveals that in the delegate model used inside QDeclarativeGeoMapItemView, the
      list m_cache contains a big number of entries with index set to -1

      A proposed fix, https://codereview.qt-project.org/#/c/244309/, solves the leak but introduces a crash when using transitions in the view (unsure about the reason), suggesting that it is probably the incorrect approach to take

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              srutledg Shawn Rutledge
              paangele Paolo Angelelli
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes