lapce: [Linux] Failing to start with "thread 'main' panicked"

OS: Arch Linux

Rust version:

$ rustc -V
rustc 1.57.0 (f1edd0429 2021-11-29)

Toolchain:

$ rustup toolchain list
stable-x86_64-unknown-linux-gnu (default)

Commit:

5059101 - (HEAD -> master, tag: v0.0.1, origin/master, origin/HEAD) undo redo jump improvement (2021-12-01 11:43:38) <Dongdong Zhou>

Output:

$ RUST_BACKTRACE=1 target/release/lapce
start to watch path "/home/<name>/.config/lapce/settings.toml"
2021-12-14T11:12:57.482224Z DEBUG druid::localization: available locales [], current en-US
2021-12-14T11:12:57.482276Z DEBUG druid::localization: resolved: [en-US]
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: NotSupported', /home/<name>/.cargo/git/checkouts/druid-f6980810fb848923/c42de0b/druid/src/window.rs:88:55
stack backtrace:
   0: rust_begin_unwind
             at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:517:5
   1: core::panicking::panic_fmt
             at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/panicking.rs:100:14
   2: core::result::unwrap_failed
             at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/result.rs:1616:5
   3: druid::window::Window<T>::new
   4: druid::win_handler::AppState<T>::build_native_window
   5: druid::app::AppLauncher<T>::launch
   6: lapce_core::app::lanuch
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
palette update process stopped
buffer update process stopped

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 5
  • Comments: 21 (1 by maintainers)

Most upvoted comments

I get the same error with latest git version (24e9a3c).

There is another issue

git show --summary
commit 718e84416e6d3151fe60d6ab198b2e9793300188 (HEAD -> master, origin/master, origin/HEAD)
Author: Dongdong Zhou <dz@yay.com>
Date:   Wed Dec 15 10:31:45 2021 +0000

    bump version
./target/release/lapce
start to watch path "/home/user/.config/lapce/settings.toml"
2021-12-15T10:37:28.616762Z DEBUG druid::localization: available locales [], current en-US
2021-12-15T10:37:28.616779Z DEBUG druid::localization: resolved: [en-US]
primitives buffer size 80000
thread 'main' panicked at 'Error in Surface::configure: requested format Bgra8Unorm is not in list of supported formats: [Rgba8UnormSrgb, Bgra8UnormSrgb]', /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.11.0/src/backend/direct.rs:204:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
buffer update process stopped
palette update process stopped

Can you try again with a61d3b2966f4634ebad6b639692cffd0536d99c0?

I have the same error: Version:

git log
commit 93737031e7ce6dfafefd60df3503c039c2df90eb (HEAD -> master, tag: v0.0.2, origin/master, origin/HEAD)
Author: Dongdong Zhou <dz@yay.com>
Date:   Tue Dec 14 13:39:01 2021 +0000

....
/target/release/lapce
start to watch path "/home/user/.config/lapce/settings.toml"
2021-12-14T20:19:28.853795Z DEBUG druid::localization: available locales [], current en-US
2021-12-14T20:19:28.853813Z DEBUG druid::localization: resolved: [en-US]
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: NotSupported', /home/user/.cargo/git/checkouts/druid-f6980810fb848923/48c4703/druid/src/window.rs:91:55
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
buffer update process stopped
palette update process stopped

Below works for me @ Linux Mint 20.2:

sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev
git clone git@github.com:lapce/lapce.git
cd lapce
cargo build --release

P. S. After that the long way to understand how to use it further… 😉

@dzhou121

git show --summary
commit a61d3b2966f4634ebad6b639692cffd0536d99c0 (HEAD -> master, origin/master, origin/HEAD)
Author: Dongdong Zhou <dz@yay.com>
Date:   Wed Dec 15 13:45:42 2021 +0000

    Updte piet-wgpu

Yep right now it is ok for me.

Got the same issue (also same err log) with the latest git version and both stable/nightly toolchain arch linux / x11

RUST_BACKTRACE=full ./target/debug/lapce
start to watch path "/home/pedro/.config/lapce/settings.toml"
2021-12-14T20:29:50.710136Z DEBUG druid::localization: available locales [], current en-US
2021-12-14T20:29:50.710757Z DEBUG druid::localization: resolved: [en-US]
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: NotSupported', /home/pedro/.cargo/git/checkouts/druid-f6980810fb848923/48c4703/druid/src/window.rs:91:55
stack backtrace:
   0:     0x55c9ec2491ac - std::backtrace_rs::backtrace::libunwind::trace::hf6a6dfd7da937cb0
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x55c9ec2491ac - std::backtrace_rs::backtrace::trace_unsynchronized::hc596a19e4891f7f3
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x55c9ec2491ac - std::sys_common::backtrace::_print_fmt::hb16700db31584325
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x55c9ec2491ac - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h231c4190cfa75162
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x55c9ec270cac - core::fmt::write::h2a1462b5f8eea807
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/fmt/mod.rs:1163:17
   5:     0x55c9ec244505 - std::io::Write::write_fmt::h71ddfebc68685972
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/io/mod.rs:1696:15
   6:     0x55c9ec24b1f0 - std::sys_common::backtrace::_print::hcc197d4bebf2b369
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x55c9ec24b1f0 - std::sys_common::backtrace::print::h335a66af06738c7c
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x55c9ec24b1f0 - std::panicking::default_hook::{{closure}}::h6fac9ac9c8b79e52
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:210:50
   9:     0x55c9ec24ada5 - std::panicking::default_hook::h341c1030c6a1161b
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:227:9
  10:     0x55c9ec24b8a4 - std::panicking::rust_panic_with_hook::h50680ff4b44510c6
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:624:17
  11:     0x55c9ec24b380 - std::panicking::begin_panic_handler::{{closure}}::h9371c0fbb1e8465a
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:521:13
  12:     0x55c9ec249654 - std::sys_common::backtrace::__rust_end_short_backtrace::h9b3efa22a5768c0f
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:139:18
  13:     0x55c9ec24b2e9 - rust_begin_unwind
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:517:5
  14:     0x55c9e9f266b1 - core::panicking::panic_fmt::h23b9203e89cc61cf
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/panicking.rs:100:14
  15:     0x55c9e9f267a3 - core::result::unwrap_failed::h32ef6b3156e8fc57
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/result.rs:1616:5
  16:     0x55c9ea117943 - core::result::Result<T,E>::unwrap::h2d4869eeeb78e6ac
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/result.rs:1298:23
  17:     0x55c9ea4bb2db - druid::window::Window<T>::new::ha97e250a69078465
                               at /home/pedro/.cargo/git/checkouts/druid-f6980810fb848923/48c4703/druid/src/window.rs:91:28
  18:     0x55c9ea077bb4 - druid::win_handler::Windows<T>::connect::h45d1f4808912b087
                               at /home/pedro/.cargo/git/checkouts/druid-f6980810fb848923/48c4703/druid/src/win_handler.rs:118:23
  19:     0x55c9ea080a60 - druid::win_handler::InnerAppState<T>::connect::h58283946bdc4d431
                               at /home/pedro/.cargo/git/checkouts/druid-f6980810fb848923/48c4703/druid/src/win_handler.rs:248:9
  20:     0x55c9ea07ade0 - druid::win_handler::AppState<T>::connect_window::hd3d9126bd601e7b8
                               at /home/pedro/.cargo/git/checkouts/druid-f6980810fb848923/48c4703/druid/src/win_handler.rs:563:9
  21:     0x55c9ea080ddf - <druid::win_handler::DruidHandler<T> as druid_shell::window::WinHandler>::connect::h90def296029cb1e8
                               at /home/pedro/.cargo/git/checkouts/druid-f6980810fb848923/48c4703/druid/src/win_handler.rs:1015:9
  22:     0x55c9ea07c9b8 - druid::win_handler::AppState<T>::build_native_window::h50fb2a1321bbf9eb
                               at /home/pedro/.cargo/git/checkouts/druid-f6980810fb848923/48c4703/druid/src/win_handler.rs:995:17
  23:     0x55c9e9f3308f - druid::app::WindowDesc<T>::build_native::hf704820a0f1a458c
                               at /home/pedro/.cargo/git/checkouts/druid-f6980810fb848923/48c4703/druid/src/app.rs:844:9
  24:     0x55c9e9f34100 - druid::app::AppLauncher<T>::launch::h2222a9dd04f8f5ca
                               at /home/pedro/.cargo/git/checkouts/druid-f6980810fb848923/48c4703/druid/src/app.rs:277:26
  25:     0x55c9e9f286cc - lapce_core::app::lanuch::hd68552fcf9c0215c
                               at /home/pedro/lapce/core/src/app.rs:32:5
  26:     0x55c9e9f26f87 - lapce::main::h9f32b73caf8ecffe
                               at /home/pedro/lapce/core/src/bin/lapce.rs:4:5
  27:     0x55c9e9f2712b - core::ops::function::FnOnce::call_once::hd70e52e7e2566e6f
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/ops/function.rs:227:5
  28:     0x55c9e9f2707e - std::sys_common::backtrace::__rust_begin_short_backtrace::hf71b93b20789e905
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:123:18
  29:     0x55c9e9f27051 - std::rt::lang_start::{{closure}}::hf8d3672bf1c38b35
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/rt.rs:146:18
  30:     0x55c9ec248e8b - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hc56adab7a77ec6e3
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/ops/function.rs:259:13
  31:     0x55c9ec248e8b - std::panicking::try::do_call::h29f013120c5abc65
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:403:40
  32:     0x55c9ec248e8b - std::panicking::try::h86d5b2b66caec4cf
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:367:19
  33:     0x55c9ec248e8b - std::panic::catch_unwind::h7dd136d787f51397
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panic.rs:133:14
  34:     0x55c9ec248e8b - std::rt::lang_start_internal::{{closure}}::h4a199351e630a8a5
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/rt.rs:128:48
  35:     0x55c9ec248e8b - std::panicking::try::do_call::h20ceb9e5dff838c6
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:403:40
  36:     0x55c9ec248e8b - std::panicking::try::hc2abb46a5e41bd43
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:367:19
  37:     0x55c9ec248e8b - std::panic::catch_unwind::h52c3eb4408ad6dfb
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panic.rs:133:14
  38:     0x55c9ec248e8b - std::rt::lang_start_internal::hd15a47be08101c28
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/rt.rs:128:20
  39:     0x55c9e9f27020 - std::rt::lang_start::head728fdd45cfe3c
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/rt.rs:145:17
  40:     0x55c9e9f26fac - main
  41:     0x7fea55d06b25 - __libc_start_main
  42:     0x55c9e9f26eae - _start
  43:                0x0 - <unknown>
palette update process stopped

@channelbeta Can you post instructions to build on Linux?

It runs now, but it doesn’t render anything. I just see an empty window on my Linux system.