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

Possible crash in imagescaling example.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.5.1, 6.6.0
    • 6.0
    • Core: QtConcurrent
    • None
    • All
    • 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

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

        Activity

          People

            ivan.solovev Ivan Solovev
            jkobus Jarek Kobus
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews