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

Crash when loading grayscale TIFF

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • 4.6.0
    • Image formats
    • None

      Qt-4.6.0-beta1 on Linux Ubuntu 9.04 crashes for me when loading a grayscale TIFF image using e.g. this code:

      #include <QApplication>
      #include <QLabel>

      int main( int argc, char **argv )
      {
      QApplication app( argc, argv );
      QLabel *lab = new QLabel();
      lab->setPixmap(QPixmap("test.tif"));
      lab->show();
      return app.exec();
      }

      The test image used is attached below.
      The relevant line in the output from "configure" before compiling Qt-4-6-0-beta1 read:

      TIFF support ........ plugin (system)

      /usr/lib/libtiff.so.4.2.1 is installed in the system, but I don't think it causes the problem as I tried 5 other image viewers on the supplied image file and only Qt has a problem with it.
      TIFFs in full color load OK with the above program, only grayscale TIFFs are affected.

      Console output from the crash:

          • glibc detected *** prog: free(): invalid next size (normal): 0x094b55c8 ***
            ======= Backtrace: =========
            /lib/tls/i686/cmov/libc.so.6[0xb6f4c604]
            /lib/tls/i686/cmov/libc.so.6(cfree+0x96)[0xb6f4e5b6]
            /usr/local/Trolltech/Qt-4.6.0/lib/libQtGui.so.4(_ZN10QImageDataD1Ev+0xa9)[0xb76f2447]
            /usr/local/Trolltech/Qt-4.6.0/lib/libQtGui.so.4(_ZN6QImageD1Ev+0x70)[0xb76f26b8]
            /usr/local/Trolltech/Qt-4.6.0/lib/libQtGui.so.4(_ZN11QPixmapData8fromFileERK7QStringPKc6QFlagsIN2Qt19ImageConversionFlagEE+0x1d7)[0xb7721405]
            /usr/local/Trolltech/Qt-4.6.0/lib/libQtGui.so.4(_ZN7QPixmap4loadERK7QStringPKc6QFlagsIN2Qt19ImageConversionFlagEE+0x739)[0xb7719275]
            /usr/local/Trolltech/Qt-4.6.0/lib/libQtGui.so.4(_ZN7QPixmapC1ERK7QStringPKc6QFlagsIN2Qt19ImageConversionFlagEE+0x9c)[0xb7719be2]
            prog[0x8048b68]
            /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb6ef3775]
            prog[0x80489f1]
            ======= Memory map: ========
            08048000-08053000 r-xp 00000000 08:03 1282020 /home/drhex/src/q4test/prog
            08053000-08054000 r--p 0000a000 08:03 1282020 /home/drhex/src/q4test/prog
            08054000-08055000 rw-p 0000b000 08:03 1282020 /home/drhex/src/q4test/prog
            09447000-094cb000 rw-p 09447000 00:00 0 [heap]
            ...

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

            rodal Samuel Rødal
            drhex Joakim Rosqvist
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes