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

Вылеты расширения #265

Open
Morkhe opened this issue Mar 2, 2023 · 16 comments
Open

Вылеты расширения #265

Morkhe opened this issue Mar 2, 2023 · 16 comments

Comments

@Morkhe
Copy link

Morkhe commented Mar 2, 2023

Версия vsc: 1.76.0
Версия расширения: 1.27.1

Периодически падает расширение с ошибками:

  1. Client BSL Language Server: connection to server is erroring. Shutting down server.
    Message header must separate key and value using :

  2. [Error - 12:48:46 PM] Delivering pending changes failed
    TypeError: this.task is not a function
    at c:\Users\Morkhe.vscode\extensions\1c-syntax.language-1c-bsl-1.27.1\node_modules\vscode-languageclient\lib\common\utils\async.js:28:35

@nixel2007
Copy link
Member

Можете попробовать включить лог сервера через конфигурационный файл bsl ls и поймать момент падения?

@nixel2007
Copy link
Member

И есть ли что-то ещё в панели output в канале BSL Language Server?

@Morkhe
Copy link
Author

Morkhe commented Mar 2, 2023

Можете попробовать включить лог сервера через конфигурационный файл bsl ls и поймать момент падения?

Как это сделать?

@nixel2007
Copy link
Member

Можете попробовать включить лог сервера через конфигурационный файл bsl ls и поймать момент падения?

Как это сделать?

Создать в корне проекта файл .bsl-language-server.json, в него добавить:

{
  "traceLog": "trace.log"
} 

@Morkhe
Copy link
Author

Morkhe commented Mar 5, 2023

Ошибка Message header must separate key and value using :

И есть ли что-то ещё в панели output в канале BSL Language Server?
В выводе пусто.

В логе падение на этом происходит.
По ощущениям вылетает при написании вызова метода, которого еще нет, или изменении параметров вызываемого метода, которые не подходят под его фактические параметры

[Trace - 00:51:50 PM] Received request 'textDocument/codeLens - (900)'
Params: {
  "textDocument": {
    "uri": "file:///g%3A/script.os"
  }
}


[Trace - 00:51:50 PM] Sending response 'textDocument/codeLens - (900)'. Processing request took 7ms
Result: null


[Trace - 00:51:50 PM] Received request 'shutdown - (901)'
Params: null


[Trace - 00:51:50 PM] Sending response 'shutdown - (901)'. Processing request took 1ms
Result: true


[Trace - 00:51:50 PM] Received notification 'exit'
Params: null

@nixel2007
Copy link
Member

Примерно понял, спасибо!

@Astaldo2003
Copy link

Несколько дней схожая проблема, но лог, к сожалению, не осилил запустить: вроде и конфигурационный файл есть, но файл 'trace.log' не появляется. В output Extension Host такая ошибка:

at MessageBuffer.tryReadHeaders (c:\Users\podvysotskiy\.vscode\extensions\1c-syntax.language-1c-bsl-1.27.1\node_modules\vscode-jsonrpc\lib\common\messageBuffer.js:87:23)
	at StreamMessageReader.onData (c:\Users\podvysotskiy\.vscode\extensions\1c-syntax.language-1c-bsl-1.27.1\node_modules\vscode-jsonrpc\lib\common\messageReader.js:133:45)
	at Socket.<anonymous> (c:\Users\podvysotskiy\.vscode\extensions\1c-syntax.language-1c-bsl-1.27.1\node_modules\vscode-jsonrpc\lib\common\messageReader.js:123:18)
	at Socket.emit (node:events:513:28)
	at addChunk (node:internal/streams/readable:315:12)
	at readableAddChunk (node:internal/streams/readable:289:9)
	at Readable.push (node:internal/streams/readable:228:10)
	at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)

image

@nixel2007
Copy link
Member

Есть тэг 8.2.0-next.1 для vscode-languageclient, надо попробовать собраться на нем

@Morkhe
Copy link
Author

Morkhe commented Mar 4, 2024

Есть тэг 8.2.0-next.1 для vscode-languageclient, надо попробовать собраться на нем

Нужен гайд для крестьян :D

@nixel2007
Copy link
Member

Кажется, это уже пофикшено на стороне бсл лс

@Morkhe
Copy link
Author

Morkhe commented Mar 4, 2024

Кажется, это уже пофикшено на стороне бсл лс

А, значит это новое после обновления всего что можно.

[Error - 8:51:54 PM] [ERROR - 2024-03-04T17:51:54.208603900Z] [diagnostic-computer-98] [com.github._1c_syntax.bsl.languageserver.context.computer.DiagnosticComputer]: Diagnostic computation error.
Diagnostic: Either [
  left = IdenticalExpressions
  right = null
]
[Error - 9:03:55 PM] [ERROR - 2024-03-04T18:03:55.146975Z] [text-document-service-54] [org.eclipse.lsp4j.jsonrpc.RemoteEndpoint]: Internal error: java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "java.util.Map.get(Object)" is null
[Error - 9:03:55 PM] Request textDocument/codeLens failed.
  Message: Internal error.
  Code: -32603 
java.util.concurrent.CompletionException: java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "java.util.Map.get(Object)" is null
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "java.util.Map.get(Object)" is null
	at com.github._1c_syntax.bsl.languageserver.codelenses.AbstractMethodComplexityCodeLensSupplier.lambda$getCodeLenses$0(AbstractMethodComplexityCodeLensSupplier.java:63)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
	at com.github._1c_syntax.bsl.languageserver.codelenses.AbstractMethodComplexityCodeLensSupplier.getCodeLenses(AbstractMethodComplexityCodeLensSupplier.java:65)
	at com.github._1c_syntax.bsl.languageserver.providers.CodeLensProvider.lambda$getCodeLens$1(CodeLensProvider.java:82)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
	at com.github._1c_syntax.bsl.languageserver.providers.CodeLensProvider.getCodeLens(CodeLensProvider.java:84)
	at com.github._1c_syntax.bsl.languageserver.BSLTextDocumentService.lambda$codeLens$5(BSLTextDocumentService.java:214)
	... 4 more

Для воспроизведения перед любой функцией/процедурой вбить слово Функция/Процедура соответственно
image

@nixel2007
Copy link
Member

Включите, пожалуйста, трейс лог бсл лс

@Morkhe
Copy link
Author

Morkhe commented Mar 4, 2024

В момент ошибки

[Trace - 10:00:09 PM] Received request 'textDocument/foldingRange - (74)'
Params: {
  "textDocument": {
    "uri": "file:///g%3A/test/test.os"
  }
}


[Trace - 10:00:09 PM] Sending response 'textDocument/foldingRange - (74)'. Processing request took 0ms
Result: [
  {
    "startLine": 0,
    "endLine": 3,
    "kind": "region"
  }
]


[Trace - 10:00:09 PM] Received request 'textDocument/documentSymbol - (75)'
Params: {
  "textDocument": {
    "uri": "file:///g%3A/test/test.os"
  }
}


[Trace - 10:00:09 PM] Sending response 'textDocument/documentSymbol - (75)'. Processing request took 1ms
Result: [
  {
    "name": "Процедура",
    "kind": 6,
    "range": {
      "start": {
        "line": 0,
        "character": 0
      },
      "end": {
        "line": 3,
        "character": 14
      }
    },
    "selectionRange": {
      "start": {
        "line": 1,
        "character": 0
      },
      "end": {
        "line": 1,
        "character": 9
      }
    },
    "tags": [],
    "children": []
  }
]


[Trace - 10:00:09 PM] Received request 'textDocument/codeLens - (76)'
Params: {
  "textDocument": {
    "uri": "file:///g%3A/test/test.os"
  }
}


[Trace - 10:00:09 PM] Sending notification 'window/logMessage'
Params: {
  "type": 1,
  "message": "[ERROR - 2024-03-04T19:00:09.860407800Z] [text-document-service-3] [org.eclipse.lsp4j.jsonrpc.RemoteEndpoint]: Internal error: java.lang.NullPointerException: Cannot invoke \"java.lang.Integer.intValue()\" because the return value of \"java.util.Map.get(Object)\" is null"
}


[Trace - 10:00:09 PM] Sending response 'textDocument/codeLens - (76)'. Processing request took 62ms
Result: null

Или скинуть целиковый файл?

@nixel2007
Copy link
Member

Да, целиком было бы прямо здорово. Это серверный лог, да?

@Morkhe
Copy link
Author

Morkhe commented Mar 5, 2024

Это серверный лог, да?

Через .bsl-language-server.json включал. Полагаю, что серверный.
trace.log

@nixel2007
Copy link
Member

Спасибо большое!

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

No branches or pull requests

3 participants