Creator memory requirement for enabling clangd code model
-
I have moved to Creator 13.0.0 + Qt 6 supplied with Ubuntu 24.04 distro.
Upon starting Creator I get message:
"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?
-
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
-
12 GB, really ?
seems kind of excessive minRam requirement IMHO! I mean 16 is the new standard, one could argue, but still.
-
@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 :) -
J JonB has marked this topic as solved on