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

Qt crash when showing a tooltip

    XMLWordPrintable

Details

    Description

      My Qt application keeps on crashing when the tooltip in the attached file is shown.

      To reproduce the problem just set a widget tooltip in the following way:

      QFile file("tooltip.txt");
      file.open(QIODevice::ReadOnly);
      QTextStream stream(&file);
      QString tooltipText = stream.readAll();
      file.close();
      myWidget->setToolTip(tooltipText);

      I'm using the latest version of Qt (4.6.3) on Windows

      This is part of the Call Stack when the crash happens:

      QtGuid4.dll!`anonymous namespace'::LineBreakHelper::currentGlyph() Line 1683 + 0x1a bytes C++
      QtGuid4.dll!`anonymous namespace'::LineBreakHelper::adjustRightBearing() Line 1692 + 0xe bytes C++
      QtGuid4.dll!QTextLine::layout_helper(int maxGlyphs=2147483647) Line 1931 C++
      QtGuid4.dll!QTextLine::setLineWidth(double width=8388607.0000000000) Line 1602 C++
      QtGuid4.dll!qt_format_text(const QFont & fnt=

      {...}, const QRectF & _r={...}

      , int tf=134218769, const QTextOption * option=0x00000000, const QString & str=

      {...}, QRectF * brect=0x00000000, int tabstops=48, int * __formal=0x00000000, int tabarraylen=0, QPainter * painter=0x0012cb54) Line 7747 C++
      QtGuid4.dll!QPainter::drawText(const QRect & r={...}

      , int flags=1041, const QString & str=

      {...}, QRect * br=0x00000000) Line 5807 + 0x41 bytes C++
      QtGuid4.dll!QStyle::drawItemText(QPainter * painter=0x0012cb54, const QRect & rect={...}

      , int alignment=1041, const QPalette & pal=

      {...}, bool enabled=true, const QString & text={...}

      , QPalette::ColorRole textRole=ToolTipText) Line 541 C++
      QtGuid4.dll!QLabel::paintEvent(QPaintEvent * __formal=0x0012d3f0) Line 1038 C++
      QtGuid4.dll!QTipLabel::paintEvent(QPaintEvent * ev=0x0012d3f0) Line 230 C++
      QtGuid4.dll!QWidget::event(QEvent * event=0x0012d3f0) Line 8191 C++
      .....

      Attachments

        1. testtooltip.zip
          2 kB
        2. tooltip.txt
          0.0 kB
        3. tooltip.txt
          0.3 kB

        Issue Links

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

          Activity

            People

              freling Fabien Freling (closed Nokia identity) (Inactive)
              kalos Calogero
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes