Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-26812

Constantly repaints, uses 100% CPU

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Fixed
    • Affects Version/s: Qt Creator 6.0.1
    • Fix Version/s: Qt Creator 8.0.0
    • Component/s: Editors
    • Labels:
      None
    • Environment:
      Arch Linux
    • Platform/s:
      Linux/X11

      Description

      With Line Annotations enabled (Tools -> Options -> Text Editor -> Display -> Line annotations) and when scrolling to a particular point in a C++ file, Qt Creator consumes 100% of a single CPU core.

      Disabling Line Annotations resolves the problem.

      The symptoms seems very similar to QTCREATORBUG-20422.

      Partial oprofile report:

      samples  %        image name               symbol name
      794304   47.0573  libQt6Gui.so.6.2.2       /usr/lib/libQt6Gui.so.6.2.2
      544506   32.2584  libharfbuzz.so.0.30200.0 /usr/lib/libharfbuzz.so.0.30200.0
      102151    6.0518  libQt6Core.so.6.2.2      /usr/lib/libQt6Core.so.6.2.2
      40977     2.4276  libQt6Widgets.so.6.2.2   /usr/lib/libQt6Widgets.so.6.2.2
      39726     2.3535  libTextEditor.so         /usr/lib/qtcreator/plugins/libTextEditor.so
      28802     1.7063  libpthread-2.33.so       pthread_mutex_lock
      27299     1.6173  libpthread-2.33.so       __pthread_mutex_unlock_usercnt
      

      Sample backtraces after stopping the process:

      #0  0x00007fc075a8c0e9 in QTextBlock::position() const () at /usr/lib/libQt6Gui.so.6
      #1  0x00007fc075a6763c in QTextEngine::formatIndex(QScriptItem const*) const () at /usr/lib/libQt6Gui.so.6
      #2  0x00007fc075a6af38 in QTextEngine::resolveFormats() const () at /usr/lib/libQt6Gui.so.6
      #3  0x00007fc075a5f008 in QTextEngine::itemize() const () at /usr/lib/libQt6Gui.so.6
      #4  0x00007fc075a81ce5 in QTextLayout::draw(QPainter*, QPointF const&, QList<QTextLayout::FormatRange> const&, QRectF const&) const () at /usr/lib/libQt6Gui.so.6
      #5  0x00007fc068d6d665 in TextEditor::TextEditorWidget::paintEvent(QPaintEvent*) () at /usr/lib/qtcreator/plugins/libTextEditor.so
      #6  0x00007fc075fc477f in QWidget::event(QEvent*) () at /usr/lib/libQt6Widgets.so.6
      #7  0x00007fc07604f977 in QFrame::event(QEvent*) () at /usr/lib/libQt6Widgets.so.6
      #8  0x00007fc07509b680 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () at /usr/lib/libQt6Core.so.6
      #9  0x00007fc075f7bf3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt6Widgets.so.6
      #10 0x00007fc07509ceba in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt6Core.so.6
      #11 0x00007fc075fb3f9c in QWidgetPrivate::sendPaintEvent(QRegion const&) () at /usr/lib/libQt6Widgets.so.6
      #12 0x00007fc075fb6141 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt6Widgets.so.6
      #13 0x00007fc075fd3cb6 in  () at /usr/lib/libQt6Widgets.so.6
      #14 0x00007fc075fc45e8 in QWidget::event(QEvent*) () at /usr/lib/libQt6Widgets.so.6
      #15 0x00007fc075f7bf4d in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt6Widgets.so.6
      #16 0x00007fc07509ceba in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt6Core.so.6
      #17 0x00007fc07509d098 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/libQt6Core.so.6
      #18 0x00007fc075289238 in  () at /usr/lib/libQt6Core.so.6
      #19 0x00007fc073fa952c in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
      #20 0x00007fc073ffd7b9 in  () at /usr/lib/libglib-2.0.so.0
      #21 0x00007fc073fa6c11 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
      #22 0x00007fc07528f870 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt6Core.so.6
      #23 0x00007fc0750a75e3 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt6Core.so.6
      #24 0x00007fc07509ffc6 in QCoreApplication::exec() () at /usr/lib/libQt6Core.so.6
      #25 0x00005588443c4c8d in  ()
      #26 0x00007fc074b5fb25 in __libc_start_main () at /usr/lib/libc.so.6
      #27 0x00005588443c52be in  ()
      
      #0  0x00007fc0758f360f in QRasterPaintEngine::drawTextItem(QPointF const&, QTextItem const&) () at /usr/lib/libQt6Gui.so.6
      #1  0x00007fc075917d1e in  () at /usr/lib/libQt6Gui.so.6
      #2  0x00007fc075a87cb8 in QTextLine::draw_internal(QPainter*, QPointF const&, QTextLayout::FormatRange const*) const () at /usr/lib/libQt6Gui.so.6
      #3  0x00007fc075c90754 in  () at /usr/lib/libQt6Gui.so.6
      #4  0x00007fc068d6d665 in TextEditor::TextEditorWidget::paintEvent(QPaintEvent*) () at /usr/lib/qtcreator/plugins/libTextEditor.so
      #5  0x00007fc075fc477f in QWidget::event(QEvent*) () at /usr/lib/libQt6Widgets.so.6
      #6  0x00007fc07604f977 in QFrame::event(QEvent*) () at /usr/lib/libQt6Widgets.so.6
      #7  0x00007fc07509b680 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () at /usr/lib/libQt6Core.so.6
      #8  0x00007fc075f7bf3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt6Widgets.so.6
      #9  0x00007fc07509ceba in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt6Core.so.6
      #10 0x00007fc075fb3f9c in QWidgetPrivate::sendPaintEvent(QRegion const&) () at /usr/lib/libQt6Widgets.so.6
      #11 0x00007fc075fb6141 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt6Widgets.so.6
      #12 0x00007fc075fd3cb6 in  () at /usr/lib/libQt6Widgets.so.6
      #13 0x00007fc075fc45e8 in QWidget::event(QEvent*) () at /usr/lib/libQt6Widgets.so.6
      #14 0x00007fc075f7bf4d in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt6Widgets.so.6
      #15 0x00007fc07509ceba in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt6Core.so.6
      #16 0x00007fc07509d098 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/libQt6Core.so.6
      #17 0x00007fc075289238 in  () at /usr/lib/libQt6Core.so.6
      #18 0x00007fc073fa952c in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
      #19 0x00007fc073ffd7b9 in  () at /usr/lib/libglib-2.0.so.0
      #20 0x00007fc073fa6c11 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
      #21 0x00007fc07528f870 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt6Core.so.6
      #22 0x00007fc0750a75e3 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt6Core.so.6
      #23 0x00007fc07509ffc6 in QCoreApplication::exec() () at /usr/lib/libQt6Core.so.6
      #24 0x00005588443c4c8d in  ()
      #25 0x00007fc074b5fb25 in __libc_start_main () at /usr/lib/libc.so.6
      #26 0x00005588443c52be in  ()

        Attachments

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

          Activity

            People

            Assignee:
            davschul David Schulz
            Reporter:
            john.lindgren@aol.com John Lindgren
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes