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