inlyne: Crash when trying to open a file

When trying to open a basic markdown file I’m getting the following error:

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /build/inlyne-0.3.1-vendor.tar.gz/wgpu-hal/src/gles/egl.rs:751:73

Full stacktrace:

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /build/inlyne-0.3.1-vendor.tar.gz/wgpu-hal/src/gles/egl.rs:751:73
stack backtrace:
   0:     0x555d4922a8b0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hf014552b94f53b0b
   1:     0x555d49255c9f - core::fmt::write::hd931ce1f65786f99
   2:     0x555d49222e87 - std::io::Write::write_fmt::h6a6fd63a04e82ec7
   3:     0x555d4922a6b5 - std::sys_common::backtrace::print::h1e42468794e7b82c
   4:     0x555d4920f111 - std::panicking::default_hook::{{closure}}::hbe45423b43205803
   5:     0x555d4920edaf - std::panicking::default_hook::h84640917dec96f40
   6:     0x555d4920f5b9 - std::panicking::rust_panic_with_hook::h3f828bf7de94854a
   7:     0x555d4922ab51 - std::panicking::begin_panic_handler::{{closure}}::h1494d1b7b833ecd5
   8:     0x555d4922a986 - std::sys_common::backtrace::__rust_end_short_backtrace::hfb56cb4321fb1fc8
   9:     0x555d4920f2e2 - rust_begin_unwind
  10:     0x555d484a2cb3 - core::panicking::panic_fmt::h69ad0a157a771ebb
  11:     0x555d484a2d43 - core::panicking::panic::h49ef28648bcd6145
  12:     0x555d4912d8dd - <wgpu_hal::gles::egl::Instance as wgpu_hal::Instance<wgpu_hal::gles::Api>>::init::ha76d23d357289a11
  13:     0x555d490b2836 - wgpu_core::instance::Instance::new::hef8a7e54de18c5e1
  14:     0x555d4905abc8 - <wgpu::backend::direct::Context as wgpu::context::Context>::init::h886b1226b98ec796
  15:     0x555d48f8f076 - wgpu::Instance::new::h21dab5fc8d49be2f
  16:     0x555d48530c2a - pollster::block_on::hcb855b888d4890ea
  17:     0x555d4859b311 - inlyne::main::hb782d86bb8f8afd6
  18:     0x555d484c8633 - std::sys_common::backtrace::__rust_begin_short_backtrace::h5541b693798d8478
  19:     0x555d484c8a1d - std::rt::lang_start::{{closure}}::h1ab27ab68fbbc8d4
  20:     0x555d49203c27 - std::rt::lang_start_internal::hbcbc84fca12d560d
  21:     0x555d4859cd45 - main
  22:     0x7fcb0a55dace - __libc_start_call_main
  23:     0x7fcb0a55db89 - __libc_start_main@@GLIBC_2.34
  24:     0x555d484a3345 - _start

I’m using NixOS unstable and installed inlyne using nix-shell. Could I be missing dependencies that aren’t included in the nix build?

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Comments: 17 (8 by maintainers)

Commits related to this issue

Most upvoted comments

@figsoda Got a little delayed, but just pushed out a release for v0.3.2 🎉

Sure! I can backport the change and cut a release for it over the next few days

I’ll ping again after all that’s been sorted 😃

Ahhhh, no I’m just a humble inlyne maintainer. I’ve been meaning to switch to NixOS, but I’m still using Arch at the moment

The definition was created by @figsoda who looks to still be the maintainer

Oh, alright! I assumed you were the one maintaining it, but I will open a PR for it then, thank you very much.

Update!

I figured out how to get past the Failed to find an appropriate adapter error. The solution is to add the following to the nix build:

preFixup = lib.optionalString stdenv.isLinux ''
    patchelf \
        --add-needed "${pkgs.libGL}/lib/libEGL.so.1" \
        --add-needed "${pkgs.vulkan-loader}/lib/libvulkan.so.1" \
        $out/bin/inlyne
'';

This resolved that issue, but lead to another:

thread 'main' panicked at /home/alphakeks/.cargo/git/checkouts/cosmic-text-dc629381e389cc34/e1e9fb5/src/shape.rs:130:33:
no default font found

Searching through cosmic-text issues though I found this, so adding fontdb = { version = "0.13.1", features = ["fontconfig"] } to the Cargo.toml and compiling again with that finally made inlyne open!

From what I can tell those two things should fix the issue. If you want I can open a PR for it, but since you said you wanted to update dependencies anyway, I can leave it to you as well if you would prefer that.

Hmmm, very interesting 🤔

Currently inlyne is still using older versions of wgpu and winit. I’ll work on updating things and we’ll see what kind of error happens then. It’ll likely be at least a week before I have time to work on that though

Not very helpful either unfortunately.

[2023-11-01T22:57:04Z INFO  xkbcommon_dl] Failed loading `libxkbcommon.so.0`. Error: CantOpen(DlOpen { desc: "libxkbcommon.so.0: cannot open shared object file: No such file or directory" })
[2023-11-01T22:57:04Z INFO  xkbcommon_dl] Failed loading `libxkbcommon.so`. Error: CantOpen(DlOpen { desc: "libxkbcommon.so: cannot open shared object file: No such file or directory" })
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: XKBNotFound', /home/alphakeks/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.3/src/platform_impl/linux/x11/mod.rs:302:85

I tried both with and without libxkbcommon, but nothing changes. I also tried compiling inlyne myself and running it and I get a different error!

Error: Failed to find an appropriate adapter

The error comes from here.

It’s still a WGPU error so that might be related?