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

IntelliSense doesn't work (crashes) #10636

Closed
Samega7Cattac opened this issue Mar 6, 2023 · 42 comments
Closed

IntelliSense doesn't work (crashes) #10636

Samega7Cattac opened this issue Mar 6, 2023 · 42 comments
Assignees
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service quick fix reliability
Milestone

Comments

@Samega7Cattac
Copy link

Samega7Cattac commented Mar 6, 2023

Environment

  • OS and Version: Arch Linux
  • VS Code Version: 1.76.0
  • C/C++ Extension Version: 1.14
  • If using SSH remote, specify OS of remote machine: N/A

Bug Summary and Steps to Reproduce

Bug Summary:
There's dozens of "cpptools" on the output tab, every single one with dozens of errors.
An example of one of them:

[Error - 12:12:00 PM] Sending request cpptools/didChangeCppProperties failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/didChangeCppProperties failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/didChangeCppProperties failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/didChangeCppProperties failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/didChangeCppProperties failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/didChangeCppProperties failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/didChangeCppProperties failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/didChangeCppProperties failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/didChangeCppProperties failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/didChangeCppProperties failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/didChangeCppProperties failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/didChangeCppProperties failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/didChangeCppProperties failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/didChangeCppProperties failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/didChangeCppProperties failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/didChangeCppProperties failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/didChangeCppProperties failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/didChangeCppProperties failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/didChangeCppProperties failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/didChangeCppProperties failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/queryTranslationUnitSource failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/getCodeActions failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/getInlayHints failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/getInlayHints failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/getFoldingRanges failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/getFoldingRanges failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/getSemanticTokens failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/getSemanticTokens failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/getCodeActions failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/getDocumentSymbols failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending request cpptools/getDocumentSymbols failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] The language server crashed. Restarting...
[Error - 12:12:00 PM] Sending document notification textDocument/didOpen failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:12:00 PM] Sending document notification textDocument/didOpen failed
  Message: Client is not running
  Code: -32096 

With time they increase rapidly.

In the tab of the Configuration Warnings:

[3/6/2023, 12:08:05 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:08:05 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:08:08 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:08:08 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:08:08 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:08:08 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:08:08 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:08:08 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:08:08 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:08:08 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:08:08 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:08:08 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:08:08 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:08:08 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:12:01 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:12:01 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:12:01 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:12:01 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:12:01 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:12:01 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:12:01 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:12:01 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:12:01 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:12:01 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:12:01 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:12:01 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:12:01 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:12:01 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:12:01 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:12:01 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:12:01 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:12:01 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:12:01 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:12:01 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:12:01 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:12:01 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:12:02 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:12:02 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:12:02 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:12:02 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:12:02 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:12:02 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:16:03 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:16:03 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:16:03 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:16:03 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:16:03 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:16:03 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:16:03 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:16:03 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:16:03 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:16:03 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:16:03 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:16:03 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:16:03 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:16:03 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:16:03 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:16:03 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:16:03 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:16:03 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:16:03 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:16:03 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:16:03 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:16:03 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:16:03 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:16:03 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:16:03 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:16:03 PM] For C source files, the cStandard was changed from "gnu17" to "".
[3/6/2023, 12:16:03 PM] For C++ source files, the cppStandard was changed from "gnu++20" to "".
[3/6/2023, 12:16:03 PM] For C source files, the cStandard was changed from "gnu17" to "".

Steps to reproduce:

  1. Open workspace with several projects
  2. Open a .cpp file
  3. IntelliSense doesn't work

Expected behavior:
IntelliSense to show something on hover or autocomplete

Configuration and Logs

c_cpp_properties.json:
(this is an example of one of the projects config, they dont diff much)

{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
                "${workspaceFolder}/**",
                "${env:PROJECT_INSTALL_PATH}/include/",
                "/usr/include/glibmm-2.68/",
                "/usr/lib/glibmm-2.68/include",
                "/usr/include/glib-2.0/",
                "/usr/lib/glib-2.0/include",
                "/usr/include/gtkmm-4.0",
                "/usr/lib/gtkmm-4.0/include",
                "/usr/include/sigc++-3.0",
                "/usr/lib/sigc++-3.0/include",
                "/usr/lib/pangomm-2.48/include",
                "/usr/include/pangomm-2.48",
                "/usr/include/pango-1.0",
                "/usr/include/harfbuzz",
                "/usr/include/giomm-2.68",
                "/usr/lib/giomm-2.68/include",
                "/usr/include/cairomm-1.16",
                "/usr/lib/cairomm-1.16/include",
                "/usr/include/cairo",
                "/usr/include/freetype2",
                "/usr/include/gtk-4.0",
                "/usr/include/gdk-pixbuf-2.0",
                "/usr/include/graphene-1.0",
                "/usr/lib/graphene-1.0/include",
                "/usr/include/botan-2"
            ],
            "cStandard": "gnu17",
            "cppStandard": "gnu++20",
            "intelliSenseMode": "linux-gcc-x64",
            "configurationProvider": "ms-vscode.cmake-tools",
            "compileCommands": "${workspaceFolder}/build/compile_commands.json"
        }
    ],
    "version": 4
}

C/C++ logs:
cpptools_logs.txt



### Other Extensions

_No response_

### Additional context

_No response_
@KagaJiankui
Copy link

Same issue on WSL Ubuntu 22.04 LTS and Windows 11 with the newest version 1.14.4 installed. Additional log from remote extension host on the Ubuntu 22.04 WSL:

2023-03-07 01:18:28.207 [error] TypeError: Cannot read properties of undefined (reading 'document')
	at eval (eval at parse (/home/lexington/.vscode-server/extensions/draivin.hsnips-0.2.8/out/parser.js:134:22), <anonymous>:15:29)
	at f.invoke (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:63:145)
	at g.deliver (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:63:2066)
	at h.fire (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:63:1704)
	at /home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:98:154048
	at f.invoke (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:63:145)
	at g.deliver (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:63:2066)
	at h.fire (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:63:1704)
	at g.acceptDocumentsAndEditorsDelta (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:98:13934)
	at g.$acceptDocumentsAndEditorsDelta (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:98:12249)
	at c.N (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:106:11223)
	at c.M (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:106:10941)
	at c.H (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:106:10034)
	at c.G (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:106:9015)
	at /home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:106:7803
	at f.invoke (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:63:145)
	at g.deliver (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:63:2066)
	at h.fire (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:63:1704)
	at p.fire (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:72:14907)
	at /home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:122:16556
	at f.invoke (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:63:145)
	at g.deliver (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:63:2066)
	at h.fire (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:63:1704)
	at p.fire (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:72:14907)
	at t.E (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:72:18973)
	at /home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:72:16961
	at f.invoke (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:63:145)
	at g.deliver (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:63:2066)
	at h.fire (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:63:1704)
	at u.acceptChunk (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:72:12638)
	at /home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:72:11925
	at f.invoke (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:63:145)
	at g.deliver (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:63:2066)
	at h.fire (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:63:1704)
	at h.u (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:72:28911)
	at h.acceptFrame (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:72:28717)
	at f.l (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:72:27304)
	at /home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:72:24627
	at Socket.t (/home/lexington/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:72:22461)
	at Socket.emit (node:events:526:28)
	at addChunk (node:internal/streams/readable:315:12)
	at readableAddChunk (node:internal/streams/readable:289:9)
	at Socket.Readable.push (node:internal/streams/readable:228:10)
	at TCP.onStreamRead (node:internal/stream_base_commons:190:23)

This seems to be a VSCode side error since there is nothing related to ms-vscode.cpptool in the logging message.

Temporary Workaround

Downgrade the extension to 1.14.3 makes the language server works normally.

@alexvorndran
Copy link

I can confirm that downgrading to 1.14.3 fixed the issue for me (Ubuntu 18.04).

VS Code Version information:

Version: 1.76.0
Commit: 92da9481c0904c6adfe372c12da3b7748d74bdcb
Date: 2023-03-01T10:25:16.105Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Linux x64 5.4.0-109-generic
Sandboxed: No

@Colengms
Copy link
Collaborator

Colengms commented Mar 6, 2023

Hi @Samega7Cattac . Your log seems a bit unusual to me. Am I correct to infer that you reproduced this issue with a multi-root workspace containing 10 workspace folders? I see a lot of occurrences of Custom browse configuration received, indicating that the configuration provider(s) are flooding the C/C++ extension with these messages. Did this issue arise with a specific version of the C/C++ Extension or CMake Tools? If so, can you let us know which specific version(s) incurred the issue?

Hi @KagaJiankui . Based on your description, I'm not sure if you're seeing the same crash as this issue was opened to track. The stack you provided seems to point to an extension named draivin.hsnips-0.2.8. If the issue does not occur with the C/C++ Extension installed, can you confirm whether the issue occurs with draivin.hsnips removed instead? That extension does not appear to be intended to interact with the C/C++ Extension, so it's unclear how these are are related. Is there any other information you can provide, such as the C/C++ extension log output (with "C_Cpp.loggingLevel": "Debug" set) leading up to the failure? (Also, as this issue seems different, could you open a new issue?)

Hi @alexvorndran . Can you confirm whether you're experiencing the same issue as Samega7Cattac or KagaJiankui? As there could be multiple root causes for crashes, consider opening a new issue with additional information.

@Colengms Colengms self-assigned this Mar 6, 2023
@Colengms Colengms added Language Service more info needed The issue report is not actionable in its current state labels Mar 6, 2023
@Samega7Cattac
Copy link
Author

Am I correct to infer that you reproduced this issue with a multi-root workspace containing 10 workspace folders?

Yes there's several projects in that workspace and each one has a c_cpp config file.

Did this issue arise with a specific version of the C/C++ Extension or CMake Tools? If so, can you let us know which specific version(s) incurred the issue?

I don't remember when it started happening but max a weeks or week and half ago, sometimes I hold off some updates while I have unfinished work so I can't tell u accurately when it started.

@KagaJiankui
Copy link

The stack you provided seems to point to an extension named draivin.hsnips-0.2.8. If the issue does not occur with the C/C++ Extension installed, can you confirm whether the issue occurs with draivin.hsnips removed instead?

After uninstalling and re-installing the draivin.hsnips-0.2.8 extension on my Windows 11 laptop, Ubuntu 22.04 WSL hosted on Win11 laptio and a native Ubuntu 22.04 laptop, the stack I posted seems to be only related to the draivin.hsnips-0.2.8 extension rather than the C/C++ extension, and the working status of the C/C++ extension has no relationship to the status of the draivin.hsnips-0.2.8 extension.

Additionally, the 1.14.4 version of C/C++ extension working fine on the native Ubuntu 22.04 laptop, but the extension crashes on Win11 laptop and no logging message emitted even with "C_Cpp.loggingLevel": "Debug" set.

@alexvorndran
Copy link

Hi @Colengms! Thanks for looking into this.

[...] Can you confirm whether you're experiencing the same issue as Samega7Cattac or KagaJiankui? As there could be multiple root causes for crashes, consider opening a new issue with additional information.

The description of Samega7Cattac seems to fit what I saw. I too have a multi-root workspace (6 related project folders). I don't have the original logs at hand and I'm a bit hesitant to switch back to 1.14.4 at the moment, but searching for Pending response rejected since connection got disposed in Google originally lead me to this issue and I remember that the log looked something like the one in the opening post.

@rajasrijan
Copy link

I see this issue too. I too have multi-root workspace. Both 1.14.3 and 1.14.4 are not working for me.
This started happening after updating vscode itself, not sure if extension got updated.

@rdlaner
Copy link

rdlaner commented Mar 13, 2023

I'm having the same issue as well. Whenever I attempt to "Go to Definition" in any c/c++ file, nothing happens for a long time and then eventually it looks like cpptools crashes.

The C/C++ Output logs have a lot of these errors:

tag parsing error (this can be ignored unless symbols can't be found):
    line 497 (col. 50): error: expected a ')'
    
tag parsing error (this can be ignored unless symbols can't be found):
    line 15 (col. 1): error: expected a file name

And the cpptools Output logs show a lot of these errors:

[Error - 1:34:55 PM] Sending request cpptools/getSemanticTokens failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request cpptools/getInlayHints failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request cpptools/getInlayHints failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request cpptools/getInlayHints failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request cpptools/getInlayHints failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request textDocument/documentHighlight failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request cpptools/getCodeActions failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request cpptools/getCodeActions failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request textDocument/definition failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request textDocument/hover failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request cpptools/getCodeActions failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request cpptools/getCodeActions failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request cpptools/getCodeActions failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request cpptools/getCodeActions failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request cpptools/getCodeActions failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request cpptools/getCodeActions failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request cpptools/getCodeActions failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request cpptools/getCodeActions failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request cpptools/getCodeActions failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request cpptools/getCodeActions failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request cpptools/getCodeActions failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request cpptools/getDocumentSymbols failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request cpptools/getCodeActions failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request cpptools/getInlayHints failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request cpptools/getInlayHints failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request cpptools/getInlayHints failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request textDocument/hover failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request textDocument/documentHighlight failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request cpptools/getCodeActions failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request cpptools/getInlayHints failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request cpptools/getFoldingRanges failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] Sending request cpptools/getCodeActions failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:34:55 PM] The language server crashed. Restarting...

@Jasonlhy
Copy link

I have the same problem too using multiple root workspace

@Samega7Cattac
Copy link
Author

I have noticed that most of the errors appears when I try to compile the projects, second to opening files and saving

@sfariaNG
Copy link

I can confirm that downgrading to 1.14.3 also fixed it for me. I had many cpptools entries in the dropdown with the same errors listed above and this is also a multi-root workspace.

@sean-mcmanus
Copy link
Collaborator

Has anyone tried 1.15.0? Is anyone able to attach a call stack to get a crash or determine what the repro requirement is? We've tested with multi-root projects and haven't hit the crash yet. It also sounds like there might be multiple issues.

@sfariaNG
Copy link

@sean-mcmanus After reverting to 1.14.3, cleaning and rebuilding everything Intellisense works again. It also continues to work after updating to 1.15.0 and 1.14.4 without a clean and rebuild. Unfortunately I don't have the time to do another clean and rebuild at this point, but will report back if I do. I did try resetting the Intellisense database on 1.14.4, but it still worked afterward.

@sean-mcmanus sean-mcmanus added bug and removed more info needed The issue report is not actionable in its current state labels Mar 16, 2023
@sean-mcmanus sean-mcmanus added this to the 1.15.1 milestone Mar 16, 2023
@EmbeddedBacon
Copy link

I see this issue also us v1.14.4. I assume 1.15.0 is pre-release? @sean-mcmanus , how do I get the call stack info for you?

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Mar 16, 2023

1.15.0 is pre-release.

I have found multiple crashes in the multi-root scenario. I don't know for certain which users are hitting those particular crashes or not. The crash call stack would determine if it's the same crashes I'm working on fixing, but it may not be necessary.

If you can attach a debugger to the cpptools process under some condition in which it doesn't crash and then trigger the crash you may be able to get a crash call stack: https://github.com/microsoft/vscode-cpptools/wiki/Attaching-debugger-to-cpptools-or-cpptools%E2%80%90srv

@Samega7Cattac
Copy link
Author

@sean-mcmanus updating to 1.15 and clean rebuild solved the issue here too.

@sean-mcmanus
Copy link
Collaborator

@EmbeddedBacon Sigkill is not a crash. That can occur when we intentionally kill/abort the process if we detect that it may be dangling.

@EmbeddedBacon
Copy link

Okay, but this happens all the time. My project has auto generated hardware header files that can be several hundred megs. So, is there a way to increase the timeout? I often see the parsing stuck. How can I find out where it is getting stuck to help it along?

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Mar 20, 2023

@EmbeddedBacon The process killing we do should only occur if there is no message from the TypeScript side in 4 minutes, which seems very unlikely. You could bypass that by modifying the installed package.json "version" field by adding a "-main" to the end of the number, like at https://github.com/microsoft/vscode-cpptools/blob/main/Extension/package.json#L5 . If you're still getting the issue after that, then some external process might be killing the cpptools process. You might also want to try 1.15.0 (pre-release), since that has a bunch of bug fixes.

@bobbrow bobbrow added the fixed Check the Milestone for the release in which the fix is or will be available. label Mar 21, 2023
@EmbeddedBacon
Copy link

@sean-mcmanus, I upgraded to 1.15.0 Pre-Release and I am still seeing these error messages

[Error - 3:11:10 PM] Sending request cpptools/getDocumentSymbols failed.
Message: Pending response rejected since connection got disposed
Code: -32097
[Error - 3:11:10 PM] Sending request textDocument/completion failed.
Message: Pending response rejected since connection got disposed
Code: -32097
[Error - 3:11:10 PM] Sending request cpptools/getDocumentSymbols failed.
Message: Pending response rejected since connection got disposed
Code: -32097
[Error - 3:11:10 PM] The language server crashed. Restarting...

@sean-mcmanus
Copy link
Collaborator

We fixed some crashes and a deadlock with multiroot workspaces with 1.15.1 (https://github.com/microsoft/vscode-cpptools/releases/tag/v1.15.1), but it's possible you may be hitting a different crash, in which case it would be helpful to open a separate issue to track that, preferably with a call stack or other repro details so we can identify where it's crashing.

@EmbeddedBacon
Copy link

Saw this today. When checking the hints each output show the server crashed

image

@sean-mcmanus
Copy link
Collaborator

@EmbeddedBacon With what version? 1.15.1? Are you able to get a call stack or are you just seeing the SIGKILL still?

We have 1 known crash with recursive environment variables at #10704 .

@EmbeddedBacon
Copy link

@sean-mcmanus , I didn't have the debugger attached since most messages I had seen in the past were the sigkill. I am using the most recent version, 1.15.1. This is on a Fedora system using remote ssh. We had rather larger hardware header files which are several hundred megs. I always feel the header files are too large for the cpptools to handle, at least that is my gut feeling

@sean-mcmanus
Copy link
Collaborator

@EmbeddedBacon You may be hitting the C_Cpp.intelliSenseMemoryLimit, so you could try increasing that. Another thing to try is setting C_Cpp.intelliSenseCacheSize to 0 (in case the issue is related to the cache).

image

@EmbeddedBacon
Copy link

Mr. @sean-mcmanus , sorry for the delay, but I don't see either of those options either in the main Settings interface

image

or within the json file.

image

What am I doing wrong?

@sean-mcmanus
Copy link
Collaborator

@EmbeddedBacon You need to change the setting in the "remote" section instead of the "user" section.

@EmbeddedBacon
Copy link

Mr. @sean-mcmanus , I am still seeing the issue after setting the configuration to the following

image

Is there another method of me debugging and seeing what is going on?

@sean-mcmanus
Copy link
Collaborator

@EmbeddedBacon Have you ran something like "top" to see the CPU/memory usage of the cpptools-srv process over time?

@EmbeddedBacon
Copy link

Yes, I have looked at it in the past. It is always running high

image

@sean-mcmanus
Copy link
Collaborator

@EmbeddedBacon That is cpptools. I was wondering about cpptools-srv (the one that is crashing or exiting out for some unknown reason). I didn't think there was an issue with cpptools.

@EmbeddedBacon
Copy link

Mr. @sean-mcmanus , okay, perhaps I captured the data correctly this time. Here is the htop view

image

I used psrecord to capture cpu and memory using psrecord 167317 --log cpp-srv.log --interval 1 --plot cpp-srv-167317.png

This is the graph of the captured data

image

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Apr 6, 2023

@EmbeddedBacon Your OS is an x64 Linux and not 32-bit arm, right? The memory and CPU usage looks "normal" and doesn't appear to indicate a crash or out of memory. 2.5 GB is above normal, but doesn't necessarily indicate an error if the TU is big enough. Where in the time graph do you get the crash logging?

@EmbeddedBacon
Copy link

Mr. @sean-mcmanus , yes, the distro is Fedora release 34 (Thirty Four). Psrecord was attached to the process until it closed so the graph represents the entire time line (or as quick as I could find the pid of the process and launch the command).

@EmbeddedBacon
Copy link

@sean-mcmanus , is there something else I can collect or some other information/data I can collect for this?

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Apr 29, 2023

Have you tried setting the C_Cpp.intelliSenseMaxMemory to something like 16384 (your previous screenshot just show C_Cpp.intelliSenseMemoryLimit set, which has a different effect)? The sigkill could be due the memory limit across all TUs getting hit, i.e. if you have multiple files open. But if it sigkills with just 1 file open, then I'm not sure what could be causing that and we haven't heard other reports of that yet.

@EmbeddedBacon
Copy link

@sean-mcmanus , I don't think C_Cpp.intelliSenseMaxMemory was mentioned previously, but I did increase it to 16384. If I still see that same issue, what is the max values I can set C_Cpp.intelliSenseMaxMemory and C_Cpp.intelliSenseMemoryLimit,? Right now both are set to 16K.

@sean-mcmanus
Copy link
Collaborator

C_Cpp.intelliSenseMaxMemory has a higher limit of 65536. You have C_Cpp.intelliSenseMemoryLimit set to the max.

@sean-mcmanus
Copy link
Collaborator

We're closing this as fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/v1.15.4 . For any remaining issues, we or you could move them to new issues to track.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service quick fix reliability
Projects
None yet
Development

No branches or pull requests