Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt is crashing when showing this tooltip. Why?
Qt 6.11 is out! See what's new in the release blog

Qt is crashing when showing this tooltip. Why?

Scheduled Pinned Locked Moved General and Desktop
8 Posts 3 Posters 5.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kalos
    wrote on last edited by
    #1

    My Qt application keeps on crashing when "this tooltip":http://www.qtcentre.org/attachment.php?attachmentid=4996&d=1280131546 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
    I'm going to submit a bugreport, but in the meanwhile can anyone suggest me a solution to fix this crash problem?

    Thanks in advance for your help

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sabrog
      wrote on last edited by
      #2

      It's strange, because with root rights i don't get crash and have Plastique style on widget. But without root rights i have Windows Classic style (Ubuntu) and crash with this errors:

      <pre>
      0x005354a3 in (anonymous namespace)::LineBreakHelper::adjustRightBearing (this=0xbfffdf18,
      maxGlyphs=2147483647) at /var/tmp/qt-src/src/gui/text/qtextlayout.cpp:1692
      </pre>

      Something wrong here:

      @ inline void adjustRightBearing()
      {
      if (currentPosition <= 0)
      return;

              qreal rb;
              fontEngine->getGlyphBearings(currentGlyph(), 0, &amp;rb);
              rightBearing = qMin(QFixed(), QFixed::fromReal(rb));
          }@
      

      QT - Apple QuickTime
      Qt - Nokia's Qt Development Frameworks
      Apple is a competitor of Nokia, so QT != Qt

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kalos
        wrote on last edited by
        #3

        For me too it is crashing in that function, and precisely when currentGlyph() is called.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on last edited by
          #4

          Does it crash when using other styles (run the application with @appname -style STYLENAME@)? That would narrow the issue down to the style used:-)

          Please consider filing a "bugreport":http://bugreports.qt.nokia.com/ providing as much information as possible.

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kalos
            wrote on last edited by
            #5

            where can I find the list of styles strings I can launch the application with?

            1 Reply Last reply
            0
            • T Offline
              T Offline
              tobias.hunger
              wrote on last edited by
              #6

              That is indeed a bit tricky:-) The following piece of code dumps the names:

              @#include <QtGui/QStyleFactory>
              #include <QtCore/QtDebug>

              int main(int, char *)
              {
              QStyleFactory *sf = new QStyleFactory;
              qDebug() << sf->keys();
              delete sf;
              }
              @

              1 Reply Last reply
              0
              • K Offline
                K Offline
                kalos
                wrote on last edited by
                #7

                Thanks Tobias for the trick.

                Well I tested the application against the following styles:

                Windows
                WindowsXP
                Motif
                CDE
                Plastique
                Cleanlooks

                It crashes only with WindowsXP and Cleanlooks styles

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  tobias.hunger
                  wrote on last edited by
                  #8

                  Good... Please report a bug against those styles then.

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved