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

High memory usage when updating QtQuick Image

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.9.1
    • Fix Version/s: 5.9.2
    • Labels:
      None
    • Environment:
      MSVC2015

      Precompiled Qt 5.9.1 64 bit

      QtCreator 4.3.1

      Windows 10 64 bit
    • Commits:
      39061af50cc3092289cdd71d17802139590ecb59

      Description

      This is the first bug report I am submitting, so please let me know how to improve on the quality.

      I am using a custom image provider to display a stream of images. On every update I update the source of the image like this

      liveImage.source = "image://" + imageProvider + "/grayscale" + Math.random()

      in order to avoid caching.

      This worked fine in 5.8, however since switching to Qt 5.9 memory usage constantly increases with every new image until I run out of memory.

      The problem can be reproduced using the image provider from the Image Provider example and a timer to update the image:

       

      Timer {

       interval: 20

       running: true

        onTriggered: {

          img.source = "image://colors/yellow" + Math.random()

          console.log("update") running = true

      }

      Image {

        anchors.fill: parent;

        id: img;

        source: "image://colors/yellow"

      }

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              mitch_curtis Mitch Curtis
              Reporter:
              heiner Georg Lempe
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes