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

After editing #include, Qt Creator clangd hangs in onHighlighterResultAvailable

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • Qt Creator 6.0.0-beta1
    • C/C++/Obj-C++ Support
    • None
    • Operating System: Arch Linux
      The errors occur for C++ stdlib headers as well as Qt 5 and 6 headers.
      I'm using GCC/Clang kits, both stock and modified to use LLD.
    • Linux/X11

    Description

      Steps:

      • Clone my sample project (link).
      • Open src/test.cpp. (Copying the contents into a header works as well.)
        • The line before the #include is necessary to reproduce the hang. It can be a comment, a #pragma once, a #define, etc. but cannot be empty.
      // test
      #include <QtQml/qqml.h
      class Type {
          QML_SINGLETON
      };
      
      • Add a > to the end of the #include line, and wait for the errors to disappear.

      Instead Qt Creator will hang.

      If it doesn't hang, undo, wait for the errors to appear, then type > again. Sometimes it hangs on the first try, sometimes it takes several tries.

      In gdb, qtcreator is stuck within "CppEditor::SemanticHighlighter::onHighlighterResultAvailable(int, int) (), from /home/nyanpasu64/Qt/Tools/Preview/Qt Creator 6.0.0-beta1/lib/qtcreator/plugins/libCppEditor.so".

      This function never returns (telling gdb to finish hangs). However it does call child functions (gdb doesn't know the name of the child, but it calls TextEditor::TextDocumentLayout::parentheses(QTextBlock const&)) which return (telling gdb to finish returns).

      Attachments

        Issue Links

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

          Activity

            People

              kandeler Christian Kandeler
              nyanpasu64 Nyan Pasu
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes