Skip to content

cpptools_srv crashes in cpptools_srv!form_type_specifier() #13925

@copyrat90

Description

@copyrat90

Environment

  • OS and Version: Windows 11 Home (23H2, build 22631.5472)
  • VS Code Version: 1.104.0 (commit f220831ea)
  • C/C++ Extension Version: both 1.26.4 and 1.26.5

Bug Summary and Steps to Reproduce

Bug Summary:
After 1.26.4, cpptools-srv constantly crashes with this window whenever I edit the C++ source with compilerPath set to arm-none-eabi-gcc.exe for devkitARM toolchain.
Image
It previously worked without issues in 1.26.3.

Steps to reproduce:

  1. Install devkitARM toolchain
    • I use GBA Development option on the graphical installer
  2. Set the compilerPath to point its arm-non-eabi-gcc.exe
    • On Windows, the default path is C:/devkitPro/devkitARM/bin/arm-none-eabi-gcc.exe
  3. Start editing the code.
  4. You'll see the crash in a few seconds.

Configuration and Logs

`c_cpp_properties.json` { "configurations": [ { "name": "devkitARM", "includePath": [ "${workspaceFolder}/**" ], "compilerPath": "C:/devkitPro/devkitARM/bin/arm-none-eabi-gcc.exe", "cppStandard": "c++23", "cStandard": "c17" } ], "version": 4 }
Language server logging ... LSP: Sending response (id: 40) LSP: (received) cpptools/getFoldingRanges: file:///c%3A/Users/Home/test4/main.cpp (id: 41) LSP: (invoked) cpptools/getFoldingRanges: file:///c%3A/Users/Home/test4/main.cpp (id: 41) LSP: Sending response (id: 41) LSP: (received) textDocument/willSaveWaitUntil: file:///c%3A/Users/Home/test4/main.cpp (id: 42) Intellisense update pending for: file:///c%3A/Users/Home/test4/main.cpp LSP: (invoked) textDocument/willSaveWaitUntil: file:///c%3A/Users/Home/test4/main.cpp (id: 42) LSP: Sending response (id: 42) willSaveWaitUntil: 0ms LSP: (received) textDocument/didSave: file:///c%3A/Users/Home/test4/main.cpp LSP: (invoked) textDocument/didSave: file:///c%3A/Users/Home/test4/main.cpp LSP: $/cancelRequest (textDocument/completion, id: 31) LSP: (received) cpptools/fileChanged: file:///c%3A/Users/Home/test4/main.cpp LSP: (invoked) cpptools/fileChanged: file:///c%3A/Users/Home/test4/main.cpp tag parsing file: C:\Users\Home\test4\main.cpp IntelliSense update scheduled and TU acquisition started for: file:///c%3A/Users/Home/test4/main.cpp IntelliSense process crash detected: handle_completion Update IntelliSense time (sec): 0.017 Shutting down IntelliSense server: C:\Users\Home\test4\main.cpp
C/C++: Log Diagnostics -------- Diagnostics - 9/12/2025, 9:45:29 AM Version: 1.26.5 Current Configuration: { "name": "devkitARM", "includePath": [ "c:/Users/Home/test4/**" ], "compilerPath": "C:/devkitPro/devkitARM/bin/arm-none-eabi-gcc.exe", "cppStandard": "c++23", "cStandard": "c17", "compilerPathIsExplicit": true, "cStandardIsExplicit": true, "cppStandardIsExplicit": true, "intelliSenseModeIsExplicit": true, "recursiveIncludesReduceIsExplicit": false, "recursiveIncludesPriorityIsExplicit": false, "recursiveIncludesOrderIsExplicit": false, "compilerPathInCppPropertiesJson": "C:/devkitPro/devkitARM/bin/arm-none-eabi-gcc.exe", "defines": [ "LOCAL" ], "intelliSenseMode": "windows-gcc-x64", "mergeConfigurations": false, "recursiveIncludes": {}, "browse": { "limitSymbolsToIncludedHeaders": true } } Modified Settings: { "C_Cpp.default.defines": [ "LOCAL" ], "C_Cpp.default.intelliSenseMode": "windows-gcc-x64", "C_Cpp.default.compilerPath": "C:/Library/mingw64/bin/g++.exe", "C_Cpp.default.cppStandard": "c++20", "C_Cpp.loggingLevel": "Debug", "C_Cpp.copilotHover": "disabled" } Additional Tracked Settings: { "editorTabSize": 4, "editorInsertSpaces": true, "editorAutoClosingBrackets": "languageDefined", "filesEncoding": "utf8", "filesAssociations": {}, "filesExclude": { "**/.git": true, "**/.svn": true, "**/.hg": true, "**/.DS_Store": true, "**/Thumbs.db": true }, "filesAutoSaveAfterDelay": true, "editorInlayHintsEnabled": true, "editorParameterHintsEnabled": true, "searchExclude": { "**/node_modules": true, "**/bower_components": true, "**/*.code-search": true }, "workbenchSettingsEditor": "ui" } cpptools version (native): 1.26.4.0 Current database path: C:\USERS\HOME\APPDATA\LOCAL\MICROSOFT\VSCODE-CPPTOOLS\429A146AB812450C7DEF67187448064E\.BROWSE.VC.DB Translation Unit Mappings: [ C:\Users\Home\test4\main.cpp - source TU]: Translation Unit Configurations: [ C:\Users\Home\test4\main.cpp ] Process ID: 9528 Memory Usage: 172 MB Compiler Path: C:\devkitPro\devkitARM\bin\arm-none-eabi-gcc.exe Include paths: system include: C:\devkitPro\devkitARM\arm-none-eabi\include\c++\15.1.0 system include: C:\devkitPro\devkitARM\arm-none-eabi\include\c++\15.1.0\arm-none-eabi system include: C:\devkitPro\devkitARM\arm-none-eabi\include\c++\15.1.0\backward system include: C:\devkitPro\devkitARM\lib\gcc\arm-none-eabi\15.1.0\include system include: C:\devkitPro\devkitARM\lib\gcc\arm-none-eabi\15.1.0\include-fixed system include: C:\devkitPro\devkitARM\arm-none-eabi\include Defines: LOCAL Standard Version: c++23 IntelliSense Mode: windows-gcc-arm Other Flags: --g++ --gnu_version=150100 Total Memory Usage: 172 MB

------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 1129

Other Extensions

I've disabled all the other extensions, but the issue persists.

Additional context

Call stack of the cpptools-srv when crash happens:

ucrtbase.dll!abort() (Unknown Source:0)
ucrtbase.dll!terminate() (Unknown Source:0)
ucrtbase.dll!__C_specific_handler_noexcept() (Unknown Source:0)
ntdll.dll!RtlpExecuteHandlerForException() (Unknown Source:0)
ntdll.dll!RtlDispatchException() (Unknown Source:0)
ntdll.dll!KiUserExceptionDispatch() (Unknown Source:0)
KernelBase.dll!RaiseException() (Unknown Source:0)
vcruntime140.dll!_CxxThrowException(void * pExceptionObject, const _s__ThrowInfo * pThrowInfo) Line 80 (d:\a\_work\1\s\src\vctools\crt\vcruntime\src\eh\throw.cpp:80)
cpptools-srv.exe!cfe_throw(void) (Unknown Source:0)
cpptools-srv.exe!cfe_exit() (Unknown Source:0)
cpptools-srv.exe!exit_compilation(enum an_error_severity) (Unknown Source:0)
cpptools-srv.exe!term_compilation(enum an_error_severity) (Unknown Source:0)
cpptools-srv.exe!wrap_up_diagnostic() (Unknown Source:0)
cpptools-srv.exe!exit_unrecoverable_compilation(void) (Unknown Source:0)
cpptools-srv.exe!form_type_specifier() (Unknown Source:0)
cpptools-srv.exe!form_type_first_part(struct a_type *,int,int,unsigned int,int,struct an_il_to_str_output_control_block *) (Unknown Source:0)
cpptools-srv.exe!an_edge_typed_symbol_impl_t<struct edge::typedef_symbol>::form_declaration(struct msvc::buffer<char> *,unsigned int) (Unknown Source:0)
cpptools-srv.exe!``edge_intellisense_server_impl::handle_completion(struct cpp_intellisense::DocumentPosition const &,bool,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,struct cpp_intellisense::CompletionResponse &,struct snapshot::snapshot_session_t const &)'::`2'::<lambda_4>::operator()(class edge::intellisense_operation &,struct cpp_intellisense::CompletionResponse &)'::`2'::<lambda_3>::operator()(class std::unordered_map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct completion_item *,struct std::hash<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,struct std::equal_to<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,struct completion_item *> > > &,int) (Unknown Source:0)
cpptools-srv.exe!`edge_intellisense_server_impl::handle_completion(struct cpp_intellisense::DocumentPosition const &,bool,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,struct cpp_intellisense::CompletionResponse &,struct snapshot::snapshot_session_t const &)'::`2'::<lambda_4>::operator()(class edge::intellisense_operation &,struct cpp_intellisense::CompletionResponse &) (Unknown Source:0)
cpptools-srv.exe!edge_intellisense_operation::perform_isense_operation_helper<struct cpp_intellisense::CompletionResponse>(char const *,class edge::intellisense_operation &,struct a_canonicalized_file_name,class std::function<void (class edge::intellisense_operation &,struct cpp_intellisense::CompletionResponse &)> &&,struct cpp_intellisense::CompletionResponse &,struct snapshot::snapshot_session_t const &) (Unknown Source:0)
cpptools-srv.exe!edge_intellisense_operation::perform_isense_operation<struct cpp_intellisense::CompletionResponse>(char const *,struct edge::file_position const &,class std::function<void (class edge::intellisense_operation &,struct cpp_intellisense::CompletionResponse &)> &&,struct cpp_intellisense::CompletionResponse &,struct snapshot::snapshot_session_t const &,bool) (Unknown Source:0)
cpptools-srv.exe!edge_intellisense_server_impl::handle_completion(struct cpp_intellisense::DocumentPosition const &,bool,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,struct cpp_intellisense::CompletionResponse &,struct snapshot::snapshot_session_t const &) (Unknown Source:0)
cpptools-srv.exe!cpp_intellisense::server_stub::handle_completion(class msvc::deserializer_t &,class msvc::serializer_t &) (Unknown Source:0)
cpptools-srv.exe!msvc::base_channel_t::dispatch_message(class std::vector<unsigned char,class std::allocator<unsigned char> > const &,class std::vector<unsigned char,class std::allocator<unsigned char> > &) (Unknown Source:0)
cpptools-srv.exe!msvc::common_channel_t::perform_call(unsigned int,class std::vector<unsigned char,class std::allocator<unsigned char> > const &) (Unknown Source:0)
cpptools-srv.exe!worker() (Unknown Source:0)
cpptools-srv.exe!uv__thread_start() (Unknown Source:0)
ucrtbase.dll!thread_start<unsigned int (__cdecl*)(void *),1>() (Unknown Source:0)
kernel32.dll!BaseThreadInitThunk() (Unknown Source:0)
ntdll.dll!RtlUserThreadStart() (Unknown Source:0)

Metadata

Metadata

Assignees

Labels

Language ServiceVisual StudioInherited from Visual StudiobugfixedCheck the Milestone for the release in which the fix is or will be available.parser

Type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions