microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.55k stars 1.57k forks source link

The language server crashed 5 times in the last 3 minutes. It will not be restarted. #9585

Closed joansola closed 2 years ago

joansola commented 2 years ago

Issue Type: Bug

MacOS Monterey vscode 1.69.1 C++ extension 1.10.8

Error message "The language server crashed 5 times in the last 3 minutes. It will not be restarted" appears at startup.

Tried the following with no improvement:

Tried the following with success:

So I post here the json files of the workspace that is not working,

// cpp_properties.json
{
    "configurations": [
        {
            "name": "Mac",
            "includePath": [
                "${workspaceFolder}/include",
                "${default}"
            ],
            "defines": [],
            "macFrameworkPath": [
                "/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks"
            ],
            "compilerPath": "/usr/bin/clang++",
            "cppStandard": "gnu++14",
            "intelliSenseMode": "macos-clang-x64",
            "configurationProvider": "ms-vscode.cmake-tools"
        }
    ],
    "version": 4
}

// wolf.code-workspace
{
        "folders": [
                {
                        "path": "core"
                },
                {
                        "path": "imu"
                },
                {
                        "path": "vision"
                },
                {
                        "path": "laser"
                },
                {
                        "path": "apriltag"
                },
                {
                        "path": "gnss"
                },
                {
                        "path": "bodydynamics"
                }
        ],
        "settings": {
                "files.associations": {
                        "__hash_table": "cpp",
                        "__string": "cpp",
                        "__tree": "cpp",
                        "algorithm": "cpp",
                        "cstdio": "cpp",
                        "deque": "cpp",
                        "filesystem": "cpp",
                        "forward_list": "cpp",
                        "list": "cpp",
                        "map": "cpp",
                        "set": "cpp",
                        "string": "cpp",
                        "string_view": "cpp",
                        "typeinfo": "cpp",
                        "unordered_map": "cpp",
                        "unordered_set": "cpp",
                        "vector": "cpp",
                        "memory": "cpp",
                        "any": "cpp",
                        "*.tcc": "cpp",
                        "functional": "cpp",
                        "type_traits": "cpp",
                        "*.inc": "cpp"
                },
                "lldb.launch.preRunCommands": [
                        "command script import /Users/xxx/dev/.lldb-formatters/eigenlldb.py",
                        "breakpoint set --name main"
                ],
                "cmake.exportCompileCommandsFile": false,
                "cmake.installPrefix": "/Users/xxx/install",
                "python.defaultInterpreterPath": "python",
        }
}

And the one that is working

// cpp_properties.json
{
    "configurations": [
        {
            "browse": {
                "databaseFilename": "",
                "limitSymbolsToIncludedHeaders": true
            },
            "includePath": ["/Users/xxx/dev/crocoddyl/include"],
            "name": "ROS",
            // "compileCommands": "${workspaceFolder}/build-debug/compile_commands.json",
            "configurationProvider": "ms-vscode.cmake-tools"
        }
    ],
    "version": 4
}

// eagle.code-workspace
{
        "folders": [
                {
                        "path": "."
                }
        ],
        "settings": {
                "files.associations": {
                        "*.cpp.in": "cpp",
                        "*.cmake.in": "cmake"
                },
                "python.defaultInterpreterPath": "python3",
                "cmake.installPrefix": "/Users/xxx/install"
        }
}

Extension version: 1.10.8 VS Code version: Code 1.69.1 (Universal) (b06ae3b2d2dbfe28bca3134cc6be65935cdfea6a, 2022-07-12T08:21:51.333Z) OS version: Darwin x64 21.5.0 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-5557U CPU @ 3.10GHz (4 x 3100)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled| |Load (avg)|4, 4, 5| |Memory (System)|16.00GB (0.06GB free)| |Process Argv|--crash-reporter-id 361dbaba-416b-4a86-9c3a-df50a0329a88| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscorecescf:30445987 pythondataviewer:30285071 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593:30376534 vsc1dst:30438360 pythonvs932:30410667 wslgetstarted:30449410 vscscmwlcmt:30465135 cppdebug:30492333 vsclangdf:30486550 ```
joansola commented 2 years ago

FIXED: removed the workspace file wolf.vscode-workspace, and created it again.