PrestonKnopp / language-gdscript

gdscript language grammar package for atom.io
https://atom.io/packages/lang-gdscript
MIT License
32 stars 9 forks source link

The language server client is not destroyed on package deactivation #46

Closed MonkeyToiletLadder closed 3 years ago

MonkeyToiletLadder commented 3 years ago

I keep getting an error from the lang-gdscript package even though i have uninstalled it.

[Enter steps to reproduce:]

1. ...
2. ...

**Atom**: 1.55.0 x64
**Electron**: 6.1.12
**OS**: Ubuntu 20.04.2
**Thrown From**: 'lang-gdscript' package vundefined

### Stack Trace

Uncaught Error: Connection is closed.

At /home/dylan/.atom/packages/lang-gdscript/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/main.js:613

Error: Connection is closed. at /packages/lang-gdscript/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/main.js:138:28) at throwIfClosedOrDisposed (/packages/lang-gdscript/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/main.js:613:19) at Object.sendNotification (/packages/lang-gdscript/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/main.js:667:13) at LanguageClientConnection._sendNotification (/packages/ide-cpp/node_modules/atom-languageclient/build/lib/languageclient.js:242:15) at LanguageClientConnection.didChangeTextDocument (/packages/ide-cpp/node_modules/atom-languageclient/build/lib/languageclient.js:131:10) at TextEditorSyncAdapter.sendIncrementalChanges (/packages/ide-cpp/node_modules/atom-languageclient/build/lib/adapters/document-sync-adapter.js:200:24) at Function.simpleDispatch (/usr/share/atom/resources/app/static/:11:1190181) at Emitter.emit (/usr/share/atom/resources/app/static/:11:1191622) at TextBuffer.emitDidChangeTextEvent (/usr/share/atom/resources/app/static/:11:505759) at TextBuffer.transact (/usr/share/atom/resources/app/static/:11:493844) at TextEditor.transact (/usr/share/atom/resources/app/static/:11:24215) at /usr/share/atom/resources/app/static/:11:16150 at TextEditor.mergeSelections (/usr/share/atom/resources/app/static/:11:39484) at TextEditor.mergeIntersectingSelections (/usr/share/atom/resources/app/static/:11:39038) at TextEditor.mutateSelectedText (/usr/share/atom/resources/app/static/:11:16113) at TextEditor.insertText (/usr/share/atom/resources/app/static/:11:15662) at TextEditor.e. [as insertText] (/usr/share/atom/resources/app/static/:11:258528) at TextEditorComponent.didTextInput (/usr/share/atom/resources/app/static/:11:94287)


### Commands
 -0:43.5.0 core:move-down (input.hidden-input)
 -0:43.1.0 core:move-up (input.hidden-input)
 -0:42.8.0 snippets:next-tab-stop (input.hidden-input)
 -0:42.8.0 snippets:expand (input.hidden-input)
 -0:42.8.0 editor:indent (input.hidden-input)
 -0:41.2.0 core:move-up (input.hidden-input)
 -0:40.9.0 intentions:highlight (input.hidden-input)

4x -0:40.8.0 editor:move-to-end-of-word (input.hidden-input) 4x -0:40 core:move-right (input.hidden-input) 2x -0:39 core:backspace (input.hidden-input) -0:33 core:move-right (input.hidden-input) -0:32.6.0 core:move-down (input.hidden-input) -0:29.5.0 snippets:next-tab-stop (input.hidden-input) -0:29.5.0 snippets:expand (input.hidden-input) -0:29.5.0 editor:indent (input.hidden-input) -0:09.8.0 core:delete (input.hidden-input)


### Non-Core Packages

autocomplete-glsl 0.2.3 autocomplete-love 0.4.0 autocomplete-lua 0.9.2 build 0.70.0 build-cmake 0.12.0 busy-signal 2.0.1 dbg 1.6.3 dbg-gdb 1.7.8 dbg-lua 0.3.0 fold-functions 0.11.0 hyperclick 0.1.5 hyperclick-love 0.6.0 ide-cpp 0.1.0 intentions 1.1.5 language-cmake 1.2.0 language-glsl 2.0.4 language-lua 0.9.11 language-moonscript 1.7.1 linter 3.3.1 linter-luaparse 0.2.0 linter-ui-default 3.3.1 love-ide 0.19.1 output-panel 0.3.4 recursive-folding-toggle 0.1.1 teletype 0.13.4 termination 0.7.6 tool-bar 1.4.2

PrestonKnopp commented 3 years ago

Hi, thanks for posting an issue. This specific issue should resolve itself after restarting atom. The root cause is from the language client failing to be properly destroyed on package deactivation. I'll look into this.

PrestonKnopp commented 3 years ago

The client is now properly destroyed on package deactivation.