-
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 process crash detected #10713
Comments
Are you able to reduce the crash such that it can be reproduced with a non-proprietary code sample (it's possible it may be occurring from system header code as well). From the call stack, it looks like it's failing to parse some declaration initializer. |
Actually, it looks like you may not have the correct call stack. Did you attach to cpptools or cpptools-srv? I think scout_parser_cpp_generated only occurs in cpptools and it throws exceptions as part of it normal flow of control. Your crash call stack does not specifically indicate an access violation or crash occurred (just a c++ exception). |
Hi Sean, thanks for your valuable feedback!
Unfortunately not, I have tried to reproduce the crash with couple of open source CMake/C++ code bases, with decent complexity, but IntelliSense was working fine. |
I actually attached both |
Actually you are right, now I can confirm that it was Now what is quite strange is that if I attach only to What I could observe is that |
Do IntelliSense features function, hoving over 0 shows Could it be that the logging is incorrect? Is the "program" in launch.json set to "cpptools-srv" instead of "cpptools"? |
No, for the affected source files, it just shows "Loading" for couple of seconds.
I don't really know, Debug output simply reports "IntelliSense process crash detected" many times, pretty much on every action I take on the source file, like hover or deliberately inducing a syntax error Do IntelliSense features function, hoving over 0 shows (int)0)? Could it be that the logging is incorrect?
It's set to "cpptools-srv" executable. |
If you see "Loading" that would suggest the IntelliSense process is either not launching or crashing, so it's probably crashing, giving the logging. I'm guessing you may not be attached to the correct cpptools-srv process? Can you comment out all the code in the source file that is open/crash, attach, and the uncomment the code, then it should crash with the correct call stack. |
I did it now, commented out all the code, then attached to cpptools-srv process, then uncommented code, got Debug output message that IntelliSense crashed, but as before, none of the attached cpptools-srv process/threads crashed. They just continue to work, while IntelliSense do not work. I tried the same thing before, just with closing the problematic file, attaching, and then re-opening the file to produce crash. Result is the same, can't get cpptools-srv (or any of it's threads) to crash |
Now I am thinking to setup the full cpptools debugging environment, by followinfg the provided tutorials, and try to figure out which parsing definition causes the crash. Since this happens with many of the source files, there must be something like a common definition which is used widely in the code. It may help me to setup a lot simpler code example which will cause the crash. |
@sean-mcmanus I have managed to setup full debugging environment for cpptools extension. Although I am not familiar with TypeScrip and JavaScript, i took the following path:
|
This is the train of recorded
|
The basic idea was to try to find out in which part of the source code I am working on, causes the crash, like which file or definition cpptols is not able to parse. I don't find the previous If the parsing processing and crash originates in |
Those are just messages related to communication with cpptools. The cpptools process communicates with cpptools-srv (which is crashing). If you can attach a debugger to the cpptools-srv process before it crashes (i.e. comment out the code, attach, and the uncomment it) then you could get a crash call stack: https://github.com/microsoft/vscode-cpptools/wiki/Attaching-debugger-to-cpptools-or-cpptools%E2%80%90srv . It's also possible you could narrow down the code that is triggering the crash via comment out code, i.e. if you remove a particular function and it stops crashing, then the crashing code is being triggered by some code in that function (although it may require other dependencies too). |
I tried this already, according to your advice. Attaching to
I have tried this too. The thing is, crash happens for many of source files, it's not one or just couple of them. My guess is that it has something to do with common headers, but commenitng includes did not result in IntelliSense becoming operational on a problematic file |
It's possible you could be hitting the IntelliSense memory limit -- the logging message about a crash may be incorrect and we could just be killing the process due to hitting the memory limit. See my comment at #10636 (comment) . |
Thanks for the tip. I have tried tried "C_Cpp.intelliSenseMemoryLimit": 16384 but the situation is the same. I have also check for running the Also tried the suggested "C_Cpp.intelliSenseCacheSize": 0, with the same result. |
In my current situation, extension receives the message "IntelliSense process crash detected" but I will take the path of trying to narrow down the source code section(s) which contribute to this issue, and make it reproducible for you. |
Yeah, "IntelliSense process crash detected" is supposed to mean "cpptools-srv" is crashed. IntelliSense functionality is implemented in that process. I don't know why the message appears while the process appears to not be crashing. You could try manually killing the cpptools-srv process in a non-crashing scenario and confirm the "IntelliSense process crash detected" message appears. |
I killed |
What may happen is that |
Hey @sean-mcmanus, this issue might need further attention. @dmitttri, you can help us out by closing this issue if the problem no longer exists, or adding more information. |
Hi @sean-mcmanus, @dmitttri isn't working on this anymore. Apologies for going silent on you.
The steps are
|
Hi @daniel-trnk . That stack appears to be an internal 'first chance exception' When an IntelliSense process crashes, there should something in the C/C++ output log: Would it be possible to isolate, reduce and share the code that's triggering a crash? That would be the best possible information for us to investigate further. |
Hi @Colengms, thanks for looking into this and sorry for time incomplete information.
Indeed when I hover after the first exception (and exiting of cpptool-server) described above, I see this as the next output:
(This is a new run, so the
I am using In the cli I do see this after the call stack from my last comment:
So maybe I am on the wrong trail. Another observation: if I keep the benign source file open (which wasn't the default as VSCode automatically closed the unchanged file when I opened my test file), the server does not actually exit but I do see the following debug output:
When I start to edit the file, I get Maybe this is a timeout issue rather than a crash? The client disconnecting, then the server just exiting if this was the only file open?
I'll try but so far I had not much luck. It seems to happen fro complex files... |
Hey @sean-mcmanus, this issue might need further attention. @dmitttri, you can help us out by closing this issue if the problem no longer exists, or adding more information. |
This issue has been closed because it needs more information and has not had recent activity. |
Environment
Hi everyone,
I am facing a blocking issue with the IntelliSense. Currently woking on a proprietary code base, of decent complexity, and for many of the source files (but not all), I constantly get the message
IntelliSense process crash detected
, and IntelliSense features simply don't work. This is repeatble, once a source file is open, and I start editing, crashes will happen.Downgrading
VS Code
orC/C++ Extension
versions has no effect, same crashes happens again.I was able to collect debug output and call traces, please find them below.
Bug Summary and Steps to Reproduce
Bug Summary: Some source files (but not all) causes
IntelliSense process crash detected
, repeatedly, when being open and edited.Steps to reproduce:
In the case of the code base I am working one, it's enough to simply open one of these problematic source files, and start editing.
Unfortunatley, I can't provide any portions of the proprietary source code. I have tried to reproduce the crash with other open source code bases I have found on GitHub, but I was not able to reproduce it.
Expected behavior:
IntelliSense shall report at least sytax errors, while editing source files.
Configuration and Logs
C/C++ Debug Output (just a portion)
Other Extensions
CMake v0.0.17
CMake Tools v1.13.45
Additional context
Attaching to
cpptools-srv
don't produce any exceptions and stack traces, which is strange because C/C++ Debug output reports crashes.The only stack trace I was able to produce with
cpptools
call trace (on of the threads)The text was updated successfully, but these errors were encountered: