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

Launching editor fails with nix shell on arch linux #715

Open
NandorKovacs opened this issue Jan 2, 2025 · 4 comments
Open

Launching editor fails with nix shell on arch linux #715

NandorKovacs opened this issue Jan 2, 2025 · 4 comments

Comments

@NandorKovacs
Copy link

This is probably an error on my end.

I got the editor working, however not using the provided shell.nix. I was happy i didn't have to search what the package names on arch are, and just tried using the provided nix shell.

However, when using the provided shell.nix, launching the editor with RUST_BACKTRACE=full cargo run --package fyroxed results in the following stack trace:

thread 'main' panicked at editor-standalone/src/main.rs:56:52:
called `Result::unwrap()` on an `Err` value: NotSupported(NotSupportedError)
stack backtrace:
   0:     0x621029c36dea - std::backtrace_rs::backtrace::libunwind::trace::h5a5b8284f2d0c266
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
   1:     0x621029c36dea - std::backtrace_rs::backtrace::trace_unsynchronized::h76d4f1c9b0b875e3
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x621029c36dea - std::sys::backtrace::_print_fmt::hc4546b8364a537c6
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/sys/backtrace.rs:66:9
   3:     0x621029c36dea - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h5b6bd5631a6d1f6b
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/sys/backtrace.rs:39:26
   4:     0x621029c64243 - core::fmt::rt::Argument::fmt::h270f6602a2b96f62
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/fmt/rt.rs:177:76
   5:     0x621029c64243 - core::fmt::write::h7550c97b06c86515
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/fmt/mod.rs:1186:21
   6:     0x621029c32793 - std::io::Write::write_fmt::h7b09c64fe0be9c84
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/io/mod.rs:1839:15
   7:     0x621029c36c32 - std::sys::backtrace::BacktraceLock::print::h2395ccd2c84ba3aa
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/sys/backtrace.rs:42:9
   8:     0x621029c3853c - std::panicking::default_hook::{{closure}}::he19d4c7230e07961
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:268:22
   9:     0x621029c38382 - std::panicking::default_hook::hf614597d3c67bbdb
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:295:9
  10:     0x621029c38b17 - std::panicking::rust_panic_with_hook::h8942133a8b252070
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:801:13
  11:     0x621029c389aa - std::panicking::begin_panic_handler::{{closure}}::hb5f5963570096b29
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:674:13
  12:     0x621029c372c9 - std::sys::backtrace::__rust_end_short_backtrace::h6208cedc1922feda
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/sys/backtrace.rs:170:18
  13:     0x621029c3863c - rust_begin_unwind
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:665:5
  14:     0x621024c532d0 - core::panicking::panic_fmt::h0c3082644d1bf418
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/panicking.rs:74:14
  15:     0x621024c537b6 - core::result::unwrap_failed::hd20b4aa073bda1e2
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/result.rs:1700:5
  16:     0x621024c54f0e - core::result::Result<T,E>::unwrap::h2fb8e66bce6e1a2b
                               at /home/nandor/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:1104:23
  17:     0x621024c54f0e - fyroxed::main::h5e99ba6f2ce79564
                               at /home/nandor/prg/Fyrox/editor-standalone/src/main.rs:56:35
  18:     0x621024c5765b - core::ops::function::FnOnce::call_once::h44fc0be1efb9da59
                               at /home/nandor/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
  19:     0x621024c55dde - std::sys::backtrace::__rust_begin_short_backtrace::he7b44b19d2fd2a98
                               at /home/nandor/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs:154:18
  20:     0x621024c54881 - std::rt::lang_start::{{closure}}::h7f8665a0d7dd5643
                               at /home/nandor/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:195:18
  21:     0x621029c2a54e - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hfdb85f4ee94732d3
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/ops/function.rs:284:13
  22:     0x621029c2a54e - std::panicking::try::do_call::h6e577310f330cbef
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:557:40
  23:     0x621029c2a54e - std::panicking::try::ha588d438267d2645
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:520:19
  24:     0x621029c2a54e - std::panic::catch_unwind::h429fda1e025f26d9
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panic.rs:358:14
  25:     0x621029c2a54e - std::rt::lang_start_internal::{{closure}}::h7b731265e841c4bf
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/rt.rs:174:48
  26:     0x621029c2a54e - std::panicking::try::do_call::hc0f6a675b7ae5a36
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:557:40
  27:     0x621029c2a54e - std::panicking::try::h4c93b7ff0671f1ff
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:520:19
  28:     0x621029c2a54e - std::panic::catch_unwind::hcc1e154961d16ce6
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panic.rs:358:14
  29:     0x621029c2a54e - std::rt::lang_start_internal::h1c66660c99c8424c
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/rt.rs:174:20
  30:     0x621024c5485a - std::rt::lang_start::hdea4f6cc83843459
                               at /home/nandor/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:194:17
  31:     0x621024c55abe - main
  32:     0x738f94e2a1fc - __libc_start_call_main
  33:     0x738f94e2a2b9 - __libc_start_main_alias_2
  34:     0x621024c53db5 - _start
  35:                0x0 - <unknown>

I am unsure what i am doing wrong. I tested my nix setup, and packages do seem to work. I am however using arch linux, maybe it would work on NixOS?

@mrDIMAS
Copy link
Member

mrDIMAS commented Jan 2, 2025

This error usually comes from alsa, you need to setup it properly. I'm not a Linux user, so I can only google for solutions.

Edit: no, it is not.

@mrDIMAS
Copy link
Member

mrDIMAS commented Jan 2, 2025

I looked at the code where this error comes from and it seems that I was wrong about alsa. It actually comes from X11 (which is used by default), so you might need to switch your OS to it and the engine should work fine.

@NandorKovacs
Copy link
Author

interesting, i use alsa as well as x11.

it has probably something to do with my nix configuration, as everything works without the nix shell.

thanks for the response though! if you prefer to, you can close the issue, i mostly opened it so that you know that something might be up with the provided shell.nix

@mrDIMAS
Copy link
Member

mrDIMAS commented Jan 2, 2025

Try using Wayland, it might fix the issue. I remember someone in Discord server mentioned that switching to Wayland helps.

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

2 participants