Uploaded image for project: 'Qt Design Studio'
  1. Qt Design Studio
  2. QDS-9832

crash in fileextractor.cpp when compressedSize is 0

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • None
    • QDS 4.1
    • Welcome Page
    • None
    • 4f11fae46 (qds/dev), e442eb9e4 (qds/4.1)
    • QDS Oulu - 2023 Week 17/18, QDS Oulu - 2023 Week 19/20

    Description

                  qint64 currentSize = m_bytesBefore
                                       - QStorageInfo(m_targetPath.toFileInfo().dir()).bytesAvailable();
                  // We can not get the uncompressed size of the archive yet, that is why we use an
                  // approximation. We assume a 50% compression rate.
                  int progress = std::min(100ll, currentSize * 100 / m_compressedSize * 2);
                  if (progress >= 0) {
                      m_progress = progress;
                      emit progressChanged();
                  } else {
                      qWarning() << "FileExtractor has got negative progress. Likely due to QStorageInfo.";
      

      the calculation of the progress line can crash

      Attachments

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

        Activity

          People

            saghinet Samuel Ghinet
            tjenssen Tim Jenssen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes