sphaerophoria/atom-rtags-plus

All rtags operations start to fail after few minutes

dawiddr opened this issue · 3 comments

I start rdm manually, then I run Atom. Everything works as expected – I can jump to symbol definitions, etc. – but only for few minutes. Then all operations start to fail. There's no error notification in Atom, but I can see that some errors are logged in console:

internal/child_process.js:540 Uncaught (in promise) Error: channel closed
    at ChildProcess.target.send (internal/child_process.js:540:16)
    at RcExecutor.<anonymous> (/home/drechny/.atom/packages/atom-rtags-plus/lib/rtags.js:180:22)
    at RcExecutor.rc_exec (/home/drechny/.atom/packages/atom-rtags-plus/lib/rtags.js:155:12)
    at RcExecutor.index_unsaved_file (/home/drechny/.atom/packages/atom-rtags-plus/lib/rtags.js:252:19)
    at subscriptions.(anonymous function).editor.onDidStopChanging (/home/drechny/.atom/packages/atom-rtags-plus/lib/modified-file-tracker.js:74:25)
    at Function.module.exports.Emitter.simpleDispatch (/home/drechny/.local/share/umake/ide/atom/resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/home/drechny/.local/share/umake/ide/atom/resources/app.asar/node_modules/event-kit/lib/emitter.js:129:28)
    at /home/drechny/.local/share/umake/ide/atom/resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1371:25target.send @ internal/child_process.js:540(anonymous function) @ rtags.js:180rc_exec @ rtags.js:155index_unsaved_file @ rtags.js:252subscriptions.(anonymous function).editor.onDidStopChanging @ modified-file-tracker.js:74module.exports.Emitter.simpleDispatch @ emitter.js:25module.exports.Emitter.emit @ emitter.js:129(anonymous function) @ text-buffer.js:1371
notification.coffee:17 Uncaught (in promise) Error: Notification must be created with string message: Error: channel closed
    at Notification.module.exports.Notification.validate (/home/drechny/.local/share/umake/ide/atom/resources/app.asar/src/notification.js:25:15)
    at new Notification (/home/drechny/.local/share/umake/ide/atom/resources/app.asar/src/notification.js:20:12)
    at NotificationManager.module.exports.NotificationManager.addError (/home/drechny/.local/share/umake/ide/atom/resources/app.asar/src/notification-manager.js:41:35)
    at /home/drechny/.atom/packages/atom-rtags-plus/lib/atom-rtags.coffee:145:43module.exports.Notification.validate @ notification.coffee:17Notification @ notification.coffee:13module.exports.NotificationManager.addError @ notification-manager.coffee:132(anonymous function) @ atom-rtags.coffee [sm]:145

rdm still runs fine, but it receives no commands from Atom. When I run rc from command line, I still get results. After I restart Atom, everything works again.

My environment:
Ubuntu Linux 16.04
atom-rtags-plus 1.4.0
rtags 2.8

Thanks for the report. I haven't seen this myself, but ill take a go at reproducing it.

I haven't been able to reproduce this myself, however I have tried to make the error handling in this area a little more robust. In the next update (1.4.1) you should see an error when the issue occurs. It would be great if you could get a feel for what triggers this and I can try to fix it for real.

After your changes I don't encounter this problem anymore, but nor I can see any error notifications. Maybe that was something specific to my platform. In any case, thank you for your help and all the work on this great plugin!