Skip to content
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

Crash recovery not working properly #11335

Closed
bobbrow opened this issue Aug 17, 2023 · 3 comments
Closed

Crash recovery not working properly #11335

bobbrow opened this issue Aug 17, 2023 · 3 comments
Assignees
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service regression A bug that didn't exist in a previous release
Milestone

Comments

@bobbrow
Copy link
Member

bobbrow commented Aug 17, 2023

          I start to have the same issue since the extension auto-updated to 1.17.3 today. I'm running AlmaLinux 8.8 with kernel 4.18.0-477.15.1.el8_8.x86_64. The VSCode version is 1.81

Not sure if this is any useful, but the output message is:

[Error - 2:14:08 PM] The language server crashed. Restarting...
[Error - 2:14:08 PM] Sending document notification textDocument/didOpen failed
Error: Attempting to use languageClient before initialized
	at DefaultClient.get languageClient [as languageClient] (/u/vinson3z/.vscode-server/extensions/ms-vscode.cpptools-1.17.3-linux-x64/dist/main.js:47283:19)
	at DefaultClient.sendDidOpen (/u/vinson3z/.vscode-server/extensions/ms-vscode.cpptools-1.17.3-linux-x64/dist/main.js:48450:20)
	at DefaultClient.takeOwnership (/u/vinson3z/.vscode-server/extensions/ms-vscode.cpptools-1.17.3-linux-x64/dist/main.js:48439:20)
	at processDelayedDidOpen (/u/vinson3z/.vscode-server/extensions/ms-vscode.cpptools-1.17.3-linux-x64/dist/main.js:53325:30)
	at runMicrotasks (<anonymous>)
	at processTicksAndRejections (node:internal/process/task_queues:96:5)
	at async Function.dispatch (/u/vinson3z/.vscode-server/extensions/ms-vscode.cpptools-1.17.3-linux-x64/dist/main.js:48476:44)

Is there any known workaround for this problem?

Fixed the problem by downgrading to 1.16.3. Downgrading from 1.17.3 to 1.17.2 didn't work.

PS: This happens only when I try to use VSCode with a very large project. For a medium-sized project, it works fine.

Originally posted by @vineetsoni in #10651 (comment)

@bobbrow
Copy link
Member Author

bobbrow commented Aug 17, 2023

DefaultClient.takeOwnership used to call this.sendDidOpen inside a this.requestWhenReady callback. That was changed to await this.ready; in this PR: #11085, but that await this.ready; was removed in this PR: #11212.

@fearthecowboy, do you remember why that line was removed?

@bobbrow
Copy link
Member Author

bobbrow commented Aug 17, 2023

Ah, I looked into it a bit more. I think we just need to wrap that call with this.enqueue. Is that right @fearthecowboy?

@bobbrow bobbrow added regression A bug that didn't exist in a previous release bug Language Service labels Aug 17, 2023
@bobbrow bobbrow added this to the On Deck milestone Aug 17, 2023
@fearthecowboy
Copy link
Member

Yeah. I'll get a PR in asap

@sean-mcmanus sean-mcmanus modified the milestones: On Deck, 1.17.4 Aug 18, 2023
@sean-mcmanus sean-mcmanus added the fixed Check the Milestone for the release in which the fix is or will be available. label Aug 21, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Oct 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service regression A bug that didn't exist in a previous release
Projects
None yet
Development

No branches or pull requests

3 participants