Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gnvim is broken for nvim 0.9+ #206

Closed
4 tasks done
kGAr6Naaes opened this issue May 3, 2023 · 6 comments
Closed
4 tasks done

Gnvim is broken for nvim 0.9+ #206

kGAr6Naaes opened this issue May 3, 2023 · 6 comments

Comments

@kGAr6Naaes
Copy link

kGAr6Naaes commented May 3, 2023

I wanted to try gnvim out and cloned the repo.

However, when launching gnvim from a command line, all I get is an empty, white window.
Launching gnvim from a terminal prints:

  • What is normally printed
thread 'main' panicked at 'failed to decode redraw notification: Syntax("error while decoding value: invalid length 8, expected fewer elements in array")', ui/src/components/appwindow/imp.rs:78:26
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

(gnvim:18040): Gtk-WARNING **: 23:27:00.020: Finalizing Overflower 0x555eca595d40, but it still has children left:
   - Omnibar 0x555eca598510

(gnvim:18040): Gtk-WARNING **: 23:27:00.020: Finalizing Tabline 0x555eca667cf0, but it still has children left:
   - GtkBox 0x555eca6686e0
  • RUST_BACKTRACE=full
thread 'main' panicked at 'failed to decode redraw notification: Syntax("error while decoding value: invalid length 8, expected fewer elements in array")', ui/src/components/appwindow/imp.rs:78:26
stack backtrace:
   0:     0x5567390c817a - std::backtrace_rs::backtrace::libunwind::trace::ha9053a9a07ca49cb
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x5567390c817a - std::backtrace_rs::backtrace::trace_unsynchronized::h9c2852a457ad564e
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x5567390c817a - std::sys_common::backtrace::_print_fmt::h457936fbfaa0070f
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x5567390c817a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h5779d7bf7f70cb0c
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x5567390e91de - core::fmt::write::h5a4baaff1bcd3eb5
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/fmt/mod.rs:1232:17
   5:     0x5567390c5c65 - std::io::Write::write_fmt::h4bc1f301cb9e9cce
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/io/mod.rs:1684:15
   6:     0x5567390c7f45 - std::sys_common::backtrace::_print::h5fcdc36060f177e8
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x5567390c7f45 - std::sys_common::backtrace::print::h54ca9458b876c8bf
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x5567390c959f - std::panicking::default_hook::{{closure}}::hbe471161c7664ed6
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:271:22
   9:     0x5567390c92db - std::panicking::default_hook::ha3500da57aa4ac4f
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:290:9
  10:     0x5567390c9b48 - std::panicking::rust_panic_with_hook::h50c09d000dc561d2
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:692:13
  11:     0x5567390c9a49 - std::panicking::begin_panic_handler::{{closure}}::h9e2b2176e00e0d9c
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:583:13
  12:     0x5567390c85e6 - std::sys_common::backtrace::__rust_end_short_backtrace::h5739b8e512c09d02
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:150:18
  13:     0x5567390c9752 - rust_begin_unwind
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:579:5
  14:     0x556738f5e0f3 - core::panicking::panic_fmt::hf33a1475b4dc5c3e
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:64:14
  15:     0x556738f5e543 - core::result::unwrap_failed::hdff5465d74574b44
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/result.rs:1750:5
  16:     0x556738fb00d6 - glib::main_context_futures::<impl glib::auto::main_context::MainContext>::spawn_local_with_priority::{{closure}}::ha7a5a5e2ce4e6d1b
  17:     0x5567390a9f6d - std::panicking::try::h441a6a86b4c845dc
  18:     0x5567390a9a82 - glib::main_context::<impl glib::auto::main_context::MainContext>::with_thread_default::heed337240fcba866
  19:     0x5567390ad788 - glib::main_context_futures::TaskSource::dispatch::hafa01fa61f9ee3fa
  20:     0x7f2d5f12639c - g_main_context_dispatch
  21:     0x7f2d5f184438 - <unknown>
  22:     0x7f2d5f123a23 - g_main_context_iteration
  23:     0x7f2d5f35b01d - g_application_run
  24:     0x556738fce983 - <O as gio::application::ApplicationExtManual>::run::h1d0b8aa604e25d52
  25:     0x556738f9293e - gnvim::main::hb2a63c1544d952aa
  26:     0x556738f8a383 - std::sys_common::backtrace::__rust_begin_short_backtrace::hd19fc1dd306347af
  27:     0x556738f7b6b9 - std::rt::lang_start::{{closure}}::ha3f11bd68c9fca37
  28:     0x5567390c201c - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hd6efcd3bec896f2c
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/ops/function.rs:287:13
  29:     0x5567390c201c - std::panicking::try::do_call::hce04e543bb1f4cbb
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:487:40
  30:     0x5567390c201c - std::panicking::try::h3342dd4e1f680968
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:451:19
  31:     0x5567390c201c - std::panic::catch_unwind::h148ce1e59ac0cee7
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panic.rs:140:14
  32:     0x5567390c201c - std::rt::lang_start_internal::{{closure}}::h25f9dda2057a67fe
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/rt.rs:148:48
  33:     0x5567390c201c - std::panicking::try::do_call::h7caaaeaf9401650b
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:487:40
  34:     0x5567390c201c - std::panicking::try::he7d15285746cbbc2
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:451:19
  35:     0x5567390c201c - std::panic::catch_unwind::h89fb4f50c0301fe0
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panic.rs:140:14
  36:     0x5567390c201c - std::rt::lang_start_internal::h078acd489417d3c1
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/rt.rs:148:20
  37:     0x556738f92eb5 - main
  38:     0x7f2d5ee0eb4a - __libc_start_call_main
  39:     0x7f2d5ee0ec0b - __libc_start_main@@GLIBC_2.34
  40:     0x556738f5e6d5 - _start
  41:                0x0 - <unknown>

(gnvim:17677): Gtk-WARNING **: 23:09:51.063: Finalizing Overflower 0x556739a23b10, but it still has children left:
   - Omnibar 0x556739a26250

(gnvim:17677): Gtk-WARNING **: 23:09:51.063: Finalizing Tabline 0x556739af95b0, but it still has children left:
   - GtkBox 0x556739af9740
  • Gtk4 devel and gcc are installed
  • Cargo is installed
  • Operative system is on the latest version and so are the packages
  • No errors are thrown during compile

Is there a way to fix this?

@vhakulinen
Copy link
Owner

Which nvim version are you using? Latest I've used gnvim with is 0.8.3. There could be some changes to newer versions of nvim that gnvim fails to handle.

@kGAr6Naaes
Copy link
Author

It's version 0.10.0, compiled from the main branch

NVIM v0.10.0-dev-132+ge81331c2b
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
...

@TinusgragLin
Copy link

It's version 0.10.0, compiled from the main branch

NVIM v0.10.0-dev-132+ge81331c2b
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
...

Same problem here for neovim 0.9.0 (latest stable), I managed to work around by defaulting the value of --nvim option to nvim-old, which symbol-links to downloaded nvim 0.8.3 appimage.

@vhakulinen
Copy link
Owner

The issue is with gnvim not respecting this part of the api contract that neovim sets:

Future versions of Nvim may add new update kinds and may append new parameters
to existing update kinds. Clients must be prepared to ignore such extensions,
for forward-compatibility.

The easy fix is to regenerate the API types and break gnvim for previous versions of neovim, but the more involved fix is to implement custom serde deserializer that knows how to ignore extra fields.

I'm leaning towards only supporting nvim 0.9+ since it contains updated API for making smooth scrolling better (hopefully).

@vhakulinen vhakulinen changed the title Cannot run (Fedora 38) Gnvim is broken for nvim 0.9+ May 6, 2023
@illwieckz
Copy link

illwieckz commented May 8, 2023

Hmm, I got a similar error, but I'm using the stock neovim from Ubuntu 22.10 repository that ships neovim 0.7.2.

Maybe it would be good to have a message saying the version is not compatible, instead of a kind-of-crash.

@vhakulinen
Copy link
Owner

I was thinking of adding a version check, but didn't get around to it yet.

The updated nvim version requirement is documented on the readme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants