microsoft / microsoft/vscode-cpptools
language server crash repeatedly probably because of the database file
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Environment
- OS and Version: macOS Sequoia 15.1
- VS Code Version: 1.95.1 (Universal) Commit: 65edc4939843c90c34d61f4ce11704f09d3e5cb6
- C/C++ Extension Version: v1.22.11
- If using SSH remote, specify OS of remote machine: Ubuntu 22.04.4 LTS
Bug Summary and Steps to Reproduce
Bug Summary:
language server crashes
Steps to reproduce:
- it reproduces randomly while going through c/cpp files in the project
Expected behavior:
language server doesn't crash
the issue is averted if following these instructions and changing the value of databaseFilename: https://github.com/microsoft/vscode-cpptools/issues/2296#issuecomment-406453073
Configuration and Logs
Debug logs:
this lines repeats a lot, can't share more because of company policy
Unable to add file to database, error = 0x8064000b: ...
crash call stack:
browse_engine::query_translation_unit_source(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*) (Unknown Source:0)
intellisense_client_manager::find_existing_intellisense_client(msvc::locked_object<intellisense_client_manager::maps, std::recursive_mutex, std::unique_lock> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool, bool, bool&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, bool&, bool&) (Unknown Source:0)
intellisense_client_manager::acquire_intellisense_client(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, acquire_intellisense_client_options const&, std::function<void (intellisense_client_reference&&)>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::function<bool ()> const&)::{lambda()#2}::operator()() (Unknown Source:0)
msvc::thread_manager_t::do_work(unsigned int) (Unknown Source:0)
msvc::thread_helper_t::thread_entry(void*) (Unknown Source:0)
libc.so!start (Unknown Source:0)
libc.so!__clone (Unknown Source:0)
[Unknown/Just-In-Time compiled code] (Unknown Source:0)
partial content of ~/.vscode-server/data/Machine/settings.json
some values redacted
{
// ...
"C_Cpp.default.compilerPath": "/usr/bin/gcc",
"C_Cpp.default.cStandard": "gnu17",
"C_Cpp.default.cppStandard": "gnu++17",
"C_Cpp.default.defines": ["<PROJECT_SPECIFIC_DEFINE>"],
"C_Cpp.default.includePath": [
"${env:HOME}/<SOME_SDK_PATH>",
"${env:HOME}/<SOME_SDK_PATH>/include",
"${workspaceFolder}/**",
"${workspaceFolder}/include",
"${workspaceFolder}/src",
// 40 lines of different folders under ${workspaceFolder}
],
"C_Cpp.default.forcedInclude": [
// 4 .h files from some includes under ${workspaceFolder}
],
Other Extensions
No response
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the crash while browsing C/C++ files and reviewing the repeated “Unable to add file to database” message alongside the supplied call stack. Done means the language server no longer crashes in this scenario and the database error is addressed; no source file or test is identified in the report.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100