Results 1 to 17 of 17

Thread: Qt is crashing when showing this tooltip. Why?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2006
    Posts
    56
    Thanks
    7
    Thanked 3 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Qt is crashing when showing this tooltip. Why?

    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:

    Qt Code:
    1. QFile file("tooltip.txt");
    2. file.open(QIODevice::ReadOnly);
    3. QTextStream stream(&file);
    4. QString tooltipText = stream.readAll();
    5. file.close();
    6.  
    7. myWidget->setToolTip(tooltipText);
    To copy to clipboard, switch view to plain text mode 

    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

    Update:
    I attached a simple project to reproduce the problem.
    I compile that project with Qt 4.6.3 and Visual Studio 2008 Express on Windows Xp
    In debug mode it crashes always when I move the mouse on top of the widget and the tooltip is shown. In relase mode sometimes it crashes sometimes not.

    Here is part of the call stack when it crashes:

    tGuid4.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:aintEvent(QPaintEvent * __formal=0x0012d3f0) Line 1038 C++
    QtGuid4.dll!QTipLabel:aintEvent(QPaintEvent * ev=0x0012d3f0) Line 230 C++
    QtGuid4.dll!QWidget::event(QEvent * event=0x0012d3f0) Line 8191 C++
    .....
    Attached Files Attached Files
    Last edited by kalos80; 26th July 2010 at 13:23.

Similar Threads

  1. Application crashing
    By addu in forum Qt Programming
    Replies: 9
    Last Post: 22nd May 2009, 10:37
  2. Crashing without qDebug() ?
    By xtreme in forum Qt Programming
    Replies: 3
    Last Post: 5th August 2008, 17:01
  3. QMultiHash - crashing
    By steg90 in forum Qt Programming
    Replies: 16
    Last Post: 23rd May 2007, 13:18
  4. Showing QMainWindow without showing a child QWidget
    By discostu in forum Qt Programming
    Replies: 3
    Last Post: 4th March 2007, 09:03
  5. Application is Crashing
    By shyam prasad in forum Qt Programming
    Replies: 1
    Last Post: 9th January 2007, 17:04

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.