8000 Fetching children of a translation unit results in an endless loop · Issue #358 · eclipse-cdt/cdt-lsp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fetching children of a translation unit results in an endless loop #358

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

Closed
ghentschke opened this issue Jul 26, 2024 · 0 comments · Fixed by #359
Closed

Fetching children of a translation unit results in an endless loop #358

ghentschke opened this issue Jul 26, 2024 · 0 comments · Fixed by #359
Assignees

Comments

@ghentschke
Copy link
Contributor

When an exception occur while fetching children of a translation unit in the project explorer view:
image

The fetch will result in an endless call loop of org.eclipse.cdt.lsp.internal.ui.navigator.SymbolsManager.refreshTreeContentFromLS(CompileUnit)

!ENTRY org.eclipse.lsp4e 4 0 2024-07-26 11:12:36.436
!MESSAGE java.io.UncheckedIOException: java.io.IOException: Cannot run program "C:\clangd\clangd_18.1.3\bi\clangd.exe" (in directory "C:\Users\blub\cdt-main\eclipse"): CreateProcess error=2, The system cannot find the file specified
!STACK 0
java.util.concurrent.CompletionException: java.io.UncheckedIOException: java.io.IOException: Cannot run program "C:\clangd\clangd_18.1.3\bi\clangd.exe" (in directory "C:\Users\blub\cdt-main\eclipse"): CreateProcess error=2, The system cannot find the file specified
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1770)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)
Caused by: java.io.UncheckedIOException: java.io.IOException: Cannot run program "C:\clangd\clangd_18.1.3\bi\clangd.exe" (in directory "C:\Users\blub\cdt-main\eclipse"): CreateProcess error=2, The system cannot find the file specified
	at org.eclipse.lsp4e.LanguageServerWrapper.lambda$0(LanguageServerWrapper.java:297)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
	... 6 more
Caused by: java.io.IOException: Cannot run program "C:\clangd\clangd_18.1.3\bi\clangd.exe" (in directory "C:\Users\blub\cdt-main\eclipse"): CreateProcess error=2, The system cannot find the file specified
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1170)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1089)
	at org.eclipse.lsp4e.server.ProcessStreamConnectionProvider.start(ProcessStreamConnectionProvider.java:55)
	at org.eclipse.lsp4e.LoggingStreamConnectionProviderProxy.start(LoggingStreamConnectionProviderProxy.java:227)
	at org.eclipse.lsp4e.LanguageServerWrapper.lambda$0(LanguageServerWrapper.java:295)
	... 7 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
	at java.base/java.lang.ProcessImpl.create(Native Method)
	at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:500)
	at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:159)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1126)
	... 11 more

!ENTRY org.eclipse.cdt.lsp 4 0 2024-07-26 11:12:36.437
!MESSAGE java.util.concurrent.CancellationException
!STACK 0
java.util.concurrent.ExecutionException: java.util.concurrent.CancellationException
	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096)
	at org.eclipse.cdt.lsp.internal.ui.navigator.SymbolsManager.refreshTreeContentFromLS(SymbolsManager.java:248)
	at org.eclipse.cdt.lsp.internal.ui.navigator.SymbolsManager.getCompileUnitElements(SymbolsManager.java:223)
	at org.eclipse.cdt.lsp.internal.ui.navigator.SymbolsManager.fetchDeferredChildren(SymbolsManager.java:129)
	at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:215)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.util.concurrent.CancellationException
	at java.base/java.util.concurrent.CompletableFuture.cancel(CompletableFuture.java:2510)
	at org.eclipse.lsp4e.LanguageServerWrapper.stop(LanguageServerWrapper.java:535)
	at org.eclipse.lsp4e.LanguageServerWrapper.lambda$9(LanguageServerWrapper.java:359)
	at java.base/java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:990)
	at java.base/java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(CompletableFuture.java:974)
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1773)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)
@ghentschke ghentschke self-assigned this Jul 26, 2024
ghentschke added a commit to ghentschke/eclipse-cdt-lsp that referenced this issue Jul 26, 2024
…lorer

as long as compileUnit.isDirty == true, the tree tries to fetch the
children on the translation unit. The reason why compileUnit.isDirty was
assigned to response == null, was when a TimeoutException may occur.
This has been considered.

fixes eclipse-cdt#358
ghentschke added a commit that referenced this issue Jul 26, 2024
as long as compileUnit.isDirty == true, the tree tries to fetch the
children on the translation unit. The reason why compileUnit.isDirty was
assigned to response == null, was when a TimeoutException may occur.
This has been considered.

fixes #358
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2D66
1 participant
0