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

Memory leak when browsing large QML list back and forth very fast

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P1: Critical
    • 4.8.0
    • 4.7.4
    • Tested with 701/XXXXX, SW version was custom SR 1.11 custom 111.010.0904.301.01, dated 2011-08-04. Qt version 4.7.4

    Description

      Our case is that we have a very long list of 1000+ entries, and user browses is fast back and forth for a long time. Statistics indicate that this leaks
      a little memory.
      Plus we noted that when we don't print out button 2nd line memory leak does not occur. This likely is a
      coincidence and I would presume that leak resides elsewhere, probably something kind of timing issue?

      Please try out the test application to replicate the problem . Button element is quite complex and model provides two lines of text with the image,
      and 2nd text line ::data is delayed a little.
      What happens when the test application is run that

      01:38:55.038 [Qt Message] cellCount: 23635 , totalAllocSize: 2064184
      01:39:18.813 [Qt Message] cellCount: 26144 , totalAllocSize: 2953404
      01:39:41.468 [Qt Message] cellCount: 28630 , totalAllocSize: 3845940
      ...

      Heap allocation grows despite that garbage collector is called before print the data, and

      01:50:14.073 [Qt Message] cellCount: 98654 , totalAllocSize: 28783200
      01:50:37.158 [Qt Message] cellCount: 102019 , totalAllocSize: 29736112
      01:51:01.015 [Qt Message] cellCount: 103654 , totalAllocSize: 30564640
      01:51:24.413 [Qt Message] cellCount: 107014 , totalAllocSize: 31516652
      01:51:27.699 [Qt Message] QImage: out of memory, returning null image
      01:51:27.699 [Qt Message] QVGPixmapData: Failed to convert image data (out of memory? try increasing heap size)
      ...
      01:51:33.416 [Qt Message] file:///C:/Private/e07db2c1/qml/MemoryTest/ListButton.qml:102:9: QML Image: Failed to get image from provider: image://images/710/1000
      01:51:33.431 [POST][mc_useragent][Get IMSI][OK]
      01:51:33.432 [POST][mc_useragent][Get LAC][OK]
      01:51:33.433 [POST][mc_useragent][Get cell id][OK]
      01:51:33.434 [POST][mc_useragent][Get network id][OK]
      01:51:33.434 [POST][mc_useragent][Get network country code][OK]

      gradually the application runs out of memory and crashes. Application itself does not allocate any memory from the heap expect what's needed upon application instantiation.
      Please find that attached full logs, and test application with SISX file.
      This was tested with 701/XXXXX, SW version was custom SR 1.11 custom 111.010.0904.301.01, dated 2011-08-04. Qt version 4.7.4

      Attachments

        1. MemoryTest.zip
          40 kB
        2. list_memory_leak.wri
          114 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtsymbase Qt Base for Symbian Team
            janiinis Janne Niinistö
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes