-
Notifications
You must be signed in to change notification settings - Fork 0
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
Clangd worker crashes unexpectedly #10
Comments
Here are the error logs after getting this error again. It happened on a recompile without reloading the page, although the cause still is not clear. Note: I was wrong about where the error occurs in the original issue. It is reported as happening |
Turned on detailed clangd logging with the same error and it seems like the language server doesn't completely crash this time. Although, the stack size exceeded error log doesn't show with this, so its unlikely that this is the full story. I want to say the problem is down to the worker thread spawning, but it still isn't completely clear why this would crash the whole language server and not just the thread. |
Clangd often crashes on the first load when running in the deployed editor. Refreshing the page and letting it relaunch seems to always resolve the issue. The bug may be a web assembly issue where not enough memory is allocated to the process initially. |
Its worth noting this has been tested exclusively on Chrome. |
Further testing shows clangd will always crash on Chrome without dev tools open. It also seems to always run without crashing on firefox. |
Removing the api docs populator using the lsp prevents the error from happening on start up. The lsp will successfully launch, but will still crash soon after without dev tools open |
This feature caused clangd to crash much quicker. In fact 2 maximum stack size errors are reported in the console when this feature is enabled. Since api docs population is hacky anyway, it might be worth just leaving this out for now. Might make it just a little bit easier to fix #10
Setting intial wasm memory to the maximum size (link to code) does not resolve the issue. |
I'm yet to find how to reproduce this issue, however the clangd worker sometimes crashes with the error "Maximum Call Stack Size Exceeded" in the emscripten generated file
clangd.mjs
. This could either be an issue in the js itself or within the clangd wasm. The error occurred on the first load of the site.Not much that can be done until I can reproduce this issue. I'll add any updates here.
The text was updated successfully, but these errors were encountered: