-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Language Server Crashed #10598
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
Comments
Hi @ajwentzel . Thanks for reporting this. Based on your logs, it looks like the extension works for some time before crashing. Would you be able to attach the debugger to |
@Colengms Thanks for the quick reply. As I mentioned above the cpptools.exe does not show up as an attach option when following those steps. Same result as the person in this issue (#10385 (comment)), but it looks like that issue was closed so I'm not sure what other steps to take. |
@ajwentzel . There are a couple possible causes that come to mind. The extension does not start up until it's activated, such as by opening a |
I switched the board to one that I knew worked (Feather M0), added a couple basic files called Test.h and Test.cpp and restarted VS Code. I was then able to attach the debugger to cpptools since nothing crashed. Then I switched the board back to the Feather RP2040. Attached the call stacks from that. Something I noticed while going through this process.
Not sure if this is useful to you, just something I noticed. |
We have a previous issue at #10486 for that same crash call stack, but this issue has more repro details. |
Hi @ajwentzel . Thanks. This will help us a lot. The code involved in the crash is related to placing squiggles within a source file, possibly a particular source file, and relates to some squiggle locations that may be outside of the bounds of the file. Is there a specific file that's open when this occurs that may be involved in the repro? |
Hi @ajwentzel . The IntelliSense results being processed when the crash occurs appear to be related to that file. Would you be able to provide the contents of that file? That might help us repro and test a fix. That file may be included by a source file, and cpptools may be choosing the source file to generate IntelliSense for the header. That source file, and other headers that are included, may be part of the repro as well. Is this something simple enough that you could zip up and share, that we could use to repro? |
It's honestly just a blank arduino sketch, but I zipped the whole folder for you. You can ignore the .txt files since those are just places I copied logs for attaching here. |
Hi @ajwentzel . One more question; I see that you're using |
I added this line: "https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json" |
Also, in case it matters, the Arduino IDE version is 1.8.15. |
Environment
Bug Summary and Steps to Reproduce
Bug Summary:
Tried using the RP2040 Feather from Adafruit (https://www.adafruit.com/product/4884), following the setup guide here (https://learn.adafruit.com/adafruit-feather-rp2040-pico/arduino-ide-setup). Everything works fine on the Arduino IDE, but when I switch to VS Code, I get the following error:
[Error - 9:24:01 AM] Sending request cpptools/getInlayHints failed.
Message: Pending response rejected since connection got disposed
Code: -32097
[Error - 9:24:01 AM] Sending request cpptools/getSemanticTokens failed.
Message: Pending response rejected since connection got disposed
Code: -32097
[Error - 9:24:01 AM] The language server crashed 5 times in the last 3 minutes. It will not be restarted.
The code is a very simple .ino file with blank setup() and loop() functions. If I switch to a different board, the code compiles with no problem, so it seems like it's specific to the RP2040. I've attached both the c_cpp_properties.json and the language server logs.
c_cpp_properties.txt
CCpp Language Server Logging.txt
Configuration and Logs
Other Extensions
Other Extensions:
Arduino v0.5.0
Serial Monitor v0.8.0
Both C/++ and Serial Monitor are required for using the Arduino extension.
Additional context
I tried attaching the debugger following the guides here (https://github.com/microsoft/vscode-cpptools/wiki/Attaching-debugger-to-cpptools-or-cpptools%E2%80%90srv), but there is no option for 'cpptools' when I try to attach it.
The text was updated successfully, but these errors were encountered: