yofi icon indicating copy to clipboard operation
yofi copied to clipboard

Crash on launch "Initial roundtrip failed!: NoWaylandLib"

Open PAI5REECHO opened this issue 2 years ago • 4 comments

stack backtrace:
   0:     0x56133e43fdbb - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h04e1659590c75b7f
   1:     0x56133e2dcbfc - core::fmt::write::h934b5967ac569ed6
   2:     0x56133e42e784 - std::io::Write::write_fmt::h5ab422a8ac80f319
   3:     0x56133e4356f0 - std::panicking::default_hook::{{closure}}::h494c7f9d4414967f
   4:     0x56133e436022 - std::panicking::rust_panic_with_hook::h003457efeb6d6b49
   5:     0x56133e440158 - std::panicking::begin_panic_handler::{{closure}}::h251c8136df2fab02
   6:     0x56133e4400d6 - std::sys_common::backtrace::__rust_end_short_backtrace::h27a470ecec345006
   7:     0x56133e435a22 - rust_begin_unwind
   8:     0x56133e2510a0 - core::panicking::panic_fmt::h4fce74342b1c33c5
   9:     0x56133e251212 - core::result::unwrap_failed::h8c4993f73e62bc49
  10:     0x56133e535011 - yofi::main::hcd1b7123951e1917
  11:     0x56133e562b73 - std::sys_common::backtrace::__rust_begin_short_backtrace::h9a2b35493f4ade7f
  12:     0x56133e530a60 - main
  13:     0x7f379f4561d7 - __libc_start_call_main
  14:     0x7f379f456297 - __libc_start_main_impl
  15:     0x56133e263a01 - _start
  16:                0x0 - <unknown>```

PAI5REECHO avatar Apr 12 '22 17:04 PAI5REECHO

Are you using a wayland compositor (wlroots-based to be precised)? What's the output of ldconfig -p | grep wayland?

l4l avatar Apr 13 '22 18:04 l4l

I'm using SwayWM. There's no ldconfig cache on NixOS (https://github.com/NixOS/nixpkgs/issues/35387) so that command doesn't work:

$ ldconfig -p | grep wayland
ldconfig: Can't open cache file /nix/store/q29bwjibv9gi9n86203s38n0577w09sx-glibc-2.33-117/etc/ld.so.cache
: No such file or directory

PAI5REECHO avatar Apr 13 '22 20:04 PAI5REECHO

According to this the problem is with connection to the $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY. Maybe some permission missing? You may find the issue with strace -e openat `which yofi` 2>&1 | grep $XDG_RUNTIME_DIR .

l4l avatar Apr 13 '22 21:04 l4l

Ah, not really. The problem is actually that the app cannot find libwayland-client.so library.

l4l avatar Apr 13 '22 21:04 l4l

I consider this one as unrelated to yofi directly so closing this. Feel free to add some details and reopen

l4l avatar Oct 12 '22 07:10 l4l

Im having the same issue. Void Linux - Sway WM. The issue is with line 159-161 in Master: let (env, display, queue) = sctk::new_default_environment!(Env, desktop, fields = [layer_shell: SimpleGlobal::new()]) .expect("Initial roundtrip failed!"); It seems the issue is only in 0.16 of sctk. I tried an example of the master branch with cargo run --example image_viewer and it worked. Seems to be a bit of a rewrite to go from 0.16 to master though, so I don't know if you'll want to do that yet. Would be happy to use yofi!

mountainfloating avatar Oct 24 '22 06:10 mountainfloating

That seems strange for me, could you also try to launch yofi with dlopen?:

diff --git a/Cargo.toml b/Cargo.toml
index 7227979..b84d31d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -17,7 +17,7 @@ fontconfig = { version = "0.5.0", features = ["dlopen"] }
 
 anyhow = "1.0.51"
 wayland-protocols = { version = "0.29.5", default-features = false, features = ["unstable_protocols", "client"] }
-sctk = { version = "0.16.0", package = "smithay-client-toolkit", features = ["calloop"] }
+sctk = { version = "0.16.0", package = "smithay-client-toolkit", features = ["calloop", "dlopen"] }
 raqote = { version = "0.8.1", default-features = false }
 xdg = "2.4.0"
 fep = { version = "1.3.0", package = "freedesktop_entry_parser" }

SCTK's master is being significantly rewritten indeed. And I could upgrade only once it released.

l4l avatar Oct 24 '22 10:10 l4l

Sorry that doesn't seem to change anything. I have the same error with kickoff, so i think its just somehow SCTK

mountainfloating avatar Nov 02 '22 07:11 mountainfloating