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

QImage crash when reading some bmp files

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • None
    • 4.8.4, 5.0.0
    • Image formats
    • None
    • win7 64bits
      mingw32 4.6.2
    • af84313c622af880e95d461ea8b7dbca58d2dffa (5.0.2) 56b5acb2a858d0eb276ecc06d63caa7275f44dd7 (4.8.5)

    Description

      The QImage will crash when reading the images of the attachment bmp files.

      This link of useful debug message
      http://www.flickr.com/photos/92283971@N04/8386650746/in/photostream

      According to the guess from DerManu, may be some very unlikely coincidence
      where "red_mask >> red_shift" is -1, so that line divides by zero.

      codes :

      #include <QtCore>
      #include <QtGui>
       
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
      
          QString const prefix   = "C:/Qt/crash_pictures/";
          QStringList name;
          name << "rgb32-111110.bmp" << "rgb32bf.bmp" << "rgba32.bmp"for(int i = 0; i != name.size(); ++i){
              qDebug() << name[i];
              QImage read(prefix + name[i]); //crash at here
              qDebug() << read.isNull(); //can't reach this line
              qDebug() << read.format();
          }
      
          QLabel label;
          label.show();
         
          return a.exex();
      }
      

      I post the question on this forum too
      http://qt-project.org/forums/viewthread/23551/#110665

      Attachments

        1. crash_pictures.rar
          21 kB
          stereoMatching
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            rodal Samuel Rødal
            stereomatching stereoMatching
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes