-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
cpptools-srv quit unexpectedly #12354
Comments
@HazemAlindari We believe we have a fix for this in our next 1.21.0 release. |
Thank you and when can we expect to get it |
@heartacker We're not sure yet. We're working on reviewing other changes we want to get in. Possibly this week. You can check the current estimated Due Date for the 1.21.0 milestone at https://github.com/microsoft/vscode-cpptools/milestone/168 . |
@HazemAlindari We believe this is fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/v1.21.0 (let us know if you're still seeing it or any other crashes). |
After switching to the pre-release version 1.21.0 I still experience constant crashes. I can't even open VS Code without cpptools-srv crashing 2-3 times. Translated Report (Full Report Below)Process: cpptools-srv [38750] Date/Time: 2024-06-25 11:52:50.0883 +0200 Sleep/Wake UUID: CA1312F1-E7E9-4441-B9CC-453AF63B81B7 Time Awake Since Boot: 220000 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_CRASH (SIGABRT) Termination Reason: Namespace SIGNAL, Code 6 Abort trap: 6 Application Specific Information: Thread 0 Crashed:: Dispatch queue: com.apple.main-thread Thread 0 crashed with ARM Thread State (64-bit): Binary Images: External Modification Summary: VM Region Summary:
REGION TYPE SIZE COUNT (non-coalesced) Full Report{"app_name":"cpptools-srv","timestamp":"2024-06-25 11:52:50.00 +0200","app_version":"","slice_uuid":"7a08de5b-42e9-362a-a39b-36e966e6748f","build_version":"","platform":1,"share_with_app_devs":0,"is_first_party":1,"bug_type":"309","os_version":"macOS 14.5 (23F79)","roots_installed":0,"incident_id":"3505BA7F-E866-4372-A241-98892CA9E33B","name":"cpptools-srv"}
], |
Hi, What is the status on this? I am experiencing the same frequent crashes, which makes working with the extension very painful. I've also upgraded to the latest prerelease version, but no improvement. Thanks |
@schack-lindemann Oh, sorry, I missed your message earlier. We thought this got fixed at least for some cases. Is anyone on this thread seeing it fixed with 1.21.0, i.e. the people who reported it for 1.20.5? @terrencebarr Is your crash call stack the same? |
Thanks for the quick reply. I am using v1.21.0 (pre-release). My stack trace seems the same, but I'm attaching it just in case.
|
We made a fix with https://github.com/microsoft/vscode-cpptools/releases/tag/v1.21.5, but since we didn't repro the issue and we don't know what exactly is causing it, we're not sure if there are more issues still...at the very least we expect the crash call stack to be different. Let us know if anyone still hits this issue and we can follow up in 1.22.0. |
I just updated to 1.21.5 via the VS Code extension manager and restarted VS Code. I still get cpptools-srv crashes -- see attached. The crashes happen quite frequently when I am doing operations related to C/C++ parsing or even just closing a C file that is open in the editor ... but the crashes not always predictable. For me, cpptools-srv will typically crash several times in the span of 5 minutes.
|
@terrencebarr From what I can tell, that particular code ~crash_shutdown_handler_t would only crash if there was some memory corruption. Are you able to repro the crash only when opening particular workspaces or files? Or can you get it to occur with an empty source file? |
@sean-mcmanus If I open an empty C file or a helloWorld example, I don't seem to get crashes -- at least, not yet. But when I open a more complex workspace crashes start happening very soon. So it does seem to relate to the complexity of the code or workspace. I'll try to dig some more tomorrow. |
@terrencebarr The crash_shutdown_handler_t code is run in cpptools too and it sounds like that process is not crashing. I'm not sure yet why only cpptools-srv would be hitting this crash (other than it having a memory corruption issue that cpptools isn't hitting). |
@terrencebarr We have some other potential fixes we can try for 1.22.0 (planned for next week). |
@sean-mcmanus Thanks for continuing to investigate. I played with this some more, and contrary to my previous comment, I now find that even a simple file |
@terrencebarr We finally believe we've figured out the cause and fix for the crash. |
heihei, can you please tell us why? 😄 |
@heartacker The cause of the crash? We were incorrectly handling temp file cleanup used to log the crashes in cpptools-srv during global object destruction causing it to throw an exception in ~temp_file_manager which triggered std::terminate. We previously thought the crash was with the crash handler code itself, which was new, and not the old temp_file_manager code which was pre-existing and not expected to have a problem. |
@sean-mcmanus Thanks -- this is looking promising, no crashes in the first 5 minutes of testing. Will test some more today. |
Hi. I used the extension for about 1.5 hours so far, with no crashes. It look like you found and fixed the problem -- thanks! |
Environment
Bug Summary and Steps to Reproduce
Bug Summary:
cpptools-srv keeps crashing every time I open a c/h file with stdio.h inclusion. However, the app vscode keeps working and IntelliSense keeps analyzing problem-free.
Steps to reproduce:
Expected behavior:
I expect it not to crash
Configuration and Logs
Other Extensions
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: