Skip to content

Frequent IntelliSense crash on macOS #4302

@jryans

Description

@jryans

Type: LanguageService

Describe the bug

  • OS and Version: macOS 10.14.6
  • VS Code Version: 1.38.1
  • C/C++ Extension Version: 0.25.1

IntelliSense indexing seems to crash regularly for me. Here's an example stack trace:

Stack trace
0   Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x0000000100295a5b add_symbol_to_overload_list + 539
1   Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x0000000100295e8b enter_overloaded_symbol + 267
2   Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x0000000100059ed5 decl_member_function_template + 469
3   Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x0000000100057b32 class_member_declaration + 13362
4   Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x000000010005c27b class_member_template_declaration + 123
5   Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001002d1800 template_declaration + 6608
6   Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001002c361f template_or_specialization_declaration + 5183
7   Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001002c212e template_directive_or_declaration + 910
8   Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x000000010005db89 scan_class_definition + 5177
9   Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001002a9cf5 f_instantiate_template_class_full + 3669
10  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001001399d0 cast_type_pre_check + 80
11  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x000000010011e96c scan_functional_notation_type_conversion + 1116
12  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x0000000100112062 scan_identifier + 2930
13  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001001018cb scan_expr_full + 1787
14  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x0000000100106e0d scan_decltype_operator + 685
15  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001001f17d9 f_is_generalized_identifier_start + 1753
16  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001000e7d06 decl_specifiers + 3846
17  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001000bee16 type_name_full + 214
18  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001000a95c5 function_declarator + 13765
19  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001000ae4cd r_declarator + 8237
20  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001000a998c declarator + 492
21  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x0000000100055cd4 class_member_declaration + 5588
22  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x000000010005c27b class_member_template_declaration + 123
23  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001002d1800 template_declaration + 6608
24  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001002c361f template_or_specialization_declaration + 5183
25  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001002c212e template_directive_or_declaration + 910
26  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x000000010005db89 scan_class_definition + 5177
27  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001002a9cf5 f_instantiate_template_class_full + 3669
28  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x000000010005f6d0 scan_base_specifier_list + 2736
29  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x000000010005d0da scan_class_definition + 2442
30  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x000000010020d3e6 get_definition_of_class + 918
31  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001002a92d5 f_instantiate_template_class_full + 1077
32  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x000000010005f6d0 scan_base_specifier_list + 2736
33  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x000000010005d0da scan_class_definition + 2442
34  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001000e0ae2 class_specifier + 14834
35  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001000e727f decl_specifiers + 1151
36  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x0000000100054c47 class_member_declaration + 1351
37  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x000000010005db11 scan_class_definition + 5057
38  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x000000010020d3e6 get_definition_of_class + 918
39  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001002a92d5 f_instantiate_template_class_full + 1077
40  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001001202f7 scan_dynamic_cast_operator + 967
41  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x000000010010413d scan_expr_full + 12141
42  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x000000010010e50d scan_expr_as_init_component + 205
43  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001000fb5a6 prescan_initializer_for_auto_type_deduction + 518
44  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001000d13ff initializer + 2623
45  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001000c924b scan_nonmember_declaration + 17979
46  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x0000000100289060 decl_statement + 272
47  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001002865e1 statement + 8305
48  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x0000000100283a39 compound_statement_full + 825
49  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x0000000100177b76 scan_function_body + 4790
50  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x000000010017acc1 function_definition + 4385
51  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001000c871b scan_nonmember_declaration + 15115
52  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001000ca660 declaration + 256
53  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x000000010034d088 compile_fragment((anonymous namespace)::a_fragment_buffer const&, a_canonicalized_file_name, unsigned long, unsigned long, unsigned long, bool, a_declaration_context const&, a_region_scope_info const&, std::__1::vector, std::__1::allocator >, std::__1::allocator, std::__1::allocator > > > const&, bool, bool, bool, bool*) + 2664
54  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x000000010034ae2b before_tu_wrapup + 571
55  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001002e5608 process_translation_unit + 760
56  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x0000000100041bf9 cfe_main + 121
57  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x0000000100309bb9 cfe_main_exception_handler + 9
58  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x0000000100041cf9 edg_main + 9
59  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001002ff88b invoke_edge_compiler(std::__1::vector, std::__1::allocator >, std::__1::allocator, std::__1::allocator > > >&) + 9595
60  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x00000001002fd1f9 edge_compiler_main(int, char const**) + 105
61  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x000000010034b3d3 preparse(int, char const**, a_scout_store*, edge::translation_unit*) + 227
62  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x0000000100317f29 a_compiler_thread::compiler_thread_routine(a_compiler_thread*) + 89
63  Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin	0x000000010034308c void* std::__1::__thread_proxy >, void (*)(a_compiler_thread*), a_compiler_thread*> >(void*) + 44
64  libsystem_pthread.dylib       	0x00007fff5ca412eb _pthread_body + 126
65  libsystem_pthread.dylib       	0x00007fff5ca44249 _pthread_start + 66
66  libsystem_pthread.dylib       	0x00007fff5ca4040d thread_start + 13

To Reproduce
This seems to happen across a variety of projects, but to reproduce what I was doing just now:

  1. Clone https://github.com/stephenrkell/liballocs
  2. Check out submodules with git submodule update --init --recursive
  3. Open the file tools/dumptypes.cpp
  4. Hover near line 67:
static string typename_for_vaddr_interval(iterator_df<subprogram_die> i_subp,
	const boost::icl::discrete_interval<Dwarf_Off> interval);
  1. You should see an IntelliSense crash within ~5 seconds

Expected behavior
I expect IntelliSense to work without crashing.

Screenshots
2019-09-22 at 21 28

Additional context

  • No per-project C++ settings / c_cpp_properties.json in use
  • All C++ extension settings at default, except for:
  "C_Cpp.dimInactiveRegions": false,
  "C_Cpp.clang_format_fallbackStyle": "Mozilla",

Metadata

Metadata

Assignees

No one assigned

    Labels

    Language ServiceVisual StudioInherited from Visual StudiobugfixedCheck the Milestone for the release in which the fix is or will be available.reliabilityverifiedBug has been reproduced

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions