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

0.22.0: Language server crash in translate_encoding_to_utf8 #12652

Closed
tuxStarElan opened this issue Aug 29, 2024 · 4 comments
Closed

0.22.0: Language server crash in translate_encoding_to_utf8 #12652

tuxStarElan opened this issue Aug 29, 2024 · 4 comments
Assignees
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. insiders Currently only repros with our latest Insiders release. Language Service regression A bug that didn't exist in a previous release reliability
Milestone

Comments

@tuxStarElan
Copy link

tuxStarElan commented Aug 29, 2024

Environment

  • OS and Version: Linux x64 4.18.0-553.16.1.el8_10.x86_64
  • VS Code Version: 1.92.2
  • C/C++ Extension Version: 1.22.0
  • If using SSH remote, specify OS of remote machine: Window10 64

Bug Summary and Steps to Reproduce

Bug Summary:
the language server crashes during initial workspace parsing

Steps to reproduce:
open workspace and open a cpp file

Expected behavior:
no crash

Configuration and Logs

output from "C/C++ crash call stacks":


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/29/2024, 9:49:47 AM
SIGSEGV
msvc::translate_encoding_to_utf8(std::span<unsigned char const, 18446744073709551615ul>, msvc::buffer&, msvc::document_encoding_e, msvc::document_encoding_e*)+193
msvc::random_file_buffer::load_entire_file()+280
msvc::random_file_buffer::random_file_buffer(msvc::basic_zstring_view)+422
direct_buffer_t::direct_buffer_t(msvc::basic_zstring_view, bool)+154
edge_file_buf_t::init(msvc::basic_zstring_view, std::shared_ptr<host_buffer> const&)+247
edge_system_t::create_edge_file_buf(msvc::basic_zstring_view, std::shared_ptr<host_buffer> const&)+587
edge_system_t::find_or_create_edge_file_buf(msvc::canonicalized_file_path_t const&, snapshot::snapshot_session_t, bool)+737
edge_system_t::find_or_create_file_buffer(msvc::basic_zstring_view, snapshot::snapshot_session_t const&, msvc::buffer_kind_e)+126
edge::file_buffer::open(char const*, snapshot::snapshot_session_t, msvc::buffer_kind_e, a_canonicalized_file_name*)+303
edge::file_buffer::open(char const*, msvc::buffer_kind_e)+78
a_file_buffer_stream::create(char const*)+47
open_input_stream(char const*)+368
open_source_file(char const*, an_open_file_result*, a_unicode_source_kind*)+73
open_source_file_with_error_handling(char const*, int, an_open_file_result*, a_unicode_source_kind*)+36
…
open_file_and_push_input_stack(char const*, int, int, int, int, int, int, int, int, int*, int, int, int, char const*, char const**)+289
…
fe_init_part_2()+15
run_tag_parser()+429
process_translation_unit(char const*, int, an_exported_template_file*)+641
cfe_main(int, char**)+121
cfe_main_exception_handler(int, char**)+13
edg_main(int, char**)+13

Other Extensions

No response

Additional context

No response

@sean-mcmanus sean-mcmanus added this to the 1.22.1 milestone Aug 29, 2024
@sean-mcmanus sean-mcmanus added bug Language Service reliability regression A bug that didn't exist in a previous release labels Aug 29, 2024
@sean-mcmanus sean-mcmanus moved this to Done in cpptools Aug 29, 2024
@sean-mcmanus sean-mcmanus added the fixed Check the Milestone for the release in which the fix is or will be available. label Aug 29, 2024
@sean-mcmanus
Copy link
Contributor

@tuxStarElan We have a potential fix for 1.22.1, but we haven't been able to verify our fix yet. Do you know what encoding your files are using?

@sean-mcmanus sean-mcmanus changed the title language server crash Language server crash in translate_encoding_to_utf8 Aug 29, 2024
@sean-mcmanus sean-mcmanus changed the title Language server crash in translate_encoding_to_utf8 0.22.0: Language server crash in translate_encoding_to_utf8 Aug 29, 2024
@sean-mcmanus sean-mcmanus added the insiders Currently only repros with our latest Insiders release. label Aug 29, 2024
@sean-mcmanus sean-mcmanus pinned this issue Aug 29, 2024
@sean-mcmanus
Copy link
Contributor

@tuxStarElan This might be fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/v1.22.1, but we don't know for sure yet...

@sean-mcmanus sean-mcmanus unpinned this issue Aug 29, 2024
@Sleinmaster
Copy link

@sean-mcmanus seems to be fixed for me with version 1.22.2 (went from 1.22.0 directly to 1.22.2).

@sean-mcmanus
Copy link
Contributor

@Sleinmaster Yes, I can also confirm now that it's fixed with 1.22.2 (1.22.1 had an unrelated bug that got fixed with 1.22.2).

@github-actions github-actions bot locked and limited conversation to collaborators Oct 15, 2024
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. insiders Currently only repros with our latest Insiders release. Language Service regression A bug that didn't exist in a previous release reliability
Projects
Status: Done
Development

No branches or pull requests

4 participants