rio icon indicating copy to clipboard operation
rio copied to clipboard

Crashes on nix on Fedora

Open JonnyCodewalker opened this issue 1 year ago • 7 comments

When installing via nix on Fedora it crashes (seemingly trying to create a webgpu instance).

rioterm 0.0.39 Fedora 40 (Wayland)

Backtrace:

╰─>  RUST_BACKTRACE=1 rio
thread 'main' panicked at /build/rio-0.0.39-vendor.tar.gz/wgpu-hal/src/gles/egl.rs:798:88:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic
   3: core::option::unwrap_failed
   4: <wgpu_hal::gles::egl::Instance as wgpu_hal::Instance<wgpu_hal::gles::Api>>::init
   5: wgpu_core::instance::Instance::new
   6: wgpu::Instance::new
   7: rio::screen::Screen::new::{{closure}}
   8: rio::sequencer::Sequencer::run::{{closure}}
   9: rio::main::{{closure}}
  10: rio::main

Could possibly be an issue with how it is packaged for nix, or maybe with how nix single user interacts with Fedora 40, not sure.

JonnyCodewalker avatar Jun 12 '24 15:06 JonnyCodewalker

Reproduced, also fedora 40 and nix

RUST_BACKTRACE=full rio
thread 'main' panicked at /build/rio-0.0.39-vendor.tar.gz/wgpu-hal/src/gles/egl.rs:798:88:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0:     0x55977af9146d - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h4886110ae7835fd2
   1:     0x55977ac11500 - core::fmt::write::h6fab83f0f5bc0c8f
   2:     0x55977afaaebe - std::io::Write::write_fmt::h64824cb874054607
   3:     0x55977af911f4 - std::sys_common::backtrace::print::hb8fea9d041077138
   4:     0x55977af91c90 - std::panicking::default_hook::{{closure}}::hc60f0f690c67943c
   5:     0x55977af919a7 - std::panicking::default_hook::h56281bcc5d6e2f17
   6:     0x55977af921be - std::panicking::rust_panic_with_hook::hd61e30fe5971d187
   7:     0x55977af9207e - std::panicking::begin_panic_handler::{{closure}}::h95d2684e28f89fd2
   8:     0x55977af916a6 - std::sys_common::backtrace::__rust_end_short_backtrace::h48780d898316fff8
   9:     0x55977af91e14 - rust_begin_unwind
  10:     0x55977ab336c5 - core::panicking::panic_fmt::hdb89b5c14a056cec
  11:     0x55977ab33783 - core::panicking::panic::h0e6608ccd7056721
  12:     0x55977ab33ca6 - core::option::unwrap_failed::h42b5e841a9c29a32
  13:     0x55977b21996c - <wgpu_hal::gles::egl::Instance as wgpu_hal::Instance<wgpu_hal::gles::Api>>::init::hbacaaf04c242eca8
  14:     0x55977b1d7f1e - wgpu_core::instance::Instance::new::h97618806d00fab67
  15:     0x55977b1b74d6 - wgpu::Instance::new::h2043a6f7030eafde
  16:     0x55977ae80f14 - rio::screen::Screen::new::{{closure}}::h77d44e0fa8852dad
  17:     0x55977ae9b44c - rio::sequencer::Sequencer::run::{{closure}}::ha1edee8d92a14dcf
  18:     0x55977aea7a33 - rio::main::{{closure}}::h1788bc174f59221f
  19:     0x55977aea673e - rio::main::hbb58e3fac36944a4
  20:     0x55977adef793 - std::sys_common::backtrace::__rust_begin_short_backtrace::hb39e20813a51a1fa
Aborted (core dumped)

libglvnd missing from runtimeDependencies?
ref https://github.com/NixOS/nixpkgs/blob/24.05/pkgs/applications/terminal-emulators/rio/default.nix

Underknowledge avatar Jul 01 '24 19:07 Underknowledge

Hey there, sorry about delay on it. Is this still reproduceable? looks like gles is having trouble setting up the instance configuration.

raphamorim avatar Aug 26 '24 16:08 raphamorim

Yes, but I'm not sure if this is Rio's fault. I encountered a similar issue when setting up Kitty.

Packages in nixpkgs are configured to use graphics drivers from /run/opengl-driver. NixOS sets this up by default, but on non-NixOS systems, you'll need to... configure it manually?

there's a hacky tool that uses various dirty tricks to figure out which userspace gpu driver to use https://github.com/nix-community/nixGL

I'm not sure if this is a Fedora or a Nix Problem. e.g. does it work on Ubuntu/Debian with Nix?

Underknowledge avatar Aug 26 '24 17:08 Underknowledge

Good question, @TornaxO7 probably have more context on it. But as far I know people have been using Rio with Nix (mostly Arch that I know). Feel free to join our discord to talk about it as well https://discord.gg/zRvJjmKGwS

raphamorim avatar Aug 26 '24 17:08 raphamorim

as a interesing sidenote: this "works" LD_LIBRARY_PATH=/usr/lib64 /nix/store/rgvx9v2llvziqwsbck04w7zhr6ak8dn6-rio-0.1.7/bin/rio

Underknowledge avatar Aug 26 '24 17:08 Underknowledge

On 26/08/2024 18.56, Raphael Amorim wrote:

Hey there, sorry about delay on it. Is this still reproduceable? looks like gles is having trouble setting up the instance configuration.

The issue is still reproducible on 0.1.8

On 26/08/2024 19.40, Underknowledge wrote:

as a interesing sidenote: this "works" LD_LIBRARY_PATH=/usr/lib64 /nix/store/rgvx9v2llvziqwsbck04w7zhr6ak8dn6-rio-0.1.7/bin/rio That does prevent the crash for me.

JonnyCodewalker avatar Aug 28 '24 16:08 JonnyCodewalker

i'm getting the same issue on with rio 1.1.10 on Ubuntu 24.04

andrewbanchich avatar Sep 28 '24 02:09 andrewbanchich