Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
None
-
4.8.4, 5.0.0
-
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
For Gerrit Dashboard: QTBUG-29194 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
46810,1 | Fixed crash in image reader when reading certain BMP files. | 4.8 | qt/qt | Status: ABANDONED | 0 | 0 |
46835,1 | Fixed crash in image reader when reading certain BMP files. | stable | qt/qtbase | Status: MERGED | +2 | 0 |
47092,1 | Fixed crash in image reader when reading certain BMP files. | 4.8 | qt/qt | Status: MERGED | +2 | 0 |