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

Memoryleak and crash on cancel QQuickImageResponse in QQuickAsyncImageProvider

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P1: Critical
    • None
    • 5.6.2, 5.7.1, 5.8.0, 5.9.0 Alpha
    • None
    • Ubuntu 14.04 LTS gcc 4.9.4

    Description

      Cancelling QQuickImageResponse (QRunnable) with cancel() and actual task still running and emitting finished() when done causes crash when there is lot of images and those are not cached. Also all cancelled QQuickImageResponses will leak memory.

      How to reproduce:
      1. Start provided application. It will show 50 red rectangles
      2. Clicking left button will change source for all images to empty -> rects will disappear
      3. Clicking left button again will start loading images with custom QQuickAsyncImageProvider which uses QThreaPool
      4. Quickly clicking left button will change again image source to empty -> image loading is cancelled
      5. Doing fast clicking couple times -> load images and then cancel will cause crash

      Attachments

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

        Activity

          People

            w00t Robin Burchell
            papetaja Pasi Petäjäjärvi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes