Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problems while parsing boost-library headers #12698

Closed
tlik opened this issue Sep 10, 2024 · 4 comments
Closed

problems while parsing boost-library headers #12698

tlik opened this issue Sep 10, 2024 · 4 comments
Labels
bug Language Service more info needed The issue report is not actionable in its current state reliability
Milestone

Comments

@tlik
Copy link

tlik commented Sep 10, 2024

Environment

  • OS and Version: Ubuntu 20.04.6 LTS
  • VS Code Version: 1.93.0
  • C/C++ Extension Version: 1.21.6

Bug Summary and Steps to Reproduce

The problem occurs when I add "boost/accumulators" headers (boost version 1.81) and try to use some stuff. From this moment on, the "C/C++" extension hangs in the "project scanning" mode (tooltips, auto-completion, auto-formatting stop working).
At the same time, I see that the cpptools-srv process memory consumption is constantly growing (can eat 20 gigabytes in less than a minute).

This issue can be reproduced with the following simple test project

#include <boost/accumulators/accumulators.hpp>
#include <boost/accumulators/statistics/mean.hpp>

int main() {
   using namespace boost::accumulators;
   accumulator_set<double, features<tag::mean>> accumulator;
}

Configuration and Logs

 // c_cpp_properties.json
{
  "configurations": [
    {
      "name": "Linux",
      "includePath": [
        "${workspaceFolder}/**",
        "/usr/local/include/",
        "/usr/local/include/**"
      ],
      "defines": [
        "BOOST_ASIO_HAS_CO_AWAIT",
        "BOOST_ASIO_HAS_STD_COROUTINE"
      ],
      "compilerPath": "/usr/bin/gcc-10",
      "intelliSenseMode": "gcc-x64"
    }
  ],
  "version": 4
}
# logs
LSP: (received) cpptools/didChangeTextEditorSelection
LSP: (received) cpptools/didChangeTextEditorSelection
LSP: (received) cpptools/didChangeTextEditorSelection
LSP: (received) cpptools/didChangeTextEditorSelection
LSP: (received) cpptools/didChangeTextEditorSelection
LSP: (received) cpptools/didChangeTextEditorSelection
LSP: (received) cpptools/didChangeTextEditorSelection
LSP: (received) cpptools/getCodeActions: file:///home/anatoliyrodionov/xdev/playground/cpp/test/main.cpp (id: 33)
LSP: $/cancelRequest (cpptools/getCodeActions, id: 32)
LSP: (received) textDocument/willSaveWaitUntil: file:///home/anatoliyrodionov/xdev/playground/cpp/test/main.cpp (id: 34)
LSP: (invoked) textDocument/willSaveWaitUntil: file:///home/anatoliyrodionov/xdev/playground/cpp/test/main.cpp (id: 34)
LSP: Sending response (id: 34)
willSaveWaitUntil: 0ms
LSP: (received) textDocument/didSave: file:///home/anatoliyrodionov/xdev/playground/cpp/test/main.cpp
LSP: (received) cpptools/fileChanged: file:///home/anatoliyrodionov/xdev/playground/cpp/test/main.cpp
LSP: (received) cpptools/didChangeTextEditorSelection
LSP: (received) cpptools/getCodeActions: file:///home/anatoliyrodionov/xdev/playground/cpp/test/main.cpp (id: 35)
LSP: $/cancelRequest (cpptools/getCodeActions, id: 33)
LSP: Message ignored due to no registered handler: $/setTrace
LSP: (received) cpptools/didChangeSettings
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/didChangeActiveEditor: file:///home/anatoliyrodionov/xdev/playground/cpp/test/main.cpp
LSP: (received) cpptools/didChangeTextEditorSelection
LSP: $/cancelRequest (cpptools/getCodeActions, id: 35)
LSP: (received) textDocument/definition: file:///home/anatoliyrodionov/xdev/playground/cpp/test/main.cpp (id: 36)
LSP: $/cancelRequest (cpptools/getFoldingRanges, id: 28)

Other Extensions

No response

Additional context

No response

@sean-mcmanus sean-mcmanus added bug Language Service reliability investigate: repro This issue's repro steps needs to be investigated/confirmed labels Sep 11, 2024
@sean-mcmanus sean-mcmanus added this to the 1.22 milestone Sep 11, 2024
@bobbrow
Copy link
Member

bobbrow commented Sep 17, 2024

Hi @tlik,

I just tried to reproduce this issue on Ubuntu 22.04 (with boost 1.86.0) and was unsuccessful. I'll try again with an older version of Boost, but if there anything else going on in your workspace that you can share to help us see the issue, please let us know.

Please also note that the extension should already be adding /usr/local/include to the includePath based on the compiler you selected (gcc-10). You should remove those from your configuration.

@bobbrow bobbrow added more info needed The issue report is not actionable in its current state and removed investigate: repro This issue's repro steps needs to be investigated/confirmed labels Sep 17, 2024
@bobbrow
Copy link
Member

bobbrow commented Sep 17, 2024

I was also unable to reproduce the issue with Boost 1.81.0.

@tlik
Copy link
Author

tlik commented Sep 21, 2024

Hi, @bobbrow. I updated vscode to version 1.93.1 a couple days ago. And the problem has gone :)
Anyway, thanks for your response. And sorry for bothering you. Good luck!

@tlik tlik closed this as completed Sep 21, 2024
@bobbrow
Copy link
Member

bobbrow commented Sep 25, 2024

@tlik, I'm glad to hear that it's working for you now. It's not a bother for us to help out. If you run into any other issues, please let us know.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Language Service more info needed The issue report is not actionable in its current state reliability
Projects
Status: Done
Development

No branches or pull requests

3 participants