vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

Crash in query_include_path_suggestions_impl

Open Kracken256 opened this issue 6 months ago • 12 comments

Environment

  • OS and Version: Linux Mint 21.3 Virginia / Linux pc 6.5.0-1027-oem # 28-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 25 13:32:46 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
  • VS Code Version: 1.92.1 eaa41d57266683296de7d118f574d0c2652e1fc4 x64
  • C/C++ Extension Version: v1.21.6
  • If using SSH remote, specify OS of remote machine: N/a

Bug Summary and Steps to Reproduce

Bug Summary: Language server crashing (SEGSEV) on moderately large project. My project makes extensive use of C++ macros, templates, and abstractions in general. The source code of my project is GitHub Repo

Steps to reproduce:

  1. Use the VSCode as normal
  2. Language server keeps randomly crashing on my project (20+ times in 10 minutes).

Expected behavior:

  1. Not to crash / not to segfault

Configuration and Logs

{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
                "${workspaceFolder}/libquix-core/include",
                "${workspaceFolder}/libquix-lexer/include",
                "${workspaceFolder}/libquix-parser/include",
                "${workspaceFolder}/libquix-parser/src",
                "${workspaceFolder}/libquix-qxir/include",
                "${workspaceFolder}/libquix-qxir/src",
                "${workspaceFolder}/qpkg/src"
            ],
            "defines": [],
            "cStandard": "c23",
            "cppStandard": "c++20",
            "intelliSenseMode": "linux-gcc-x64"
        }
    ],
    "version": 4
}

/// ==============================================================================
/// CALL TRACE
/// ==============================================================================

A C/C++ extension process has crashed. The crashing process name, date/time, signal, and call stack are below -- it would be helpful to include that in a bug report at https://github.com/Microsoft/vscode-cpptools/issues.

cpptools
8/8/2024, 10:53:52 AM
SIGSEGV
browse_engine::query_include_path_suggestions_impl(std::string const&, std::set<std::string, std::less<std::string>>&, bool, std::map<code_store::record_id_t<code_store::file_tag_t>, std::string, std::less<code_store::record_id_t<code_store::file_tag_t>>, std::allocator<std::pair<code_store::record_id_t<code_store::file_tag_t> const, std::string>>>*)+290
browse_engine::query_include_path_suggestions(std::string const&, std::map<code_store::record_id_t<code_store::file_tag_t>, std::string, std::less<code_store::record_id_t<code_store::file_tag_t>>, std::allocator<std::pair<code_store::record_id_t<code_store::file_tag_t> const, std::string>>>&)+84
browse_engine::parse_file(std::shared_ptr<workspace_folder_context> const&, char const*, code_store::record_id_t<code_store::file_tag_t> const&, std::unordered_set<code_store::record_id_t<code_store::file_tag_t>, std::hash<code_store::record_id_t<code_store::file_tag_t>>, std::equal_to<code_store::record_id_t<code_store::file_tag_t>>, std::allocator<code_store::record_id_t<code_store::file_tag_t>>>&, std::string const&, std::set<std::string, std::less<std::string>> const&, parser&, std::function<void (msvc::result_t)>&&, std::shared_ptr<browse_include_paths> const&, bool)+4617
browse_engine::parse_file(std::shared_ptr<workspace_folder_context> const&, char const*, bool, std::function<void (msvc::result_t)>&&, std::shared_ptr<browse_include_paths> const&, bool)+1201
cpptools_context::handle_parse_file(cpptools_context::file_and_task_token&&)+835
msvc::thread_manager_t::queue_item<msvc::deque_thread<cpptools_context::file_and_task_token>::defer(cpptools_context::file_and_task_token&&)::{lambda()#1}>::operator()()+340
msvc::thread_manager_t::do_work(unsigned int)+486

Other Extensions

  1. GitHub copilot
  2. C++ Themes

Additional context

The full debug log cxx-log.txt

Kracken256 avatar Aug 08 '24 21:08 Kracken256