jalvesaq / Nvim-R

Vim plugin to work with R
GNU General Public License v2.0
968 stars 125 forks source link

Server not running #769

Closed idavydov closed 1 year ago

idavydov commented 1 year ago

Hi,

Thanks for fixing #767. I updated to 807871d to test the fix, and I noticed that now the server is frequently going down.

When this happens, if I press <localleader>rh, I get "Server not running". And ps -Af | grep nclientserver | grep -v grep doesn't return anything.

Do you have any suggestions on how to debug this?

:RDebugInfo says:

RInitOut

nvimcom_info
  version: 0.9-151
  home: /xxx/R/x86_64-pc-linux-gnu-library/4.3.0-foss
  Rversion: 4.3.0

RInitErr

Time
  R_before_nrs: 1.784783
  start_R: 1.575233
  start_nrs: 0.067005
  common_global: 0.105867
idavydov commented 1 year ago

Sometimes after sending a chunk I get the following error:

Error sending message to Nvim-R: 4352242 x 4029578
Error sending final byte to Nvim-R: 1 x 18446744073709551615
jalvesaq commented 1 year ago

The nvimcom TCP client is trying to send 4352242 bytes of data to nvimrserver but a single write command failed to send the complete data. I can't replicate the issue here, so, I created a new branch with a possible fix. Could you try it, please: https://github.com/jalvesaq/Nvim-R/tree/write_loop

jalvesaq commented 1 year ago

I just made some changes based on what I found in the PHP source code...

idavydov commented 1 year ago

I'm running the write_loop branch for a couple of hours now, and it seem to work well for now. Thanks!

jalvesaq commented 1 year ago

Thanks for the feedback! I'll merge it.