mirror of
https://github.com/enso-org/enso.git
synced 2024-12-24 01:51:31 +03:00
Runtime instrumentation is being used before finishing instrumentation (#7370)
close #7206 fixes ``` [error] [2023-07-04T08:43:55.015Z] [akka.actor.OneForOneStrategy] Cannot invoke "org.enso.interpreter.instrument.execution.CommandProcessor.stop()" because the return value of "org.enso.interpreter.instrument.Handler.commandProcessor()" is null java.lang.NullPointerException: Some(Cannot invoke "org.enso.interpreter.instrument.execution.CommandProcessor.stop()" because the return value of "org.enso.interpreter.instrument.Handler.commandProcessor()" is null) at org.enso.interpreter.instrument.Handler.onMessage(Handler.scala:119) at org.enso.interpreter.instrument.Endpoint.$anonfun$sendBinary$1(Handler.scala:66) at org.enso.interpreter.instrument.Endpoint.$anonfun$sendBinary$1$adapted(Handler.scala:64) at scala.Option.foreach(Option.scala:437) at org.enso.interpreter.instrument.Endpoint.sendBinary(Handler.scala:64) at org.graalvm.truffle/com.oracle.truffle.api.instrumentation.TruffleInstrument$Env$MessageTransportProxy$MessageEndpointProxy.sendBinary(TruffleInstrument.java:1052) at org.enso.languageserver.runtime.RuntimeConnector$$anonfun$initialized$1.applyOrElse(RuntimeConnector.scala:79) at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:35) at org.enso.logger.akka.ActorLoggingReceive.apply(ActorLoggingReceive.scala:35) at org.enso.logger.akka.ActorLoggingReceive.apply(ActorLoggingReceive.scala:14) at scala.PartialFunction.applyOrElse(PartialFunction.scala:214) at scala.PartialFunction.applyOrElse$(PartialFunction.scala:213) at org.enso.logger.akka.ActorLoggingReceive.applyOrElse(ActorLoggingReceive.scala:14) at scala.PartialFunction$Combined.applyOrElse(PartialFunction.scala:305) at akka.actor.Actor.aroundReceive(Actor.scala:537) at akka.actor.Actor.aroundReceive$(Actor.scala:535) at org.enso.languageserver.runtime.RuntimeConnector.aroundReceive(RuntimeConnector.scala:20) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:579) at akka.actor.ActorCell.invoke(ActorCell.scala:547) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:270) at akka.dispatch.Mailbox.run(Mailbox.scala:231) at akka.dispatch.Mailbox.exec(Mailbox.scala:243) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ```
This commit is contained in:
parent
2defb3bc56
commit
509f8a5eac
@ -116,7 +116,9 @@ final class Handler {
|
|||||||
*/
|
*/
|
||||||
def onMessage(request: Api.Request): Unit = request match {
|
def onMessage(request: Api.Request): Unit = request match {
|
||||||
case Api.Request(requestId, Api.ShutDownRuntimeServer()) =>
|
case Api.Request(requestId, Api.ShutDownRuntimeServer()) =>
|
||||||
commandProcessor.stop()
|
if (commandProcessor ne null) {
|
||||||
|
commandProcessor.stop()
|
||||||
|
}
|
||||||
endpoint.sendToClient(
|
endpoint.sendToClient(
|
||||||
Api.Response(requestId, Api.RuntimeServerShutDown())
|
Api.Response(requestId, Api.RuntimeServerShutDown())
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user