-
Notifications
You must be signed in to change notification settings - Fork 78
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
Possible stack overflow #23
Comments
Would be good to see what message the server sent which led to this. Messages can get split up into chunks and this function recurses until it's consumed every chunk in a message. Hopefully that is what is happening here - do you know if this file is likely to have a lot of diagnostics? I will refactor to get rid of the recursion and see if that resolves it. If not there might be some other bug where we misread the message length or something like that. |
As a temporary workaround you could try |
if you run dartanalyzer on the file, you only see 2 warnings, however, when I tee the output from the server, I see about 4000 publishDiagnostics messages. I think the issue might be that this folder has 2K source files (all independent of each other). So quite likely the issue is that analyzer is processing all the files in the folder. :( I was curious about whether we avoided this issue in the ycm pluggin, but no, we also set the directory as an analysis root like you do in lsc. While looking there I noticed that we did set the opened source file as a priority-file in ycmd, are you also doing that also in lsc? |
LSP doesn't have a notion of priority files so we don't do that in this client - but in the dart_language_server we always set open files as priority files There are probably some optimizations we could make in dart_language_server that could help here. I wonder if we should swallow diagnostics for files that aren't open. At least this client doesn't care about them but maybe other clients do? Filed natebosch/dart_lsp#15 to track. In any case we probably don't want to set |
Update to the latest and this should be resolved. I couldn't quite hit the problem with the default |
I've run into some stack overflow errors at times, not sure yet on the possible cause.
I can repro easily in the dart sdk repo, standing on the root, and opening some files under the
tests
folder.For example, if I open
tests/language/issue4295001_test.dart
, I then see this error:Followed by this error:
The text was updated successfully, but these errors were encountered: