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

Postscript error on linux #44

Closed
QuinnFreedman opened this issue Jan 27, 2020 · 20 comments
Closed

Postscript error on linux #44

QuinnFreedman opened this issue Jan 27, 2020 · 20 comments
Labels
bug Something isn't working

Comments

@QuinnFreedman
Copy link

When I try to run neovide on Ubuntu 19.10 I get the following error: Failed to load by postscript name: NotFound. Then it exits without opening any GUI window.

Running with a stack trance gives this:

Bridge created.
thread 'main' panicked at 'Failed to load by postscript name: NotFound', src/libcore/result.rs:1165:5
stack backtrace:
   0:     0x556b46ccd234 - backtrace::backtrace::libunwind::trace::h65597d255cb1398b
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
   1:     0x556b46ccd234 - backtrace::backtrace::trace_unsynchronized::hd4f479d7150ec4a0
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
   2:     0x556b46ccd234 - std::sys_common::backtrace::_print_fmt::h015072984a2b172c
                               at src/libstd/sys_common/backtrace.rs:77
   3:     0x556b46ccd234 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h6df05d3335f32194
                               at src/libstd/sys_common/backtrace.rs:61
   4:     0x556b46cf3f5c - core::fmt::write::h1f444f4312eb6c27
                               at src/libcore/fmt/mod.rs:1028
   5:     0x556b46cca117 - std::io::Write::write_fmt::h8d147888220078ef
                               at src/libstd/io/mod.rs:1412
   6:     0x556b46ccf78e - std::sys_common::backtrace::_print::h8a6df0fa81d6af62
                               at src/libstd/sys_common/backtrace.rs:65
   7:     0x556b46ccf78e - std::sys_common::backtrace::print::h6f05b4733407e509
                               at src/libstd/sys_common/backtrace.rs:50
   8:     0x556b46ccf78e - std::panicking::default_hook::{{closure}}::h0d0a23bd02315dd8
                               at src/libstd/panicking.rs:188
   9:     0x556b46ccf481 - std::panicking::default_hook::h8d15a9aecb4efac6
                               at src/libstd/panicking.rs:205
  10:     0x556b46ccfe8b - std::panicking::rust_panic_with_hook::hbe174577402a475d
                               at src/libstd/panicking.rs:464
  11:     0x556b46ccfa2e - std::panicking::continue_panic_fmt::h4d855dad868accf3
                               at src/libstd/panicking.rs:373
  12:     0x556b46ccf916 - rust_begin_unwind
                               at src/libstd/panicking.rs:302
  13:     0x556b46cf010e - core::panicking::panic_fmt::hdeb7979ab6591473
                               at src/libcore/panicking.rs:139
  14:     0x556b46cf0207 - core::result::unwrap_failed::h054dd680e6fcd38b
                               at src/libcore/result.rs:1165
  15:     0x556b4667f7aa - core::result::Result<T,E>::expect::h01b8e57bab9f4133
                               at /rustc/73528e339aae0f17a15ffa49a8ac608f50c6cf14/src/libcore/result.rs:960
  16:     0x556b4667f7aa - neovide::renderer::caching_shaper::build_fonts::h45fbccc53fec517a
                               at src/renderer/caching_shaper.rs:58
  17:     0x556b4667fa8d - neovide::renderer::caching_shaper::CachingShaper::get_font_pair::hf326ad3b3c69b2f2
                               at src/renderer/caching_shaper.rs:90
  18:     0x556b4668080f - neovide::renderer::caching_shaper::CachingShaper::font_base_dimensions::hc7641d10485269d5
                               at src/renderer/caching_shaper.rs:167
  19:     0x556b466574ea - neovide::renderer::Renderer::new::h57f68f749c521d19
                               at src/renderer/mod.rs:32
  20:     0x556b466419a1 - neovide::window::ui_loop::h4547e1e94563b4bf
                               at src/window.rs:32
  21:     0x556b46636ce3 - std::rt::lang_start::{{closure}}::h66753dada51e6faa
                               at /rustc/73528e339aae0f17a15ffa49a8ac608f50c6cf14/src/libstd/rt.rs:61
  22:     0x556b46ccf8b3 - std::rt::lang_start_internal::{{closure}}::h6ea535ec5c50fc3e
                               at src/libstd/rt.rs:48
  23:     0x556b46ccf8b3 - std::panicking::try::do_call::h631c6408dfccc6f5
                               at src/libstd/panicking.rs:287
  24:     0x556b46cd802a - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:78
  25:     0x556b46cd042d - std::panicking::try::hab539b2d1255d635
                               at src/libstd/panicking.rs:265
  26:     0x556b46cd042d - std::panic::catch_unwind::hd5e0a26424bd7f34
                               at src/libstd/panic.rs:396
  27:     0x556b46cd042d - std::rt::lang_start_internal::h3bdc4c7d98181bf9
                               at src/libstd/rt.rs:47
  28:     0x556b466099e8 - main
  29:     0x7f8d2e3cbb6b - __libc_start_main
  30:     0x556b465ede8a - _start
  31:                0x0 - <unknown>

@Kethku
Copy link
Member

Kethku commented Jan 27, 2020

I suspect this is due to the emoji font not being present. Let me push a fix real quick

@Kethku
Copy link
Member

Kethku commented Jan 27, 2020

Should be fixed, or at the very least give a better error message.

@Kethku
Copy link
Member

Kethku commented Jan 27, 2020

Let me know if you get the chance to confirm. Otherwise I will be closing this tomorrow

@QuinnFreedman
Copy link
Author

I think that may be fixed. I'm getting a different error now:

Bridge created.
thread 'main' panicked at 'Attempted to initialize GTK from two different threads.', /home/quinn/.cargo/registry/src/github.com-1ecc6299db9ec823/gtk-0.4.1/src/rt.rs:104:9
stack backtrace:
   0:     0x5623bef77284 - backtrace::backtrace::libunwind::trace::h65597d255cb1398b
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
   1:     0x5623bef77284 - backtrace::backtrace::trace_unsynchronized::hd4f479d7150ec4a0
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
   2:     0x5623bef77284 - std::sys_common::backtrace::_print_fmt::h015072984a2b172c
                               at src/libstd/sys_common/backtrace.rs:77
   3:     0x5623bef77284 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h6df05d3335f32194
                               at src/libstd/sys_common/backtrace.rs:61
   4:     0x5623bef9dfac - core::fmt::write::h1f444f4312eb6c27
                               at src/libcore/fmt/mod.rs:1028
   5:     0x5623bef74167 - std::io::Write::write_fmt::h8d147888220078ef
                               at src/libstd/io/mod.rs:1412
   6:     0x5623bef797de - std::sys_common::backtrace::_print::h8a6df0fa81d6af62
                               at src/libstd/sys_common/backtrace.rs:65
   7:     0x5623bef797de - std::sys_common::backtrace::print::h6f05b4733407e509
                               at src/libstd/sys_common/backtrace.rs:50
   8:     0x5623bef797de - std::panicking::default_hook::{{closure}}::h0d0a23bd02315dd8
                               at src/libstd/panicking.rs:188
   9:     0x5623bef794d1 - std::panicking::default_hook::h8d15a9aecb4efac6
                               at src/libstd/panicking.rs:205
  10:     0x5623bef79edb - std::panicking::rust_panic_with_hook::hbe174577402a475d
                               at src/libstd/panicking.rs:464
  11:     0x5623be968a55 - std::panicking::begin_panic::h2c0a5c2848c23500
                               at /rustc/73528e339aae0f17a15ffa49a8ac608f50c6cf14/src/libstd/panicking.rs:400
  12:     0x5623be9690f7 - gtk::rt::init::h2cf0eb615f76c7fe
                               at /home/quinn/.cargo/registry/src/github.com-1ecc6299db9ec823/gtk-0.4.1/src/rt.rs:0
  13:     0x5623be96820b - msgbox::linux::create::h9a6afe14887f1ee1
                               at /home/quinn/.cargo/registry/src/github.com-1ecc6299db9ec823/msgbox-0.4.0/src/linux.rs:8
  14:     0x5623be8b4539 - <core::option::Option<T> as neovide::error_handling::OptionPanicExplanation<T>>::unwrap_or_explained_panic::hc4fb2156a902c808
                               at src/error_handling.rs:28
  15:     0x5623be8eb761 - neovide::renderer::caching_shaper::CachingShaper::get_font_pair::hf326ad3b3c69b2f2
                               at src/renderer/caching_shaper.rs:92
  16:     0x5623be8ec5af - neovide::renderer::caching_shaper::CachingShaper::font_base_dimensions::hc7641d10485269d5
                               at src/renderer/caching_shaper.rs:174
  17:     0x5623be900948 - neovide::renderer::Renderer::new::h57f68f749c521d19
                               at src/renderer/mod.rs:32
  18:     0x5623be900948 - neovide::window::ui_loop::h4547e1e94563b4bf
                               at src/window.rs:32
  19:     0x5623be8e1c33 - std::rt::lang_start::{{closure}}::h66753dada51e6faa
                               at /rustc/73528e339aae0f17a15ffa49a8ac608f50c6cf14/src/libstd/rt.rs:61
  20:     0x5623bef79903 - std::rt::lang_start_internal::{{closure}}::h6ea535ec5c50fc3e
                               at src/libstd/rt.rs:48
  21:     0x5623bef79903 - std::panicking::try::do_call::h631c6408dfccc6f5
                               at src/libstd/panicking.rs:287
  22:     0x5623bef8207a - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:78
  23:     0x5623bef7a47d - std::panicking::try::hab539b2d1255d635
                               at src/libstd/panicking.rs:265
  24:     0x5623bef7a47d - std::panic::catch_unwind::hd5e0a26424bd7f34
                               at src/libstd/panic.rs:396
  25:     0x5623bef7a47d - std::rt::lang_start_internal::h3bdc4c7d98181bf9
                               at src/libstd/rt.rs:47
  26:     0x5623be8b4ab8 - main
  27:     0x7f5de901ab6b - __libc_start_main
  28:     0x5623be898e8a - _start
  29:                0x0 - <unknown>

@Kethku
Copy link
Member

Kethku commented Jan 27, 2020

Ah yup thats not very good is it... This msgbox library seems to be becoming less useful that I thought. Let me look into some alternatives.

@Kethku
Copy link
Member

Kethku commented Jan 27, 2020

Do you have guifont set in your nvim init?

@Kethku
Copy link
Member

Kethku commented Jan 27, 2020

I just pushed a change which should provide more useful panic messages on linux.

@QuinnFreedman
Copy link
Author

I do have a font set with Guifont Knack Nerd Font Mono:h12 in my ginit.vim. I tried removing it and switching to a different font and I still get the same problem. The error message now is:

Bridge created.
thread 'tokio-runtime-worker' panicked at 'Could not parse event: Could not parse event from neovim: invalid u64 format -1', src/error_handling.rs:5:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
thread 'main' panicked at 'Could not load configured font: Could not load Monospace. This font was either the font configured in init scripts via guifont, or the default font is not available on your machine. Defaults are defined here: https://github.com/Kethku/neovide/blob/master/src/renderer/caching_shaper.rs', src/error_handling.rs:5:9

@Kethku
Copy link
Member

Kethku commented Jan 27, 2020

Ok. I rewrote the font loading. Could you try again? I think it may be fixed.

@Kethku Kethku added the bug Something isn't working label Jan 27, 2020
@QuinnFreedman
Copy link
Author

QuinnFreedman commented Jan 27, 2020

It works! I did get an error saying I had to enable DRI3 in my X11 GPU settings, but now it seems to work. Thanks for working to resolve this.

Now I am able to open a window but I get a new error pretty frequently:

thread 'main' panicked at 'index out of bounds: the len is 50 but the index is 62', /rustc/73528e339aae0f17a15ffa49a8ac608f50c6cf14/src/libcore/slice/mod.rs:2796:10

I also get a long scroll of Draw command out of bounds warnings

@Kethku
Copy link
Member

Kethku commented Jan 27, 2020

Thats VERY strange. I'm not sure why it would be rendering out of window bounds. Can you hit me with a screen cap?

@Kethku
Copy link
Member

Kethku commented Jan 27, 2020

Further setting RUST_BACKTRACE would be super useful so I can pinpoint where exactly the out of bounds error is happening (although I have a hunch)

@QuinnFreedman
Copy link
Author

It seems like it happens when hjkl-ing past the edge of the buffer where they should just do nothing.

screencap

@Kethku
Copy link
Member

Kethku commented Jan 27, 2020

That's very interesting. Looks like you are using a window manager which is confusing winit (the window library). The error you are getting only happens when the window doesn't properly update neovim about the size of itself. Which is a very strange error. Can you give some details about your window manager and or try in a more standard window mode (I don't know if that's possible...). This feels a lot like an upstream issue...

Sent with GitHawk

@Kethku
Copy link
Member

Kethku commented Jan 27, 2020

There also seem to be some brutal perf shenanigans going on. Either that or the animating flag isn't getting set properly (this seems more likely)

Sent with GitHawk

@QuinnFreedman
Copy link
Author

I'm using i3. Pretty vanilla except some theming and some settings to deal with high DPI. I wouldn't be surprised if it's causing problems. Just about every app that isn't a terminal or web browser has visual bugs. I've never seen it cause a crash though. The animation choppiness was also there in reality about like in the recording. I can try on a different computer with some different window managers tomorrow.

@Kethku
Copy link
Member

Kethku commented Jan 27, 2020

Sounds great. My current theory is dpi handling is wonky. Would you mind sharing your PC specs? I'm trying to zero in on what the performance problem is. I have a hunch that the animation isn't slow but is failing to finish the animation before going idle to save power

Sent with GitHawk

@QuinnFreedman
Copy link
Author

Yes, the out of bounds error doesn't happen in Gnome (a more standard desktop environment). But, when I try to j/k too far out of bounds it sometimes animates the cursor to the bottom-right of the window.

My laptop is a Huawei Matebook Pro. Relatively new Intel i7 w/ integrated graphics. I still get the animation issues when switching to Nvidia MX150. I think you're right that it's just stopping/starting the animation incorrectly. When moving up/down lines the cursor often gets stuck half way or is a little too tall when it gets to the next line and doesn't reset till you move it again.

Also one more bug: Clicking anywhere in the window (at least in Gnome) panics with this error:

thread 'tokio-runtime-worker' panicked at 'Could not parse event: Could not parse event from neovim: invalid u64 format -1', src/error_handling.rs:5:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
Xlib:  extension "NV-GLX" missing on display ":0".
thread 'tokio-runtime-worker' panicked at 'Could not parse event: Could not parse event from neovim: invalid u64 format -1', src/error_handling.rs:5:9
thread 'tokio-runtime-worker' panicked at 'Mouse Input Failed: NeovimError(Some(0), "Invalid method: nvim_input_mouse")', src/libcore/result.rs:1165:5
thread 'main' panicked at 'Could Not Send UI Command: Could not send UI command from the window system to the neovim process.: channel closed', src/error_handling.rs:5:9

@Kethku
Copy link
Member

Kethku commented Jan 27, 2020

Ok I rewrote the animation loop so I think it should be more stable. Could you make another issue with the mouse click error? That one seems super weird because I don't know how nvim_input_mouse could be an invalid method...

@QuinnFreedman
Copy link
Author

thanks. will do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants