Open martinbean opened 7 years ago
Dirty workaround is to disable and enable package again. It works temporary and is not a fix but at least you don't have to close Atom.
I've had the same issue just now - it's occured while I was trying to type some comment block (docBlock). And next the error notification was showing up on every single try to type something in my file. As @Nebulosar mentioned - disable and reenable package solved the problem, but I don't know for how long. In ide-php package setting I have set the Memory Limit value to 256M.
Windows 10 x64 ide-php 0.6.9 atom-ide-ui 0.5.4
The error has been occured again, and again while typing an docBlock comment.
C:\Users\s.gruszka\AppData\Local\atom\app-1.21.2\resources\app\node_modules\text-buffer\lib\text-buffer.js:959
Error: Connection is closed. at new ConnectionError (C:\Users\user\.atom\packages\ide-php\node_modules\vscode-jsonrpc\lib\main.js:131:28) at throwIfClosedOrDisposed (C:\Users\user\.atom\packages\ide-php\node_modules\vscode-jsonrpc\lib\main.js:606:19) at Object.sendNotification (C:\Users\user\.atom\packages\ide-php\node_modules\vscode-jsonrpc\lib\main.js:660:13) at LanguageClientConnection._sendNotification (C:\Users\user\.atom\packages\ide-php\node_modules\atom-languageclient\build\lib\languageclient.js:242:15) at LanguageClientConnection.didChangeTextDocument (C:\Users\user\.atom\packages\ide-php\node_modules\atom-languageclient\build\lib\languageclient.js:131:10) at TextEditorSyncAdapter.sendFullChanges (C:\Users\user\.atom\packages\ide-php\node_modules\atom-languageclient\build\lib\adapters\document-sync-adapter.js:181:22) at Function.module.exports.Emitter.simpleDispatch (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\event-kit\lib\emitter.js:25:20) at Emitter.module.exports.Emitter.emit (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\event-kit\lib\emitter.js:141:34) at C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\src\text-editor.js:626:38 at Function.module.exports.Emitter.simpleDispatch (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\event-kit\lib\emitter.js:25:20) at Emitter.module.exports.Emitter.emit (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\event-kit\lib\emitter.js:141:34) at DisplayLayer.emitDidChangeSyncEvent (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\text-buffer\lib\display-layer.js:825:24) at C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\text-buffer\lib\text-buffer.js:780:35 at Map.forEach (native) at TextBuffer.module.exports.TextBuffer.emitDidChangeEvent (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\text-buffer\lib\text-buffer.js:779:47) at TextBuffer.module.exports.TextBuffer.applyChange (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\text-buffer\lib\text-buffer.js:762:18) at TextBuffer.module.exports.TextBuffer.setTextInRange (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\text-buffer\lib\text-buffer.js:697:29) at C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\text-buffer\lib\text-buffer.js:677:32 at TextBuffer.module.exports.TextBuffer.transact (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\text-buffer\lib\text-buffer.js:952:24) at TextBuffer.module.exports.TextBuffer.setTextInRange (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\text-buffer\lib\text-buffer.js:675:27) at TextBuffer.module.exports.TextBuffer.delete (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\text-buffer\lib\text-buffer.js:785:25) at DocBlockrAtom.module.exports.DocBlockrAtom.erase (C:\Users\user\.atom\packages\docblockr\lib\docblockr-worker.js:799:20) at DocBlockrAtom.module.exports.DocBlockrAtom.parse_command (C:\Users\user\.atom\packages\docblockr\lib\docblockr-worker.js:287:12) at HTMLElement.<anonymous> (C:\Users\user\.atom\packages\docblockr\lib\docblockr-worker.js:81:16) at CommandRegistry.handleCommandEvent (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\src\command-registry.js:381:36) at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\atom-keymap\lib\keymap-manager.js:621:22) at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\atom-keymap\lib\keymap-manager.js:412:28) at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\src\window-event-handler.js:100:42) at HTMLDocument.<anonymous> (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\src\window-event-handler.js:3:65)
So, reenable plugin is an temporary workaround.
reenable plugin doesn't helps...
Happens still in Atom 1.22.
Stack Trace on Mac OS X:
Error: Connection is closed. at new ConnectionError (/.atom/packages/ide-php/node_modules/vscode-jsonrpc/lib/main.js:138:28) at throwIfClosedOrDisposed (/.atom/packages/ide-php/node_modules/vscode-jsonrpc/lib/main.js:613:19) at Object.sendNotification (/.atom/packages/ide-php/node_modules/vscode-jsonrpc/lib/main.js:667:13) at LanguageClientConnection._sendNotification (/.atom/packages/ide-php/node_modules/atom-languageclient/build/lib/languageclient.js:242:15) at LanguageClientConnection.didChangeTextDocument (/.atom/packages/ide-php/node_modules/atom-languageclient/build/lib/languageclient.js:131:10) at TextEditorSyncAdapter.sendFullChanges (/.atom/packages/ide-php/node_modules/atom-languageclient/build/lib/adapters/document-sync-adapter.js:181:22) at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:25:20) at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:141:34) at /Applications/Atom.app/Contents/Resources/app/src/text-editor.js:641:38 at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:25:20) at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:141:34) at DisplayLayer.emitDidChangeSyncEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/display-layer.js:825:24) at decorationLayerDisposable.textDecorationLayer.onDidInvalidateRange (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/display-layer.js:161:20) at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:25:20) at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/nodemodules/event-kit/lib/emitter.js:141:34) at TokenizedBuffer.tokenizeNextChunk (/Applications/Atom.app/Contents/Resources/app/src/tokenized-buffer.js:411:26) at .defer (/Applications/Atom.app/Contents/Resources/app/src/tokenized-buffer.js:378:63) at /Applications/Atom.app/Contents/Resources/app/node_modules/underscore/underscore.js:666:53
Does anyone have a public project they can share with steps to reproduce the error using that project?
@rsese Try it with any PHP project, because it’s unusable in Atom for me across three different Macs, so much so that I quickly stopped using the “IDE” features.
Yes I've tried with simple test files and also with random projects like https://github.com/borisrepl/boris but can't reproduce this error. As Damien mentioned in https://github.com/atom/ide-typescript/issues/17#issuecomment-344765266, getting a reproduction would be helpful for us.
Don't know if is related, but I had similar problems after setting "Memory Limit" to 1GB in ide-php's settings. Removing this customization the problem solved, but, obviously, with large projects (opening more than one) my ram saturates and the pc collapses :(
@vash1486 Yes, in my experience it is related.
I gave up with this issue, and Atom in general. Started using Visual Studio Code with the Intelephense package and it’s snappy and has more IDE-features than even this package would have added to Atom for PHP development.
https://github.com/atom/ide-php/issues/73 looks related.
Sidenote: While I haven't switched to VSCode because of missing use statement auto-insertion on auto-complete, I have found intelephense to be far better as well. I did inquire early on if atom-php would consider switching auto-complete providers, but it seems that atom-php and the current autocomplete provider are a package deal. They would only consider switching if the felixbecker package didn't work out.
@martinbean That being said, it might not be that difficult to make an Atom port of intelephense. (I find Atom's UI better than VSCode, personal preference, so I will probably be sticking with Atom for now.)
@mikebronner I was a longtime user of Atom. Had used it as my primary development environment since private beta. But been using VS Code in anger for a couple of months now and already feel comfortable with it.
It’s a shame. I did (and still do) like Atom, but it seems to be suited for working with “first-class” supported languages like JavaScript, and PHP support and compatibility just feels like an afterthought because PHP’s not a “cool kid” language.
If the ide-php package ever becomes stable, then I’ll give it another try, but I write PHP as my day job and need an editor that makes it easy for me, not one that I have to fight with.
This package becomes unusable for me after a few minutes of usage. I get the following in the Console:
Also, I don’t know if it’s related, but autocomplete and tab-completions get very laggy when this package is enabled.