-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
IntelliSense doesn't work (crashes) #10636
Comments
Same issue on WSL Ubuntu 22.04 LTS and Windows 11 with the newest version
This seems to be a VSCode side error since there is nothing related to Temporary Workaround Downgrade the extension to |
I can confirm that downgrading to VS Code Version information:
|
Hi @Samega7Cattac . Your log seems a bit unusual to me. Am I correct to infer that you reproduced this issue with a multi-root workspace containing 10 workspace folders? I see a lot of occurrences of Hi @KagaJiankui . Based on your description, I'm not sure if you're seeing the same crash as this issue was opened to track. The stack you provided seems to point to an extension named Hi @alexvorndran . Can you confirm whether you're experiencing the same issue as Samega7Cattac or KagaJiankui? As there could be multiple root causes for crashes, consider opening a new issue with additional information. |
Yes there's several projects in that workspace and each one has a c_cpp config file.
I don't remember when it started happening but max a weeks or week and half ago, sometimes I hold off some updates while I have unfinished work so I can't tell u accurately when it started. |
After uninstalling and re-installing the Additionally, the |
Hi @Colengms! Thanks for looking into this.
The description of Samega7Cattac seems to fit what I saw. I too have a multi-root workspace (6 related project folders). I don't have the original logs at hand and I'm a bit hesitant to switch back to |
I see this issue too. I too have multi-root workspace. Both 1.14.3 and 1.14.4 are not working for me. |
I'm having the same issue as well. Whenever I attempt to "Go to Definition" in any c/c++ file, nothing happens for a long time and then eventually it looks like cpptools crashes. The C/C++ Output logs have a lot of these errors:
And the cpptools Output logs show a lot of these errors:
|
I have the same problem too using multiple root workspace |
I have noticed that most of the errors appears when I try to compile the projects, second to opening files and saving |
I can confirm that downgrading to 1.14.3 also fixed it for me. I had many cpptools entries in the dropdown with the same errors listed above and this is also a multi-root workspace. |
Has anyone tried 1.15.0? Is anyone able to attach a call stack to get a crash or determine what the repro requirement is? We've tested with multi-root projects and haven't hit the crash yet. It also sounds like there might be multiple issues. |
@sean-mcmanus After reverting to 1.14.3, cleaning and rebuilding everything Intellisense works again. It also continues to work after updating to 1.15.0 and 1.14.4 without a clean and rebuild. Unfortunately I don't have the time to do another clean and rebuild at this point, but will report back if I do. I did try resetting the Intellisense database on 1.14.4, but it still worked afterward. |
I see this issue also us v1.14.4. I assume 1.15.0 is pre-release? @sean-mcmanus , how do I get the call stack info for you? |
1.15.0 is pre-release. I have found multiple crashes in the multi-root scenario. I don't know for certain which users are hitting those particular crashes or not. The crash call stack would determine if it's the same crashes I'm working on fixing, but it may not be necessary. If you can attach a debugger to the cpptools process under some condition in which it doesn't crash and then trigger the crash you may be able to get a crash call stack: https://github.com/microsoft/vscode-cpptools/wiki/Attaching-debugger-to-cpptools-or-cpptools%E2%80%90srv |
@sean-mcmanus updating to 1.15 and clean rebuild solved the issue here too. |
@EmbeddedBacon Sigkill is not a crash. That can occur when we intentionally kill/abort the process if we detect that it may be dangling. |
Okay, but this happens all the time. My project has auto generated hardware header files that can be several hundred megs. So, is there a way to increase the timeout? I often see the parsing stuck. How can I find out where it is getting stuck to help it along? |
@EmbeddedBacon The process killing we do should only occur if there is no message from the TypeScript side in 4 minutes, which seems very unlikely. You could bypass that by modifying the installed package.json "version" field by adding a "-main" to the end of the number, like at https://github.com/microsoft/vscode-cpptools/blob/main/Extension/package.json#L5 . If you're still getting the issue after that, then some external process might be killing the cpptools process. You might also want to try 1.15.0 (pre-release), since that has a bunch of bug fixes. |
@sean-mcmanus, I upgraded to 1.15.0 Pre-Release and I am still seeing these error messages [Error - 3:11:10 PM] Sending request cpptools/getDocumentSymbols failed. |
We fixed some crashes and a deadlock with multiroot workspaces with 1.15.1 (https://github.com/microsoft/vscode-cpptools/releases/tag/v1.15.1), but it's possible you may be hitting a different crash, in which case it would be helpful to open a separate issue to track that, preferably with a call stack or other repro details so we can identify where it's crashing. |
@EmbeddedBacon With what version? 1.15.1? Are you able to get a call stack or are you just seeing the SIGKILL still? We have 1 known crash with recursive environment variables at #10704 . |
@sean-mcmanus , I didn't have the debugger attached since most messages I had seen in the past were the sigkill. I am using the most recent version, 1.15.1. This is on a Fedora system using remote ssh. We had rather larger hardware header files which are several hundred megs. I always feel the header files are too large for the cpptools to handle, at least that is my gut feeling |
@EmbeddedBacon You may be hitting the C_Cpp.intelliSenseMemoryLimit, so you could try increasing that. Another thing to try is setting C_Cpp.intelliSenseCacheSize to 0 (in case the issue is related to the cache). |
Mr. @sean-mcmanus , sorry for the delay, but I don't see either of those options either in the main Settings interface or within the json file. What am I doing wrong? |
@EmbeddedBacon You need to change the setting in the "remote" section instead of the "user" section. |
Mr. @sean-mcmanus , I am still seeing the issue after setting the configuration to the following Is there another method of me debugging and seeing what is going on? |
@EmbeddedBacon Have you ran something like "top" to see the CPU/memory usage of the cpptools-srv process over time? |
@EmbeddedBacon That is cpptools. I was wondering about cpptools-srv (the one that is crashing or exiting out for some unknown reason). I didn't think there was an issue with cpptools. |
Mr. @sean-mcmanus , okay, perhaps I captured the data correctly this time. Here is the htop view I used psrecord to capture cpu and memory using This is the graph of the captured data |
@EmbeddedBacon Your OS is an x64 Linux and not 32-bit arm, right? The memory and CPU usage looks "normal" and doesn't appear to indicate a crash or out of memory. 2.5 GB is above normal, but doesn't necessarily indicate an error if the TU is big enough. Where in the time graph do you get the crash logging? |
Mr. @sean-mcmanus , yes, the distro is Fedora release 34 (Thirty Four). Psrecord was attached to the process until it closed so the graph represents the entire time line (or as quick as I could find the pid of the process and launch the command). |
@sean-mcmanus , is there something else I can collect or some other information/data I can collect for this? |
Have you tried setting the C_Cpp.intelliSenseMaxMemory to something like 16384 (your previous screenshot just show C_Cpp.intelliSenseMemoryLimit set, which has a different effect)? The sigkill could be due the memory limit across all TUs getting hit, i.e. if you have multiple files open. But if it sigkills with just 1 file open, then I'm not sure what could be causing that and we haven't heard other reports of that yet. |
@sean-mcmanus , I don't think C_Cpp.intelliSenseMaxMemory was mentioned previously, but I did increase it to 16384. If I still see that same issue, what is the max values I can set C_Cpp.intelliSenseMaxMemory and C_Cpp.intelliSenseMemoryLimit,? Right now both are set to 16K. |
C_Cpp.intelliSenseMaxMemory has a higher limit of 65536. You have C_Cpp.intelliSenseMemoryLimit set to the max. |
We're closing this as fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/v1.15.4 . For any remaining issues, we or you could move them to new issues to track. |
Environment
Bug Summary and Steps to Reproduce
Bug Summary:
There's dozens of "cpptools" on the output tab, every single one with dozens of errors.
An example of one of them:
With time they increase rapidly.
In the tab of the Configuration Warnings:
Steps to reproduce:
Expected behavior:
IntelliSense to show something on hover or autocomplete
Configuration and Logs
C/C++ logs:
cpptools_logs.txt
The text was updated successfully, but these errors were encountered: