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. Creator memory requirement for enabling clangd code model
Forum Updated to NodeBB v4.3 + New Features

Creator memory requirement for enabling clangd code model

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
4 Posts 3 Posters 514 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.
  • JonBJ Online
    JonBJ Online
    JonB
    wrote on last edited by
    #1

    I have moved to Creator 13.0.0 + Qt 6 supplied with Ubuntu 24.04 distro.

    Upon starting Creator I get message:

    Screenshot 2024-09-09 105917.png

    "memory requirements would be higher than your system can handle". And that means it switches it off and I have to re-enable it every time I go into Creator.

    I have now allocated 8GB to my VirtualBox VM for Ubuntu, with free -m reporting 6GB free. Yet I still get this message. It is very annoying.

    Could someone please tell me what exactly causes Creator to raise this message and disable clangd every time, please? It is very annoying. Just how much memory would it like not to do this?

    1 Reply Last reply
    0
    • cristian-adamC Offline
      cristian-adamC Offline
      cristian-adam
      wrote on last edited by
      #2

      If you look at https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/src/plugins/cppeditor/clangdsettings.cpp#n178 you would see:

      bool ClangdSettings::hardwareFulfillsRequirements()
      {
          instance().m_data.haveCheckedHardwareReqirements = true;
          instance().saveSettings();
          const quint64 minRam = quint64(12) * 1024 * 1024 * 1024;
          const std::optional<quint64> totalRam = Utils::HostOsInfo::totalMemoryInstalledInBytes();
          return !totalRam || *totalRam >= minRam;
      }
      

      Try setting in QtCreator.ini the following value as:

      [ClangdSettings]
      diagnosticConfigId=Builtin.BuildSystem
      checkedHardware=true  
      
      JonBJ 1 Reply Last reply
      3
      • J.HilkJ Online
        J.HilkJ Online
        J.Hilk
        Moderators
        wrote on last edited by J.Hilk
        #3

        12 GB, really ?

        seems kind of excessive minRam requirement IMHO! I mean 16 is the new standard, one could argue, but still.


        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

        1 Reply Last reply
        1
        • cristian-adamC cristian-adam

          If you look at https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/src/plugins/cppeditor/clangdsettings.cpp#n178 you would see:

          bool ClangdSettings::hardwareFulfillsRequirements()
          {
              instance().m_data.haveCheckedHardwareReqirements = true;
              instance().saveSettings();
              const quint64 minRam = quint64(12) * 1024 * 1024 * 1024;
              const std::optional<quint64> totalRam = Utils::HostOsInfo::totalMemoryInstalledInBytes();
              return !totalRam || *totalRam >= minRam;
          }
          

          Try setting in QtCreator.ini the following value as:

          [ClangdSettings]
          diagnosticConfigId=Builtin.BuildSystem
          checkedHardware=true  
          
          JonBJ Online
          JonBJ Online
          JonB
          wrote on last edited by JonB
          #4

          @cristian-adam
          Hi Cristian. Thank you so much for this! With the lines you suggest in [ClangdSettings] the warning message goes away and Creator allows me to come back in with the Use clangd setting.

          I raised https://bugreports.qt.io/browse/QTCREATORBUG-31541 for this earlier on, and there is another gut stuck on this at https://stackoverflow.com/questions/78811212/clangd-is-disabled-at-every-launch-by-qt-creator. I will update both of those.

          12GB seems excessive, since it works fine on 4GB with only 2GB free. I realise it will depend on size of code, but still. Per that guy's stackoverflow post and my QTCREATORBUG I think there needs to be some way for users to "permanently" disable this warning, e.g. after clicking "Enable anyway", without having to resort to finding this post here. I will mention it in my bug report, up to you guys.

          P.S.
          IMHO wanting 12GB for a code model is just ridiculous! But that's modern computing for you :)

          1 Reply Last reply
          3
          • JonBJ JonB has marked this topic as solved on

          • Login

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