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

Assert in QBmpHandler's read_dib_body() when loading palette based BMP images

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 4.8.2
    • 4.8.0
    • Image formats
    • None
    • Linux x86
    • c5b2e8f28c6797ede0759379f110a330e26075c1 (Qt 4.8), c45146b48c66a18269d9b9907ddcf5394722ca83 (Qt 5.0)

    Description

      When trying to load palette based or monochrome bmp images, Qt asserts. I believe this regression has been introduced by a237c2cacec31e1aef00ff4e0b5707efc52d9b31 It worked fine in Qt 4.7

      Stack trace:

      0 ?? /lib/ld-linux.so.2 0 0x110832
      1 raise /lib/i386-linux-gnu/libc.so.6 0 0x12ade71
      2 abort /lib/i386-linux-gnu/libc.so.6 0 0x12b134e
      3 qt_message_output qglobal.cpp 2252 0xe62bbb
      4 qt_message qglobal.cpp 2298 0xe62d5d
      5 qFatal qglobal.cpp 2481 0xe63189
      6 qt_assert qglobal.cpp 1999 0xe62760
      7 read_dib_body qbmphandler.cpp 263 0x3fae8e
      8 QBmpHandler::read qbmphandler.cpp 772 0x3fcde3
      9 QImageReader::read qimagereader.cpp 1205 0x3c8ee4
      10 QImageReader::read qimagereader.cpp 1155 0x3c8b58
      11 QImage::load qimage.cpp 5087 0x3ba361

      I attached a few bmp images with different formtas which cause the assert in debug builds.

      Note: The assert does obviously affect the release mode. Interestingly, in release mode, the image loading succeeds.

      Attachments

        1. monochrome_1bpp.bmp
          0.6 kB
        2. palette_1bpp.bmp
          0.6 kB
        3. palette_4bpp.bmp
          2 kB
        4. palette_8bpp.bmp
          6 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kkalland Kim Motoyoshi Kalland (Inactive)
            portale Alessandro Portale
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes