microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.52k stars 1.55k forks source link

rapid "IntelliSense process crash detected" for multiple crash types like request completion, update intellisence, etc. #11753

Open diablodale opened 10 months ago

diablodale commented 10 months ago

Environment

Summary

The last 2-3 days, the intellisense features are severely degraded. I suspect my code (or that of libraries) from this week has exposed a bug in some part of Intellisense. As I add more code (often c++20 and Eigen), I feel like it is continuing to degrade. As of now (Saturday), completion usually does not work. Meaning, when I have a var or class and I type the . or :: then nothing appears. Last week...I got completion lists of types, members, etc.

Now...nothing except for crashes and the cpptools window noticing the crash

IntelliSense process crash detected: handle_update_intellisense
IntelliSense process crash detected: handle_quick_info
IntelliSense process crash detected: handle_completion
...and more

Repro

  1. Have code that has classes in namespaces, or members in the classes.
  2. Type myclass:: and wait for the completion

I know you want a minimal repro. I am unable to dedicate the tremendous resources needed to explore my entire codebase for how it would cause Intellisense to crash. I get the value in having bunch of cpp files to see it yourself, just not gonna happen with my scenario.

Result

Nothing happens. No completion list appears.

Expected

A list of members in the class, a list of functions, etc.

Configuration and Logs

I have no separate cpp-prop.json file. my settings are in settings.json

"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
    "C_Cpp.default.intelliSenseMode": "msvc-x64",
    "C_Cpp.default.cStandard": "c11",
    "C_Cpp.default.cppStandard": "c++20",
    "C_Cpp.default.compileCommands": "${workspaceFolder}/build/compile_commands.json",
    "C_Cpp.default.includePath": [
        "${workspaceFolder}/build"
    ],
    "C_Cpp.default.defines": [
        "RC_INVOKED"
    ],
    "C_Cpp.vcpkg.enabled": true,
    "C_Cpp.codeAnalysis.clangTidy.enabled": false,
    "C_Cpp.codeAnalysis.clangTidy.args": [
        "--extra-arg=-ferror-limit=1",
    ],

Other Extensions

I have 30 extensions active, 3 of which are the cpp tools pack. Another 4 or 5 are the msft remotes. and so on. I will not be disabling 27 extensions at this time. I do not remember add/removing any extensions this week. But extensions might have updated themselves in-place.

I did disable copilot hoping that was the cause. However, was not. With copilot disabled I reproduced the symptoms and crashes.

Additional context

The symbols downloaded, and I attached to cpptools-srv. Often, the attach quietly ends. I'm trying to repro the crash...and then...I'm unexpectedly not attached anymore. If I were to guess, something is not a "crash/assert" and is causing the cpp-srv to exit. Which naturally ends the attach. Looks like https://github.com/microsoft/vscode-cpptools/issues/6151 wasn't completely fixed. Also...your instructions at https://github.com/microsoft/vscode-cpptools/wiki/Attaching-debugger-to-cpptools-or-cpptools%E2%80%90srv link to that now closed/fixed bug...time to update the instructions ;-)

I had to repeatedly attach over and over and finally got a crash that caused the debugger to halt. But there is nothing interesting in the call stack. I see no symbolic info...

cpptools-srv.exe!00000001403d8203() (Unknown Source:0)
cpptools-srv.exe!00000001403d9b9c() (Unknown Source:0)
cpptools-srv.exe!000000014039a18e() (Unknown Source:0)
cpptools-srv.exe!00000001403cc6e8() (Unknown Source:0)
cpptools-srv.exe!00000001403d9d4e() (Unknown Source:0)
cpptools-srv.exe!00000001403da057() (Unknown Source:0)
cpptools-srv.exe!000000014039f038() (Unknown Source:0)
cpptools-srv.exe!00000001403cca2a() (Unknown Source:0)
cpptools-srv.exe!00000001403d9d4e() (Unknown Source:0)
cpptools-srv.exe!00000001403da057() (Unknown Source:0)
cpptools-srv.exe!00000001403a70bc() (Unknown Source:0)
cpptools-srv.exe!00000001403ccab7() (Unknown Source:0)
cpptools-srv.exe!00000001403cd407() (Unknown Source:0)
cpptools-srv.exe!000000014015e653() (Unknown Source:0)
cpptools-srv.exe!0000000140161ffe() (Unknown Source:0)
cpptools-srv.exe!00000001401626ee() (Unknown Source:0)
cpptools-srv.exe!00000001402efbce() (Unknown Source:0)
cpptools-srv.exe!00000001402f09b4() (Unknown Source:0)
cpptools-srv.exe!00000001402f1594() (Unknown Source:0)
cpptools-srv.exe!00000001402f4c07() (Unknown Source:0)
cpptools-srv.exe!00000001402f3520() (Unknown Source:0)
cpptools-srv.exe!00000001402f2126() (Unknown Source:0)
cpptools-srv.exe!0000000140160985() (Unknown Source:0)
cpptools-srv.exe!00000001403cb643() (Unknown Source:0)
cpptools-srv.exe!00000001403cc510() (Unknown Source:0)
cpptools-srv.exe!00000001403d9d4e() (Unknown Source:0)
cpptools-srv.exe!00000001403da057() (Unknown Source:0)
cpptools-srv.exe!000000014039f038() (Unknown Source:0)
cpptools-srv.exe!00000001403cca2a() (Unknown Source:0)
cpptools-srv.exe!00000001403cd407() (Unknown Source:0)
cpptools-srv.exe!000000014015e653() (Unknown Source:0)
cpptools-srv.exe!00000001403fdb0d() (Unknown Source:0)
cpptools-srv.exe!0000000140178116() (Unknown Source:0)
cpptools-srv.exe!0000000140245bfe() (Unknown Source:0)
cpptools-srv.exe!0000000140247823() (Unknown Source:0)
cpptools-srv.exe!000000014024d4cc() (Unknown Source:0)
cpptools-srv.exe!000000014025315f() (Unknown Source:0)
cpptools-srv.exe!000000014036bfad() (Unknown Source:0)
cpptools-srv.exe!0000000140391477() (Unknown Source:0)
cpptools-srv.exe!00000001403b94eb() (Unknown Source:0)
cpptools-srv.exe!0000000140361c18() (Unknown Source:0)
cpptools-srv.exe!000000014036201c() (Unknown Source:0)
cpptools-srv.exe!0000000140362ce9() (Unknown Source:0)
cpptools-srv.exe!000000014036bdf2() (Unknown Source:0)
cpptools-srv.exe!0000000140391477() (Unknown Source:0)
cpptools-srv.exe!00000001403b94eb() (Unknown Source:0)
cpptools-srv.exe!00000001403ba42d() (Unknown Source:0)
cpptools-srv.exe!00000001405d89f3() (Unknown Source:0)
cpptools-srv.exe!00000001405de82d() (Unknown Source:0)
cpptools-srv.exe!00000001405df3c1() (Unknown Source:0)
cpptools-srv.exe!00000001405dd917() (Unknown Source:0)
cpptools-srv.exe!00000001405d5e5f() (Unknown Source:0)
cpptools-srv.exe!00000001405dd934() (Unknown Source:0)
cpptools-srv.exe!00000001405df3c1() (Unknown Source:0)
cpptools-srv.exe!000000014046d74f() (Unknown Source:0)
cpptools-srv.exe!000000014046fc58() (Unknown Source:0)
cpptools-srv.exe!00000001401e343b() (Unknown Source:0)
cpptools-srv.exe!00000001401ec00c() (Unknown Source:0)
cpptools-srv.exe!00000001401ecb38() (Unknown Source:0)
cpptools-srv.exe!00000001401def66() (Unknown Source:0)
cpptools-srv.exe!00000001401deef6() (Unknown Source:0)
cpptools-srv.exe!00000001401e9f04() (Unknown Source:0)
cpptools-srv.exe!00000001401eb942() (Unknown Source:0)
cpptools-srv.exe!00000001401ecb38() (Unknown Source:0)
cpptools-srv.exe!000000014019c629() (Unknown Source:0)
cpptools-srv.exe!000000014019b254() (Unknown Source:0)
cpptools-srv.exe!000000014019a6ff() (Unknown Source:0)
cpptools-srv.exe!00000001404d68bb() (Unknown Source:0)
cpptools-srv.exe!00000001405ff249() (Unknown Source:0)
cpptools-srv.exe!000000014054ad59() (Unknown Source:0)
cpptools-srv.exe!000000014053c300() (Unknown Source:0)
cpptools-srv.exe!000000014053c664() (Unknown Source:0)
cpptools-srv.exe!00000001400c5f38() (Unknown Source:0)
cpptools-srv.exe!00000001407e26db() (Unknown Source:0)
cpptools-srv.exe!00000001408f214a() (Unknown Source:0)
kernel32.dll!BaseThreadInitThunk() (Unknown Source:0)
ntdll.dll!RtlUserThreadStart() (Unknown Source:0)

One time I saw two cpptools-srv processes listed.

The debug console has more interesting info. ITs a lot. Often complaining

<- (E) {"seq":1012,"type":"event","event":"output","body":{"category":"stdout","output":"WER/CrashAPI:2693: ERROR Invalid args, too  big block\n"}}
WER/CrashAPI:2693: ERROR Invalid args, too  big block`

debug-console.txt

Here is another crash and the debugger halted. Again the call stack has only addresses, no symbols. Are you sure your current extensions's live code has matching symbols on the server?

cpptools-srv.exe!00000001403d8203() (Unknown Source:0)
cpptools-srv.exe!00000001403d9b9c() (Unknown Source:0)
cpptools-srv.exe!000000014039a18e() (Unknown Source:0)
cpptools-srv.exe!00000001403cc6e8() (Unknown Source:0)
cpptools-srv.exe!00000001403d9d4e() (Unknown Source:0)
cpptools-srv.exe!00000001403da057() (Unknown Source:0)
cpptools-srv.exe!000000014039f038() (Unknown Source:0)
cpptools-srv.exe!00000001403cca2a() (Unknown Source:0)
cpptools-srv.exe!00000001403d9d4e() (Unknown Source:0)
cpptools-srv.exe!00000001403da057() (Unknown Source:0)
cpptools-srv.exe!00000001403a70bc() (Unknown Source:0)
cpptools-srv.exe!00000001403ccab7() (Unknown Source:0)
cpptools-srv.exe!00000001403cd407() (Unknown Source:0)
cpptools-srv.exe!000000014015e653() (Unknown Source:0)
cpptools-srv.exe!0000000140161ffe() (Unknown Source:0)
cpptools-srv.exe!00000001401626ee() (Unknown Source:0)
cpptools-srv.exe!00000001402efbce() (Unknown Source:0)
cpptools-srv.exe!00000001402f09b4() (Unknown Source:0)
cpptools-srv.exe!00000001402f1594() (Unknown Source:0)
cpptools-srv.exe!00000001402f4c07() (Unknown Source:0)

and in the debug console shows a access violation in srv Exception thrown at 0x00000001403D8203 in cpptools-srv.exe: 0xC0000005: Access violation writing location 0x000000000000000C

<- (E) {"seq":23056,"type":"event","event":"output","body":{"category":"stdout","output":"WER/CrashAPI:2693: ERROR Invalid args, too  big block\n"}}
WER/CrashAPI:2693: ERROR Invalid args, too  big block
<- (E) {"seq":23058,"type":"event","event":"output","body":{"category":"stdout","output":"WER/CrashAPI:2693: ERROR Invalid args, too  big block\n"}}
WER/CrashAPI:2693: ERROR Invalid args, too  big block
<- (E) {"seq":23060,"type":"event","event":"output","body":{"category":"stdout","output":"WER/CrashAPI:2693: ERROR Invalid args, too  big block\n"}}
WER/CrashAPI:2693: ERROR Invalid args, too  big block
<- (E) {"seq":23062,"type":"event","event":"output","body":{"category":"stdout","output":"WER/CrashAPI:2693: ERROR Invalid args, too  big block\n"}}
WER/CrashAPI:2693: ERROR Invalid args, too  big block
<- (E) {"seq":23064,"type":"event","event":"output","body":{"category":"console","output":"Exception thrown at 0x00000001403D8203 in cpptools-srv.exe: 0xC0000005: Access violation writing location 0x000000000000000C.\n"}}
Exception thrown at 0x00000001403D8203 in cpptools-srv.exe: 0xC0000005: Access violation writing location 0x000000000000000C.
<- (E) {"seq":23066,"type":"event","event":"stopped","body":{"reason":"exception","threadId":29020,"text":"Unhandled exception at 0x00000001403D8203 in cpptools-srv.exe: 0xC0000005: Access violation writing location 0x000000000000000C.","allThreadsStopped":true}}
-> (C) {"command":"threads","type":"request","seq":13}
<- (R) {"seq":23069,"type":"response","request_seq":13,"success":true,"command":"threads","body":{"threads":[{"id":4472,"name":"Main Thread"},{"id":22932,"name":"cpptools-srv.exe thread"},{"id":26208,"name":"cpptools-srv.exe thread"},{"id":23620,"name":"cpptools-srv.exe thread"},{"id":26284,"name":"cpptools-srv.exe thread"},{"id":1880,"name":"cpptools-srv.exe thread"},{"id":25128,"name":"cpptools-srv.exe thread"},{"id":7608,"name":"cpptools-srv.exe thread"},{"id":27564,"name":"cpptools-srv.exe thread"},{"id":26824,"name":"cpptools-srv.exe thread"},{"id":29624,"name":"cpptools-srv.exe thread"},{"id":18524,"name":"cpptools-srv.exe thread"},{"id":11120,"name":"cpptools-srv.exe thread"},{"id":21296,"name":"cpptools-srv.exe thread"},{"id":29168,"name":"cpptools-srv.exe thread"},{"id":27168,"name":"cpptools-srv.exe thread"},{"id":18692,"name":"cpptools-srv.exe thread"},{"id":15768,"name":"cpptools-srv.exe thread"},{"id":24368,"name":"ntdll.dll!TppWorkerThread\u001E()"},{"id":924,"name":"ntdll.dll!TppWorkerThread\u001E()"},{"id":27212,"name":"cpptools-srv.exe thread"},{"id":12088,"name":"cpptools-srv.exe thread"},{"id":5640,"name":"cpptools-srv.exe thread"},{"id":24992,"name":"cpptools-srv.exe thread"},{"id":26796,"name":"cpptools-srv.exe thread"},{"id":29020,"name":"cpptools-srv.exe thread"},{"id":3916,"name":"ntdll.dll!TppWorkerThread\u001E()"}]}}
-> (C) {"command":"stackTrace","arguments":{"threadId":29020,"startFrame":0,"levels":20},"type":"request","seq":14}
<- (R) {"seq":23072,"type":"response","request_seq":14,"success":true,"command":"stackTrace","body":{"stackFrames":[{"id":1000,"name":"cpptools-srv.exe!00000001403d8203()","line":0,"column":0,"instructionPointerReference":"0x00000001403D8203","moduleId":1000},{"id":1001,"name":"cpptools-srv.exe!00000001403d9b9c()","line":0,"column":0,"instructionPointerReference":"0x00000001403D9B9C","moduleId":1000},{"id":1002,"name":"cpptools-srv.exe!000000014039a18e()","line":0,"column":0,"instructionPointerReference":"0x000000014039A18E","moduleId":1000},{"id":1003,"name":"cpptools-srv.exe!00000001403cc6e8()","line":0,"column":0,"instructionPointerReference":"0x00000001403CC6E8","moduleId":1000},{"id":1004,"name":"cpptools-srv.exe!00000001403d9d4e()","line":0,"column":0,"instructionPointerReference":"0x00000001403D9D4E","moduleId":1000},{"id":1005,"name":"cpptools-srv.exe!00000001403da057()","line":0,"column":0,"instructionPointerReference":"0x00000001403DA057","moduleId":1000},{"id":1006,"name":"cpptools-srv.exe!000000014039f038()","line":0,"column":0,"instructionPointerReference":"0x000000014039F038","moduleId":1000},{"id":1007,"name":"cpptools-srv.exe!00000001403cca2a()","line":0,"column":0,"instructionPointerReference":"0x00000001403CCA2A","moduleId":1000},{"id":1008,"name":"cpptools-srv.exe!00000001403d9d4e()","line":0,"column":0,"instructionPointerReference":"0x00000001403D9D4E","moduleId":1000},{"id":1009,"name":"cpptools-srv.exe!00000001403da057()","line":0,"column":0,"instructionPointerReference":"0x00000001403DA057","moduleId":1000},{"id":1010,"name":"cpptools-srv.exe!00000001403a70bc()","line":0,"column":0,"instructionPointerReference":"0x00000001403A70BC","moduleId":1000},{"id":1011,"name":"cpptools-srv.exe!00000001403ccab7()","line":0,"column":0,"instructionPointerReference":"0x00000001403CCAB7","moduleId":1000},{"id":1012,"name":"cpptools-srv.exe!00000001403cd407()","line":0,"column":0,"instructionPointerReference":"0x00000001403CD407","moduleId":1000},{"id":1013,"name":"cpptools-srv.exe!000000014015e653()","line":0,"column":0,"instructionPointerReference":"0x000000014015E653","moduleId":1000},{"id":1014,"name":"cpptools-srv.exe!0000000140161ffe()","line":0,"column":0,"instructionPointerReference":"0x0000000140161FFE","moduleId":1000},{"id":1015,"name":"cpptools-srv.exe!00000001401626ee()","line":0,"column":0,"instructionPointerReference":"0x00000001401626EE","moduleId":1000},{"id":1016,"name":"cpptools-srv.exe!00000001402efbce()","line":0,"column":0,"instructionPointerReference":"0x00000001402EFBCE","moduleId":1000},{"id":1017,"name":"cpptools-srv.exe!00000001402f09b4()","line":0,"column":0,"instructionPointerReference":"0x00000001402F09B4","moduleId":1000},{"id":1018,"name":"cpptools-srv.exe!00000001402f1594()","line":0,"column":0,"instructionPointerReference":"0x00000001402F1594","moduleId":1000},{"id":1019,"name":"cpptools-srv.exe!00000001402f4c07()","line":0,"column":0,"instructionPointerReference":"0x00000001402F4C07","moduleId":1000}],"totalFrames":77}}

I enabled DEBUG logging for cpp. In the c++ output window, is much private information. Though I saw the same errors at the top of this bug like IntelliSense process crash detected: handle_update_intellisense as well as many times Resetting IntelliSense server: Here is that log with the filepaths redacted, defines removed, etc. cpp-log.log

diablodale commented 10 months ago

I am unsuccessful having the debugger halt on crashes. I followed your instructions linked above to attach to the srv process. Then when I am using the editor and type . after a class instance, I see in the C++ output window IntelliSense process crash detected: handle_completion but the debugger doesn't halt. Instead, I see about 20 threads running. At the moment, I can reproduce the crash easily and repeatedly by typing a period at this place in code.

Whatever is crashing, is somehow not being caught by the debugger when I attach to the srv process.

diablodale commented 10 months ago

rolled back to v1.17.5 and v1.16.3. Both, I still get rapid intellisense crashes attempting completion. The only change is the C++ output window has a less specific crash notice IntelliSense process crash detected.

went foward to prerelease v1.19.1. I still get rapid intellisense crashes attempting completion.

IntelliSense process crash detected: handle_update_intellisense
IntelliSense process crash detected: handle_completion
sean-mcmanus commented 10 months ago

@diablodale Are you able to get a crash call stack with symbols using 1.17.5?

We've found and fixed one completion crash for 1.19.2, but I don't think it would be one that would occur repeatedly.

diablodale commented 10 months ago

Yes as in https://github.com/microsoft/vscode-cpptools/issues/11753#issuecomment-1837590616 both v1.17.5 and v1.16.3 reproduce the rapid crashes.

sean-mcmanus commented 10 months ago

@diablodale Yes, but with 1.17.5 you should be able to get symbols for a call stack. Symbols aren't published for 1.18.5/1.19.1.

diablodale commented 10 months ago

Oops. My bad. Ok, downgraded to v1.17.5 to get symbol👍and...

Having difficulty today reproducing the "crash" messages in C++ output window...but at the bottom i finally got two.

When I press . to complete, pretty much on demand, doesn't cause the debugger to halt. And I don't see a crash in the c++ out window. I see debug console...

-> (C) {"command":"threads","type":"request","seq":10}
<- (R) {"seq":754,"type":"response","request_seq":10,"success":true,"command":"threads","body":{"threads":[{"id":9632,"name":"Thread #9632"},{"id":21104,"name":"Thread #21104"},{"id":23524,"name":"Thread #23524"},{"id":18496,"name":"Thread #18496"},{"id":27312,"name":"Thread #27312"},{"id":11424,"name":"Thread #11424"},{"id":22136,"name":"Thread #22136"},{"id":7720,"name":"Thread #7720"},{"id":27368,"name":"Thread #27368"},{"id":4932,"name":"Thread #4932"},{"id":22504,"name":"Thread #22504"},{"id":11572,"name":"Thread #11572"},{"id":6380,"name":"Thread #6380"},{"id":22128,"name":"Thread #22128"},{"id":26808,"name":"Thread #26808"},{"id":14736,"name":"Thread #14736"},{"id":22048,"name":"Thread #22048"},{"id":26476,"name":"Thread #26476"},{"id":29380,"name":"Thread #29380"},{"id":24704,"name":"Thread #24704"},{"id":2648,"name":"Thread #2648"},{"id":19476,"name":"Thread #19476"},{"id":27144,"name":"Thread #27144"},{"id":21396,"name":"Thread #21396"},{"id":15436,"name":"Thread #15436"},{"id":19780,"name":"Thread #19780"},{"id":14760,"name":"Thread #14760"},{"id":25360,"name":"Thread #25360"},{"id":18984,"name":"Thread #18984"},{"id":26336,"name":"Thread #26336"},{"id":24604,"name":"Thread #24604"},{"id":27740,"name":"Thread #27740"},{"id":1608,"name":"Thread #1608"},{"id":8020,"name":"Thread #8020"},{"id":25224,"name":"Thread #25224"},{"id":24796,"name":"Thread #24796"},{"id":8444,"name":"Thread #8444"},{"id":28832,"name":"Thread #28832"},{"id":25312,"name":"Thread #25312"},{"id":2700,"name":"Thread #2700"},{"id":27604,"name":"Thread #27604"}]}}
<- (E) {"seq":756,"type":"event","event":"output","body":{"category":"stdout","output":"WER/CrashAPI:2693: ERROR Invalid args, too  big block\n"}}
WER/CrashAPI:2693: ERROR Invalid args, too  big block
<- (E) {"seq":758,"type":"event","event":"thread","body":{"reason":"exited","threadId":23524}}
<- (E) {"seq":760,"type":"event","event":"thread","body":{"reason":"exited","threadId":21104}}
<- (E) {"seq":762,"type":"event","event":"thread","body":{"reason":"exited","threadId":18496}}
<- (E) {"seq":764,"type":"event","event":"output","body":{"category":"stdout","output":"WER/CrashAPI:2693: ERROR Invalid args, too  big block\n"}}
WER/CrashAPI:2693: ERROR Invalid args, too  big block
<- (E) {"seq":766,"type":"event","event":"output","body":{"category":"stdout","output":"WER/CrashAPI:2693: ERROR Invalid args, too  big block\n"}}
WER/CrashAPI:2693: ERROR Invalid args, too  big block
<- (E) {"seq":768,"type":"event","event":"output","body":{"category":"stdout","output":"WER/CrashAPI:2693: ERROR Invalid args, too  big block\n"}}
WER/CrashAPI:2693: ERROR Invalid args, too  big block

Sometimes when intelli scans a new opened file, I see hundreds of WER PEB errors

- (E) {"seq":7691,"type":"event","event":"output","body":{"category":"stdout","output":"WER/CrashAPI:2882: ERROR PEB is not initialized\n"}}
WER/CrashAPI:2882: ERROR PEB is not initialized

followed by hundreds of the "WER too big block" errors.

As on the debugger...I see two or three cppsrv processes to attach and I chose one. Maybe i chose the wrong one. How can a person know which of the many to choose to debug? And again now, I detached and attach and again now there are three srv processes. So I chose the lower of them...randomly.

image

YEA...I got a crash

IntelliSense process crash detected.
IntelliSense process crash detected.

but the debugger doesn't halt. This suggests to me that whatever is crashing isn't the thing to which I've attached. What should I do?

diablodale commented 10 months ago

Just now, I can reproduce easily a IntelliSense process crash detected. by just hovering over a static member var I just added. I have both cpp and both srv processes attached...the degger shows 4 "cpptools crash" in the call stack window. Yet when I hover and I see the output window IntelliSense process crash detected. the debugger doesn't halt anything.

The only time I've seen this kind of behavior is when the compiled EXE was not compiled with the needed debugger hooks. Are you sure (like missing symbols) that v1.17.5 was compiled with needed debugger info (and uploaded the the vscode download location)?

Meanwhile, I turned on "All Exceptions" to get...something...and this occurred. Unknown if this is directly related to a "crash" appearing in the output window.

KernelBase.dll!RaiseException() (Unknown Source:0)
cpptools-srv.exe!_CxxThrowException() (Unknown Source:0)
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!before_tu_wrapup(void) (Unknown Source:0)
cpptools-srv.exe!process_translation_unit(char const *,int,struct an_exported_template_file *) (Unknown Source:0)
cpptools-srv.exe!cfe_main(int,char * * const) (Unknown Source:0)
cpptools-srv.exe!cfe_main_exception_handler(int,char * * const) (Unknown Source:0)
cpptools-srv.exe!invoke_edge_compiler() (Unknown Source:0)
cpptools-srv.exe!edge_compiler_main(int,char const * * const) (Unknown Source:0)
cpptools-srv.exe!a_compiler_thread::compiler_thread_routine(class a_compiler_thread *) (Unknown Source:0)
cpptools-srv.exe!msvc::thread_helper_t::thread_entry(void *) (Unknown Source:0)
cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>() (Unknown Source:0)
kernel32.dll!BaseThreadInitThunk() (Unknown Source:0)
ntdll.dll!RtlUserThreadStart() (Unknown Source:0)
diablodale commented 10 months ago

By turning on "All Exceptions" I can get the debugger to halt. When I hover over this specific static member, the debugger halts and I get this...

cpptools-srv.exe!clear_operand(enum an_operand_kind,struct an_operand *) (Unknown Source:0)
cpptools-srv.exe!get_expr_rescan_info(struct an_expr_node *,struct an_expr_rescan_info_entry *) (Unknown Source:0)
cpptools-srv.exe!scan_functional_notation_type_conversion() (Unknown Source:0)
cpptools-srv.exe!rescan_expr_with_substitution_internal(struct an_expr_node *,struct a_rescan_control_block *,int,struct an_operand *,struct an_operand *,int) (Unknown Source:0)
cpptools-srv.exe!make_rescan_operand_full(struct an_expr_node *,struct a_rescan_control_block *,int,struct an_operand *,struct an_operand *) (Unknown Source:0)
cpptools-srv.exe!make_rescan_operands(struct a_rescan_control_block *,struct an_operand *,struct an_operand *,struct an_operand *,struct a_source_position *,unsigned int *,struct a_source_position *) (Unknown Source:0)
cpptools-srv.exe!scan_eq_operator() (Unknown Source:0)
cpptools-srv.exe!rescan_expr_with_substitution_internal(struct an_expr_node *,struct a_rescan_control_block *,int,struct an_operand *,struct an_operand *,int) (Unknown Source:0)
cpptools-srv.exe!make_rescan_operand_full(struct an_expr_node *,struct a_rescan_control_block *,int,struct an_operand *,struct an_operand *) (Unknown Source:0)
cpptools-srv.exe!make_rescan_operands(struct a_rescan_control_block *,struct an_operand *,struct an_operand *,struct an_operand *,struct a_source_position *,unsigned int *,struct a_source_position *) (Unknown Source:0)
cpptools-srv.exe!scan_conditional_operator() (Unknown Source:0)
cpptools-srv.exe!rescan_expr_with_substitution_internal(struct an_expr_node *,struct a_rescan_control_block *,int,struct an_operand *,struct an_operand *,int) (Unknown Source:0)
cpptools-srv.exe!rescan_expr_with_substitution(struct an_expr_node *,struct a_type *,struct a_rescan_control_block *,struct a_constant *) (Unknown Source:0)
cpptools-srv.exe!copy_template_param_expr(struct an_expr_node *,struct a_template_arg *,struct a_template_param *,struct a_type *,struct a_source_position *,int,int *,struct a_ctws_state *,struct a_constant *,struct a_constant * *) (Unknown Source:0)
cpptools-srv.exe!copy_template_param_con(struct a_constant *,struct a_template_arg *,struct a_template_param *,struct a_type *,struct a_source_position *,int,int *,struct a_ctws_state *,struct a_constant *) (Unknown Source:0)
cpptools-srv.exe!copy_template_param_con_with_substitution(struct a_constant *,struct a_template_arg *,struct a_template_param *,struct a_type *,struct a_source_position *,int,int *,struct a_ctws_state *) (Unknown Source:0)
cpptools-srv.exe!substitute_template_argument() (Unknown Source:0)
cpptools-srv.exe!copy_template_arg_list_with_substitution(struct a_symbol *,struct a_template_arg *,struct a_template_param *,struct a_template_param *,struct a_template_arg *,struct a_template_param *,struct a_source_position *,int,int *,struct a_ctws_state *) (Unknown Source:0)
cpptools-srv.exe!copy_template_class_reference_with_substitution() (Unknown Source:0)
cpptools-srv.exe!copy_type_with_substitution(struct a_type *,struct a_template_arg *,struct a_template_param *,struct a_source_position *,int,int *,struct a_ctws_state *) (Unknown Source:0)
cpptools-srv.exe!copy_type_with_substitution(struct a_type *,struct a_template_arg *,struct a_template_param *,struct a_source_position *,int,int *,struct a_ctws_state *) (Unknown Source:0)
cpptools-srv.exe!copy_parent_type_with_substitution(struct a_symbol *,struct a_type *,struct a_template_arg *,struct a_template_param *,struct a_source_position *,int,struct a_type * *,int,int *,struct a_ctws_state *) (Unknown Source:0)
cpptools-srv.exe!symbol_for_template_param_unknown_entity_con_after_substitution(struct a_constant *,struct a_template_arg *,struct a_template_param *,struct a_source_position *,struct a_ctws_state *,int) (Unknown Source:0)
cpptools-srv.exe!make_operand_for_rescanned_identifier() (Unknown Source:0)
cpptools-srv.exe!rescan_expr_with_substitution_internal(struct an_expr_node *,struct a_rescan_control_block *,int,struct an_operand *,struct an_operand *,int) (Unknown Source:0)
cpptools-srv.exe!make_rescan_operand_full(struct an_expr_node *,struct a_rescan_control_block *,int,struct an_operand *,struct an_operand *) (Unknown Source:0)
cpptools-srv.exe!make_rescan_operands(struct a_rescan_control_block *,struct an_operand *,struct an_operand *,struct an_operand *,struct a_source_position *,unsigned int *,struct a_source_position *) (Unknown Source:0)
cpptools-srv.exe!scan_eq_operator() (Unknown Source:0)
cpptools-srv.exe!rescan_expr_with_substitution_internal(struct an_expr_node *,struct a_rescan_control_block *,int,struct an_operand *,struct an_operand *,int) (Unknown Source:0)
cpptools-srv.exe!rescan_expr_with_substitution(struct an_expr_node *,struct a_type *,struct a_rescan_control_block *,struct a_constant *) (Unknown Source:0)
cpptools-srv.exe!copy_template_param_expr(struct an_expr_node *,struct a_template_arg *,struct a_template_param *,struct a_type *,struct a_source_position *,int,int *,struct a_ctws_state *,struct a_constant *,struct a_constant * *) (Unknown Source:0)
cpptools-srv.exe!constraint_satisfied(struct an_expr_node *,struct a_template_arg *,struct a_template_param *,struct a_diag_list *,int,struct a_ctws_state *,int *,int *) (Unknown Source:0)
cpptools-srv.exe!resolve_pending_trailing_requires_clause(struct a_symbol *) (Unknown Source:0)
cpptools-srv.exe!determine_function_viability() (Unknown Source:0)
cpptools-srv.exe!try_overloaded_function_match() (Unknown Source:0)
cpptools-srv.exe!select_overloaded_function(struct a_symbol *,int,struct a_template_arg *,int,struct an_operand *,struct an_init_component *,struct an_init_component *,int,int,int,int,enum an_overload_context,struct a_source_position *,unsigned int,int *,int *,int *,int *,struct a_symbol * *,struct an_arg_match_summary * *) (Unknown Source:0)
cpptools-srv.exe!select_and_prepare_to_call_overloaded_function(struct a_symbol *,int,struct a_template_arg *,int,struct an_operand *,struct an_init_component * *,int,int,int,int,int,int,enum an_overload_context,struct an_operand *,struct a_source_position *,unsigned int,struct a_source_position *,int *,struct an_operand *,struct an_expr_node * *,int *,int) (Unknown Source:0)
cpptools-srv.exe!scan_function_call() (Unknown Source:0)
cpptools-srv.exe!scan_any_call() (Unknown Source:0)
cpptools-srv.exe!scan_expr_full() (Unknown Source:0)
cpptools-srv.exe!scan_expr_into_new_init_component() (Unknown Source:0)
cpptools-srv.exe!scan_expr_list() (Unknown Source:0)
cpptools-srv.exe!scan_call_arguments() (Unknown Source:0)
cpptools-srv.exe!scan_function_call() (Unknown Source:0)
cpptools-srv.exe!scan_any_call() (Unknown Source:0)
cpptools-srv.exe!scan_expr_full() (Unknown Source:0)
cpptools-srv.exe!scan_void_expression(int,int,int,struct a_dynamic_init * *,struct an_init_component *) (Unknown Source:0)
cpptools-srv.exe!expression_statement() (Unknown Source:0)
cpptools-srv.exe!statement() (Unknown Source:0)
cpptools-srv.exe!compound_statement_full(int,int,int,int,int,struct a_type * *) (Unknown Source:0)
cpptools-srv.exe!statement() (Unknown Source:0)
cpptools-srv.exe!if_statement() (Unknown Source:0)
cpptools-srv.exe!statement() (Unknown Source:0)
cpptools-srv.exe!compound_statement_full(int,int,int,int,int,struct a_type * *) (Unknown Source:0)
cpptools-srv.exe!scan_function_body(struct a_routine *,struct a_func_info_block *,unsigned long,struct a_macro_arg_fixup * *,struct a_macro_arg_fixup * *) (Unknown Source:0)
cpptools-srv.exe!compile_fragment_function_body() (Unknown Source:0)
cpptools-srv.exe!compile_fragment() (Unknown Source:0)
cpptools-srv.exe!compile_fragment() (Unknown Source:0)
cpptools-srv.exe!before_tu_wrapup(void) (Unknown Source:0)
cpptools-srv.exe!process_translation_unit(char const *,int,struct an_exported_template_file *) (Unknown Source:0)
cpptools-srv.exe!cfe_main(int,char * * const) (Unknown Source:0)
cpptools-srv.exe!cfe_main_exception_handler(int,char * * const) (Unknown Source:0)
cpptools-srv.exe!invoke_edge_compiler() (Unknown Source:0)
cpptools-srv.exe!edge_compiler_main(int,char const * * const) (Unknown Source:0)
cpptools-srv.exe!a_compiler_thread::compiler_thread_routine(class a_compiler_thread *) (Unknown Source:0)
cpptools-srv.exe!msvc::thread_helper_t::thread_entry(void *) (Unknown Source:0)
cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>() (Unknown Source:0)
kernel32.dll!BaseThreadInitThunk() (Unknown Source:0)
ntdll.dll!RtlUserThreadStart() (Unknown Source:0)
sean-mcmanus commented 10 months ago

@diablodale A crash in clear_operand is not something I've seen before. It's crashing trying to compile some particular code. I'll look into it, but if you had a sample repro code that would help.

diablodale commented 10 months ago

We both need context to more easily do both our next steps. At least you have a function name and a deep call stack. :-)

I have nothing but a hover over a static member variable. I have no context in which to reverse engineer the bug and afterward create a block of code for you. My mind tends to do well in reversing the bug, but in this case...the backward-tree of possibilities is too large.

What can you do to give me more context? I need to know what code it was trying to compile, in what class chain, in what template chain, etc.

I'm back up to v1.18.5 and today I have a new intellisense error FE

IntelliSense process crash detected: handle_reference_highlight
IntelliSense process crash detected: handle_quick_info
IntelliSense process crash detected: handle_update_intellisense
IntelliSense process crash detected: handle_quick_info
Quick info operation failed: FE: 'Unknown error'
Quick info operation failed: FE: 'Unknown error'
Quick info operation failed: FE: 'Unknown error'
IntelliSense process crash detected: handle_update_intellisense
Quick info operation failed: FE: 'Unknown error'
Quick info operation failed: FE: 'Unknown error'
Quick info operation failed: FE: 'Unknown error'
Quick info operation failed: FE: 'Unknown error'
Quick info operation failed: FE: 'Unknown error'
Quick info operation failed: FE: 'Unknown error'
IntelliSense process crash detected: handle_quick_info
Quick info operation failed: FE: 'Unknown error'
Quick info operation failed: FE: 'Unknown error'
Quick info operation failed: FE: 'Unknown error'
Quick info operation failed: FE: 'Unknown error'
diablodale commented 10 months ago

@sean-mcmanus, do you have any way to give me context so I can give you context and/or code?

sean-mcmanus commented 10 months ago

@diablodale Sorry, I've been busy. Yeah, a sample repro code would be good. I haven't had a chance too investigate that call stack yet.

diablodale commented 10 months ago

Got it. I have these crashes hundreds (an output windows full of them) of times/day, making intellisense quite broken on this particular project. And great for a consistent repro! 😉 When you have some context you can share with me, then I can use that to attempt to narrow some code. Since the crashes are so rapid and most hovers and completions fail and crash almost everywhere I'm currently working, I don't have any locality to make any repro code for you. I've only the entire codebase.

Other projects seem fine, I don't get these rapid crashes.

I need to have logs, or scenarios. While you investigate the call stack, tell me if there are logs that I can use/enable that will tell us exactly what it was trying to parse and where. With info like that, I am more capable of reverse out a code scenario.

Colengms commented 10 months ago

Hi @diablodale . Given the frequently of the repro in that particular project, it's likely that there is some specific, perhaps even unusual bit of code in a header included by many of the sources. You might consider picking one of the simpler files the issue readily repro's in, then start tearing out code. If the issue repro's with completion, or is otherwise related to edits, maybe keep a function or class it repro's in, and start tearing out anything unrelated. Sometimes the code associated with an IntelliSense crash can be isolated this way, fairly straight-forwardly.

It might also work to start with a file that #include's other files. If that repro's the issue, start removing #include statements until the issue goes away, to narrow it down to a particular file. Then do the same with that file's #includes.

diablodale commented 7 months ago

Hi. Checking back if cpptools has any logging or other diagnostic output so that I can see which source code line or area is causing these ongoing rapid crashes. Then I hope to be able to create a repro case.

sean-mcmanus commented 7 months ago

@diablodale Unfortunately, we don't have any logging that can enable showing the particular line that is causing the crash. You'd have to use some sort of binary search or possibly with "/EP" to generate a preprocessed file first.