Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.0
-
None
-
-
8
-
b34bea5e9 (dev), 65b4031e7 (6.4), dba4d7844 (6.5), 6a04e5ac0 (tqtc/lts-6.2), 0ac234f9e (dev), a0011f903 (6.5), 257eaa640 (6.5.0), 5ddb5d1fe (dev), 955377a6c (6.5)
-
Foundation Sprint 76, Foundation Sprint 77, Foundation Sprint 78, Foundations Sprint 79, Foundations Sprint 80
Description
In order to reproduce it, apply the following patch:
diff --git a/examples/qtconcurrent/imagescaling/imagescaling.cpp b/examples/qtconcurrent/imagescaling/imagescaling.cpp index 66bb0686c3..77f483fd22 100644 --- a/examples/qtconcurrent/imagescaling/imagescaling.cpp +++ b/examples/qtconcurrent/imagescaling/imagescaling.cpp @@ -210,6 +210,7 @@ QFuture<QByteArray> Images::download(const QList<QUrl> &urls) QList<QImage> Images::scaled() const { QList<QImage> scaled; + QThread::sleep(10); const auto data = downloadFuture.results(); for (auto imgData : data) { QImage image;
and after you start uploading images quit the app. The example crashes now.
See more details in inline comments for patchset 9 of https://codereview.qt-project.org/c/qt/qtbase/+/326088/9.
Attachments
For Gerrit Dashboard: QTBUG-103514 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
459456,2 | QFuture: fix continuation cleanup | dev | qt/qtbase | Status: MERGED | +2 | 0 |
460533,2 | QFuture: fix continuation cleanup | 6.5 | qt/qtbase | Status: MERGED | +2 | 0 |
460534,2 | QFuture: fix continuation cleanup | 6.4 | qt/qtbase | Status: MERGED | +2 | 0 |
460582,3 | QFuture: fix continuation cleanup | tqtc/lts-6.2 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
460949,20 | Rework imagescaling example to avoid potential crashes | dev | qt/qtbase | Status: MERGED | +2 | 0 |
462759,13 | QFuture: gracefully handle a destroyed context in continuations | dev | qt/qtbase | Status: ABANDONED | 0 | 0 |
465863,2 | Imagescaling example: fix memory leaks | dev | qt/qtbase | Status: MERGED | +2 | 0 |
466432,2 | Imagescaling example: fix memory leaks | 6.5.0 | qt/qtbase | Status: MERGED | +2 | 0 |
466433,2 | Imagescaling example: fix memory leaks | 6.5 | qt/qtbase | Status: MERGED | +2 | 0 |
474599,2 | Rework imagescaling example to avoid potential crashes | 6.5 | qt/qtbase | Status: MERGED | +2 | 0 |