daa84 / neovim-gtk

gtk ui for neovim
GNU General Public License v3.0
716 stars 57 forks source link

Neovim-GTK closing after error occurs #172

Open cristobaltapia opened 5 years ago

cristobaltapia commented 5 years ago

I am getting an error sometimes when using neovim-gtk. When this happens, the window closes. This is the error:

~$ nvim-gtk --no-fork
ERROR 2019-01-20T18:18:43Z: neovim_lib::rpc::client: Error while reading: I/O error while reading marker byte: failed to fill whole buffer
thread 'main' panicked at 'Error run input command to nvim: GenericError("Error read response: I/O error while reading marker byte: failed to fill whole buffer")', libcore/result.rs:1009:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.

I am using the git version of neovim-gtk, installed in Archlinux with this AUR package. The neovim version is 0.3.4.

daa84 commented 5 years ago

Some problem with nvim-gtk <-> nvim communication, looks more like nvim bug. Maybe some plugin. Does this happens on 0.3.4 or was previously?

cristobaltapia commented 5 years ago

It started last week, so probably only 0.3.4. But I will test whether it is a plugin that is causing this error. That might be the problem.

jacobmischka commented 5 years ago

I can confirm it doesn't happen on 0.3.1, unsure about 0.3.2 or 0.3.3.

The crash does indeed seem to happen to me on 0.3.2 and 0.3.3 as well, but not on 0.3.1. Also on Arch, installed via the same package and using the repository nvim package.

Edit: It seems to happen to me one some machines and not others, my work desktop doesn't seem to experience the crash even on 0.3.4, however when closing nvim-gtk I do still see the same rpc::client buffer error. I'm not fully sure what's happening, it's confusing. Is there any way I can help debug this?

daa84 commented 5 years ago

buffer error - is error that nvim no more response to rpc calls, in case you close it with :q it happens, also it happens in case nvim for some reason crashed.

daa84 commented 5 years ago

nvim 0.3.2 introduce new protocol, maybe this also introduce some bugs in old one. I have plan to fully migrate to new protocol without support of nvim < 0.3.2.

cristobaltapia commented 5 years ago

I think that the problem is caused in combination with the airline plugin. @jacobmischka are you using that plugin as well? If I deactivate that plugin, then the problem does not occur.

jacobmischka commented 5 years ago

I am, but I still seem to experience the crash when disabling airline on neovim 0.3.4-2.

daa84 commented 5 years ago

You can try to use version from newgrid branch, this branch uses new neovim api for rendering, maybe this helps.

jacobmischka commented 5 years ago

Thanks, I'll give it a try tonight!

jacobmischka commented 5 years ago

I still experience the crash using the newgrid branch. I guess it may be a plugin, but the fact that it happens on only some of my machines seems weird and maybe graphics related?

To be slightly more specific, it happens to me on one machine running Intel GPU and Wayland, and another with Nvidia GPU and drivers and X, though for some reason not on my work desktop which is running Intel and X. So maybe graphics are unrelated. I'm syncing my neovim config file across all machines and all are running Arch using the same versions of packages, so I'm not sure what the difference could be between them all.

I'm away from work today, but when I'm back tomorrow I can do some more testing on my work desktop to see what's different that makes it not crash.

jacobmischka commented 5 years ago

It's worth noting that I updated all packages the other day and haven't experienced a crash since, so it looks like an update to either nvim or nvim-gtk has fixed whatever was causing it. Thanks!

cristobaltapia commented 5 years ago

Well, I am still experiencing this issue. @jacobmischka, are you too?

jacobmischka commented 5 years ago

Oops, sorry for not replying. I'm able to work around the crash by triggering a resize for the neovim-gtk window after starting up. It's a plugin issue, either airline or wintabs or something is loaded in an incorrect order and the window crashes when the area of the screen they try rendering to isn't loaded properly. The resize makes everything recalculate and then everything works fine.

It's slightly annoying to have to min/max the window or something after opening it every time, but I haven't been bothered by it enough to dig further yet.