vieiro commented on PR #9249:
URL: https://github.com/apache/netbeans/pull/9249#issuecomment-4026715821

   Hi @matthiasblaesing ,
   
   I was trying today again with different projects and couldn't reproduce the 
IDE freeze. I've started the rust-analyzer with these options to have more 
details on what's going on. No need to include these in the commit, I'm posting 
them here just in case they're of interest in the future.
   
   ```diff
   diff --git 
a/rust/rust.grammar/src/org/netbeans/modules/rust/grammar/lsp/RustLSP.java 
b/rust/rust.grammar/src/org/netbeans/modules/rust/grammar/lsp/RustLSP.java
   index 0a8bdda40c..c1b2aee366 100644
   --- 
a/rust/rust.grammar/src/org/netbeans/modules/rust/grammar/lsp/RustLSP.java
   +++ 
b/rust/rust.grammar/src/org/netbeans/modules/rust/grammar/lsp/RustLSP.java
   @@ -39,16 +39,23 @@ public class RustLSP implements LanguageServerProvider {
        public LanguageServerDescription startServer(Lookup lookup) {
            Path rustAnalyzerPath = 
RustAnalyzerOptions.getRustAnalyzerLocation(true, true);
            if(rustAnalyzerPath == null || ! 
Files.isExecutable(rustAnalyzerPath)) {
   +            LOG.log(Level.INFO, String.format("rustAnalyzerPath is not 
available: %s", rustAnalyzerPath));
                return null;
            }
            try {
   -            Process p = new ProcessBuilder(new 
String[]{rustAnalyzerPath.toAbsolutePath().toString()})
   +            Process p = new ProcessBuilder(new String[]{
   +                rustAnalyzerPath.toAbsolutePath().toString(),
   +                    "--verbose",
   +                    "--log-file",
   +                    "/tmp/rust-analyzer.log",
   +                    "--no-log-buffering"
   +            })
                        .directory(rustAnalyzerPath.getParent().toFile())
                        .redirectError(ProcessBuilder.Redirect.INHERIT)
                        .start();
                return LanguageServerDescription.create(p.getInputStream(), 
p.getOutputStream(), p);
            } catch (IOException ex) {
   -            LOG.log(Level.FINE, null, ex);
   +            LOG.log(Level.INFO, String.format("Error launching 
rust-analyzer: %s", ex.getMessage()), ex);
                return null;
            }
        }
   ```
   
   I found some other issues, though, but I think we can work out these in the 
future. I'll post them here for future reference:
   
   ```
        [exec] WARNING [org.netbeans.modules.versioning.util.Utils]: 
associateEncoding() no file object available for 
/tmp/vcs-1773087075761/vcs-1773087079972/lib.rs
        [exec] SEVERE [org.openide.util.Exceptions]
        [exec] org.eclipse.lsp4j.jsonrpc.ResponseErrorException: content 
modified
        [exec]  at 
org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:220)
        [exec]  at 
org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:204)
        [exec]  at 
org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:185)
        [exec]  at 
org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:97)
        [exec]  at 
org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:114)
        [exec]  at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:545)
        [exec]  at 
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:328)
        [exec]  at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
        [exec]  at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
        [exec]  at java.base/java.lang.Thread.run(Thread.java:1474)
        [exec] Caused: java.util.concurrent.ExecutionException
        [exec]  at 
java.base/java.util.concurrent.CompletableFuture.wrapInExecutionException(CompletableFuture.java:345)
        [exec]  at 
java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:440)
        [exec]  at 
java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2094)
        [exec] [catch] at 
org.netbeans.modules.lsp.client.Utils.handleBindings(Utils.java:403)
        [exec]  at 
org.netbeans.modules.lsp.client.Utils.handleBindings(Utils.java:352)
        [exec]  at 
org.netbeans.modules.lsp.client.bindings.MarkOccurrences.computeHighlights(MarkOccurrences.java:136)
        [exec]  at 
org.netbeans.modules.lsp.client.bindings.MarkOccurrences.run(MarkOccurrences.java:106)
        [exec]  at 
org.netbeans.modules.lsp.client.LSPBindings.lambda$addBackgroundTask$17(LSPBindings.java:550)
        [exec]  at 
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1403)
        [exec]  at 
org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
        [exec]  at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
        [exec]  at 
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2012)
   ```
   
   And
   
   ```
        [exec] SEVERE [org.openide.util.RequestProcessor]: Error in 
RequestProcessor 
org.netbeans.modules.lsp.client.LSPBindings$$Lambda/0x000000000d8c1d60
        [exec] java.lang.IllegalArgumentException: Invalid end offset: 3203, 
start is: 3210
        [exec]  at 
org.netbeans.spi.editor.fold.FoldInfo.<init>(FoldInfo.java:103)
        [exec]  at org.netbeans.spi.editor.fold.FoldInfo.range(FoldInfo.java:94)
        [exec]  at 
org.netbeans.modules.lsp.client.bindings.FoldManagerImpl.computeInfos(FoldManagerImpl.java:170)
        [exec]  at 
org.netbeans.modules.lsp.client.bindings.FoldManagerImpl.lambda$run$3(FoldManagerImpl.java:125)
        [exec]  at 
org.netbeans.modules.lsp.client.Utils.handleBindings(Utils.java:405)
        [exec]  at 
org.netbeans.modules.lsp.client.Utils.handleBindings(Utils.java:352)
        [exec]  at 
org.netbeans.modules.lsp.client.bindings.FoldManagerImpl.run(FoldManagerImpl.java:121)
        [exec]  at 
org.netbeans.modules.lsp.client.LSPBindings.lambda$addBackgroundTask$17(LSPBindings.java:550)
        [exec]  at 
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1403)
        [exec]  at 
org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
        [exec]  at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
        [exec]  at 
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2012)
        [exec] Caused: org.openide.util.RequestProcessor$FastItem
   ```
   
   Thanks for the PR. I'm approving changes now!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to