Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Symbols parsing and finding stops working Qtcreator v4.11.0 + CMAKE on linux x64

Symbols parsing and finding stops working Qtcreator v4.11.0 + CMAKE on linux x64

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
5 Posts 3 Posters 2.1k Views
  • 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.
  • R Offline
    R Offline
    rsacchettini
    wrote on 28 Jan 2020, 03:13 last edited by rsacchettini
    #1

    QtCreator + CMAKE C/C++ project with gcc, or clang on linux x64 stops parsing and finding code symbols in the editor.

    Version dev env: Qtcreatorv4.11.0 on linux x64 ubuntu18

    Happens in C/C++ with CMAKE and gcc or clang btw, the symbols parsing i.e. finding functions or type definitions does not work :

    1. Happens 100% of the time when if not starting qtCreator in the actual CMAKE project source directory
    2. Stops working regardless after a few minutes to about 1hours, requires a restart of Qtcreator after which it usually works again.

    It's not a small bug please have a look whenever possible. Used to never happen with previous versions of QtCreator on the same machine, same cmake version and gcc or clang toolchain. I went from QtCreator v4.5 to v4.11.0 recently.

    Regards

    Evidence:
    This is the log trace that QtCreator gives when it starts to not find the symbols any more:
    ~/qtcreator-4.11.0/bin/qtcreator\

    org.kde.ksyntaxhighlighting: Unable to resolve external include rule for definition "reStructuredText" in "CMake"
    "ClangCodeModelConnectionClient" LocalSocket Error: "QLocalSocket: Remote closed"
    2020-01-28T16:26:43 Clang Code Model: Error: The clangbackend process has finished unexpectedly and was restarted.
    Error in ClangCodeModelServer::documentsClosed: Document '/home/romain/Projects/dzmx/src/modem/include/modem_helpers.h' does not exists!
    Error in ClangCodeModelServer::documentsClosed: Document '/home/romain/Projects/dzmx/src/modem/include/ppp_ctrl.h' does not exists!
    Error in ClangCodeModelServer::documentsClosed: Document '/home/romain/Projects/dzmx/src/modem/modem_helpers.c' does not exists!
    "ClangCodeModelConnectionClient" LocalSocket Error: "QLocalSocket: Remote closed"
    2020-01-28T16:26:43 Clang Code Model: Error: The clangbackend process has finished unexpectedly and was restarted.
    Error in ClangCodeModelServer::documentsClosed: Document '/home/romain/Projects/dzmx/src/modem/modem_helpers.c' does not exists!
    "ClangCodeModelConnectionClient" LocalSocket Error: "QLocalSocket: Remote closed"
    2020-01-28T16:26:43 Clang Code Model: Error: The clangbackend process has finished unexpectedly and was restarted.
    Error in ClangCodeModelServer::documentsClosed: Document '/home/romain/Projects/dzmx/src/modem/modem_helpers.c' does not exists!
    "ClangCodeModelConnectionClient" LocalSocket Error: "QLocalSocket: Remote closed"
    2020-01-28T16:26:44 Clang Code Model: Error: The clangbackend process has finished unexpectedly and was restarted.
    Error in ClangCodeModelServer::documentsClosed: Document '/home/romain/Projects/dzmx/src/modem/modem_helpers.c' does not exists!
    message lost: 0 894293795405824
    Unknown Message
    MessageEnvelop()

    Circumstances: This happened as the source code was parsed ok by CMAKE using Ninja, then the actual executable (C/ARM-GCC) was compiled ok without error with GCC from a yocto linux ARM toolchain (Yocto Poky toolchain 2.2.4).

    The only way to get out of this situation is to restart QtCreator, trying to re-run Cmake, clear cmake configuration, rebuild the executable does not fix it, so it seems that the clang codemodel process/thread/tasks crashed or get in a blocked state somehow and is not being restarted until QtCreator itself restarts.

    A 1 Reply Last reply 28 Jan 2020, 05:55
    1
    • R rsacchettini
      28 Jan 2020, 03:13

      QtCreator + CMAKE C/C++ project with gcc, or clang on linux x64 stops parsing and finding code symbols in the editor.

      Version dev env: Qtcreatorv4.11.0 on linux x64 ubuntu18

      Happens in C/C++ with CMAKE and gcc or clang btw, the symbols parsing i.e. finding functions or type definitions does not work :

      1. Happens 100% of the time when if not starting qtCreator in the actual CMAKE project source directory
      2. Stops working regardless after a few minutes to about 1hours, requires a restart of Qtcreator after which it usually works again.

      It's not a small bug please have a look whenever possible. Used to never happen with previous versions of QtCreator on the same machine, same cmake version and gcc or clang toolchain. I went from QtCreator v4.5 to v4.11.0 recently.

      Regards

      Evidence:
      This is the log trace that QtCreator gives when it starts to not find the symbols any more:
      ~/qtcreator-4.11.0/bin/qtcreator\

      org.kde.ksyntaxhighlighting: Unable to resolve external include rule for definition "reStructuredText" in "CMake"
      "ClangCodeModelConnectionClient" LocalSocket Error: "QLocalSocket: Remote closed"
      2020-01-28T16:26:43 Clang Code Model: Error: The clangbackend process has finished unexpectedly and was restarted.
      Error in ClangCodeModelServer::documentsClosed: Document '/home/romain/Projects/dzmx/src/modem/include/modem_helpers.h' does not exists!
      Error in ClangCodeModelServer::documentsClosed: Document '/home/romain/Projects/dzmx/src/modem/include/ppp_ctrl.h' does not exists!
      Error in ClangCodeModelServer::documentsClosed: Document '/home/romain/Projects/dzmx/src/modem/modem_helpers.c' does not exists!
      "ClangCodeModelConnectionClient" LocalSocket Error: "QLocalSocket: Remote closed"
      2020-01-28T16:26:43 Clang Code Model: Error: The clangbackend process has finished unexpectedly and was restarted.
      Error in ClangCodeModelServer::documentsClosed: Document '/home/romain/Projects/dzmx/src/modem/modem_helpers.c' does not exists!
      "ClangCodeModelConnectionClient" LocalSocket Error: "QLocalSocket: Remote closed"
      2020-01-28T16:26:43 Clang Code Model: Error: The clangbackend process has finished unexpectedly and was restarted.
      Error in ClangCodeModelServer::documentsClosed: Document '/home/romain/Projects/dzmx/src/modem/modem_helpers.c' does not exists!
      "ClangCodeModelConnectionClient" LocalSocket Error: "QLocalSocket: Remote closed"
      2020-01-28T16:26:44 Clang Code Model: Error: The clangbackend process has finished unexpectedly and was restarted.
      Error in ClangCodeModelServer::documentsClosed: Document '/home/romain/Projects/dzmx/src/modem/modem_helpers.c' does not exists!
      message lost: 0 894293795405824
      Unknown Message
      MessageEnvelop()

      Circumstances: This happened as the source code was parsed ok by CMAKE using Ninja, then the actual executable (C/ARM-GCC) was compiled ok without error with GCC from a yocto linux ARM toolchain (Yocto Poky toolchain 2.2.4).

      The only way to get out of this situation is to restart QtCreator, trying to re-run Cmake, clear cmake configuration, rebuild the executable does not fix it, so it seems that the clang codemodel process/thread/tasks crashed or get in a blocked state somehow and is not being restarted until QtCreator itself restarts.

      A Offline
      A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on 28 Jan 2020, 05:55 last edited by aha_1980
      #2

      @rsacchettini said in Symbols parsing and finding stops working Qtcreator v4.11.0 + CMAKE on linux x64:

      Error in ClangCodeModelServer::documentsClosed: Document '/home/romain/Projects/dzmx/src/modem/include/modem_helpers.h' does not exists!
      Error in ClangCodeModelServer::documentsClosed: Document '/home/romain/Projects/dzmx/src/modem/include/ppp_ctrl.h' does not exists!
      Error in ClangCodeModelServer::documentsClosed: Document '/home/romain/Projects/dzmx/src/modem/modem_helpers.c' does not exists!

      Are these error messages valid?

      Happens 100% of the time when if not starting qtCreator in the actual CMAKE project source directory

      What do you mean with that? Please elaborate.

      Also, as I told you in the other thread, you might want to downgrade Creator as the CMake integration is currently in the flow (migrates from the server mode to the file API of CMake).

      Regards

      Edit: As you already used an older Qt Creator before, try running the new one with -settingspath </some/empty/folder>. That solved lot's of my Clang problems when upgrading over several versions.

      Qt has to stay free or it will die.

      R 1 Reply Last reply 28 Jan 2020, 21:23
      0
      • A aha_1980
        28 Jan 2020, 05:55

        @rsacchettini said in Symbols parsing and finding stops working Qtcreator v4.11.0 + CMAKE on linux x64:

        Error in ClangCodeModelServer::documentsClosed: Document '/home/romain/Projects/dzmx/src/modem/include/modem_helpers.h' does not exists!
        Error in ClangCodeModelServer::documentsClosed: Document '/home/romain/Projects/dzmx/src/modem/include/ppp_ctrl.h' does not exists!
        Error in ClangCodeModelServer::documentsClosed: Document '/home/romain/Projects/dzmx/src/modem/modem_helpers.c' does not exists!

        Are these error messages valid?

        Happens 100% of the time when if not starting qtCreator in the actual CMAKE project source directory

        What do you mean with that? Please elaborate.

        Also, as I told you in the other thread, you might want to downgrade Creator as the CMake integration is currently in the flow (migrates from the server mode to the file API of CMake).

        Regards

        Edit: As you already used an older Qt Creator before, try running the new one with -settingspath </some/empty/folder>. That solved lot's of my Clang problems when upgrading over several versions.

        R Offline
        R Offline
        rsacchettini
        wrote on 28 Jan 2020, 21:23 last edited by
        #3

        @aha_1980

        • You are right these logs appear systematically when not running qtCreator inside the cmake dir source. Again used to be no problems with previous versions.
          -In this current case with v4.11.0, these logs appear when running it from the cmake source dir, and then "xxxx.h/.c does not exists" appeared specifically after compiling, with success, the cmake c/c++ application.
          Before then, the terminal would remain clear of any error. i will video screencast this and then post it here so you can see exactly what's happening in terms of the timeline.

        • Happens 100% of the time... I mean by this that, when not running QtC v4.11.0 from the cmake source dir, then these error messages appear as soon as the project is opened without doing anything further. And these error messages also appear after each and every (successful) compilation.

        • I can revert back to previous versions of QtCreator of course get back to v4.5 until these issues are resolved, no problems, but I simply wanted to raise a ticket on this issue if it needs to be fixed.

        Thanks for your help!

        1 Reply Last reply
        0
        • E Offline
          E Offline
          enricop
          wrote on 6 Feb 2020, 13:57 last edited by enricop 2 Jun 2020, 14:06
          #4

          I have the same issue in the same scenario (v4.11.1, Cmake, linux64) here with ClangCodeModel enabled. Symbols parsing is not working.
          If I disable ClangCodeModel, the semantic highlighting is fine.
          My distro is ArchLinux. I tried also Qt official QtCreator with the same result.

          I get this error at boot:
          "PchManagerConnectionClient" LocalSocket Error: "QLocalSocket: Remote closed"

          I tried passing "-settingspath" with a new folder, everything is loaded with default values, but the issue still persists.

          1 Reply Last reply
          0
          • R Offline
            R Offline
            rsacchettini
            wrote on 31 Mar 2020, 02:53 last edited by
            #5

            @enricop said in Symbols parsing and finding stops working Qtcreator v4.11.0 + CMAKE on linux x64:

            ClangCodeModel

            Managed to resolve this issue which was:
            Although the cmake Cmakelists.txt file was correctly setting the CMAKE_SYSROOT variable, it was not picking it up.
            Same thing when using a toolchain file that specified it.

            Instead the sysroot has to be specified in double in the kit settings "Sysroot:"

            For a number of things the clang model is highly sensitive to the cmake configuration and what's generated in the current build dir.
            But in this case the sysroot variable kit setting line is compulsory.

            This issue can be closed.

            1 Reply Last reply
            1

            • Login

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