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

No database created during queryCompilerDefaults causing cpptools to exit #12976

Open
sean-mcmanus opened this issue Nov 19, 2024 · 3 comments
Open
Labels
bug Language Service regression A bug that didn't exist in a previous release reliability
Milestone

Comments

@sean-mcmanus
Copy link
Contributor

I am getting this crash with the release and beta versions, and I would love to help you track this down because intellisense has always been hit or miss for me for (literally) decades!

I have attached to the 'ms-vscode.cpptools-1.22.11-win32-x64\bin\cpptools.exe' process, but it just eventually exits with exit code 0, so I can't get a stack trace from that.
Could you advise what I should attach to, and if there is a version of it with symbols?

This is the log from the Output window:

loggingLevel: Debug
LSP: (received) cpptools/initialize (id: 1)
LSP: (invoked) cpptools/initialize (id: 1)
cpptools version (TypeScript): 1.22.11
cpptools version (native): 1.22.11.0
Autocomplete is enabled.
Error squiggles are enabled.
Hover is enabled.
IntelliSense Engine = default.
LSP: Sending response (id: 1)
LSP: (received) cpptools/queryCompilerDefaults (id: 2)
LSP: (invoked) cpptools/queryCompilerDefaults (id: 2)
LSP: Message ignored due to no registered handler: $/setTrace
LSP: (received) cpptools/initialize (id: 1)
LSP: (invoked) cpptools/initialize (id: 1)
cpptools version (TypeScript): 1.22.11
cpptools version (native): 1.22.11.0
Autocomplete is enabled.
Error squiggles are enabled.
Hover is enabled.
IntelliSense Engine = default.
LSP: Sending response (id: 1)
LSP: (received) cpptools/queryCompilerDefaults (id: 2)
LSP: (invoked) cpptools/queryCompilerDefaults (id: 2)
LSP: (received - deferred) cpptools/getDocumentSymbols: file:///d%3A/dev/shared/isoeditor/devices/device_directories.cpp (id: 3)
LSP: (received - deferred) cpptools/getCodeActions: file:///d%3A/dev/shared/isoeditor/devices/device_directories.cpp (id: 4)
LSP: (received - deferred) cpptools/getDocumentSymbols: file:///d%3A/dev/shared/isoeditor/devices/device_directories.cpp (id: 5)
LSP: (received - deferred) cpptools/getFoldingRanges: file:///d%3A/dev/shared/isoeditor/devices/device_directories.cpp (id: 6)

Adrian Stephens

Originally posted by @adrianstephens in #10651

@adrianstephens
Copy link

with log level=7, I got a MessageBox saying:

Command 'C/C++: Go to previous preprocessor directive in conditional group' resulted in an error
Client is not running

I didn't explicitly invoke that command, but my cat likes to walk across my keyboard!

I have 3 vscode popup errors in this order:

Sending document notification textDocument/didOpen failed

Unable to start the C/C++ language server. IntelliSense features will be disabled. Error: Error: Pending response rejected since connection got disposed
The language server crashed. Restarting...

And the log says:

loggingLevel: 7
LSP: (received) cpptools/initialize (id: 1)
LSP: (invoked) cpptools/initialize (id: 1)
cpptools version (TypeScript): 1.21.6
cpptools version (native): 1.21.6.0
Autocomplete is enabled.
Error squiggles are enabled.
Hover is enabled.
IntelliSense Engine = default.
LSP: Sending response (id: 1)
LSP: (received) cpptools/queryCompilerDefaults (id: 2)
LSP: (invoked) cpptools/queryCompilerDefaults (id: 2)
LSP: (received) cpptools/initialize (id: 1)
LSP: (invoked) cpptools/initialize (id: 1)
cpptools version (TypeScript): 1.21.6
cpptools version (native): 1.21.6.0
Autocomplete is enabled.
Error squiggles are enabled.
Hover is enabled.
IntelliSense Engine = default.
LSP: Sending response (id: 1)
LSP: (received) cpptools/queryCompilerDefaults (id: 2)
LSP: (invoked) cpptools/queryCompilerDefaults (id: 2)
LSP: (received - deferred) cpptools/getDocumentSymbols: file:///d%3A/dev/shared/common/extra/timsort.h (id: 3)
LSP: (received - deferred) cpptools/getDocumentSymbols: file:///d%3A/dev/shared/common/extra/timsort.h (id: 4)
LSP: (received - deferred) cpptools/getFoldingRanges: file:///d%3A/dev/shared/common/extra/timsort.h (id: 5)

I'm still using 1.21.6 (as you can see)

@sean-mcmanus
Copy link
Contributor Author

@adrianstephens Okay, thanks for the info -- we'll need to look into how this is possible. We haven't gotten any similar reports like this yet for 1.21.6 and that was released 3 months ago.

@sean-mcmanus sean-mcmanus changed the title 1.22 regression: No database created during queryCompilerDefaults causing cpptools to exit No database created during queryCompilerDefaults causing cpptools to exit Nov 19, 2024
@adrianstephens
Copy link

@sean-mcmanus Where can I take the issue of the database not being created?

I have tried pointing the database to the one generated by Visual Studio 2022 (vs\shared\v17\Browse.VC.db). I don't know if they're compatible, but I get the same pattern of behaviour (cpptools.exe eventually exits cleanly and the message about the language server crashing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Language Service regression A bug that didn't exist in a previous release reliability
Projects
Status: No status
Development

No branches or pull requests

2 participants