You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A language server whose start fails at once can stay "starting", with its error unreported #1825
A language server whose start fails very early can be left in the starting status, with nothing logged, until the next start().
LanguageServerWrapper.start() submits the start task to a pooled thread first, and only then builds the future chain on that task's startFuture, including its failure handler (.exceptionally(...)), and assigns the chain to initializeFuture. When the task fails before start() gets there (creating the connection provider, the initialization options, or provider.start() throws), startFuture is already failed when the handler is attached, so the handler runs at once, inline, while initializeFuture is still null:
the handler calls initializeFuture.completeExceptionally(...) and throws a NullPointerException;
CompletableFuture catches it and makes it the result of the chain, so it is never logged;
the rest of the handler, onError(...) and stop(context), is skipped;
start() then assigns the failed chain to initializeFuture.
So the status stays starting, the error isn't reported, and the caller of getInitializedServer() gets the NullPointerException. The next start() recovers, since serverError is set.
Activity