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

Panic with Wayland #4948

Open
catdevnull opened this issue Feb 3, 2024 · 10 comments
Open

Panic with Wayland #4948

catdevnull opened this issue Feb 3, 2024 · 10 comments
Labels
bug Something isn't working Wayland

Comments

@catdevnull
Copy link

What Operating System(s) are you seeing this problem on?

Linux Wayland

Which Wayland compositor or X11 Window manager(s) are you using?

KDE Plasma

WezTerm version

wezterm 20240203-152124-a4356069

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

WezTerm crashes on start, probably related to #4777

To Reproduce

No response

Configuration

local wezterm = require 'wezterm'
local config = {}
if wezterm.config_builder then
  config = wezterm.config_builder()
end

function get_appearance()
  if wezterm.gui then
    return wezterm.gui.get_appearance()
  end
  return 'Dark'
end

function theme_for_appearance(appearance)
  if appearance:find 'Dark' then
    return 'Molokai'
  else
    return 'Catppuccin Latte'
  end
end

config.color_scheme = theme_for_appearance(get_appearance())
-- config.window_decorations = "RESIZE"
config.hide_tab_bar_if_only_one_tab = true

font_name = 'Recursive Mono Linear Static'
config.font_size = 12
  config.font =
    wezterm.font(font_name)

config.front_end = "OpenGL"
config.notification_handling = "SuppressFromFocusedTab"

config.window_padding = { left = 4, right = 4, top = 4, bottom = 4 }
config.window_frame = {
  font = wezterm.font { family = "Recursive Sans Linear Static", weight = "Medium" },
  font_size = 11,

}

config.keys = {
  { key = 'T', mods = 'SHIFT|CTRL|ALT', action = wezterm.action.SpawnTab 'DefaultDomain' },
}

return config

Expected Behavior

WezTerm starts

Logs

❯ RUST_BACKTRACE=1 ./apps/gearlever_wezterm_7149df.appimage
20:47:20.040  ERROR  env_bootstrap > panic at /__w/wezterm/wezterm/vendor/smithay-client-toolkit-0.17.0/src/shell/xdg/frame/fallback_frame.rs:430:52 - !?
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: <unknown>
  15: <unknown>
  16: <unknown>
  17: <unknown>
  18: <unknown>
  19: __libc_start_call_main
  20: __libc_start_main_impl
  21: <unknown>

thread 'main' panicked at /__w/wezterm/wezterm/vendor/smithay-client-toolkit-0.17.0/src/shell/xdg/frame/fallback_frame.rs:430:52:
trying to resize hidden frame

Anything else?

No response

@catdevnull catdevnull added the bug Something isn't working label Feb 3, 2024
@Wielding
Copy link

Wielding commented Feb 4, 2024

I have the same issue on Sway 1.9-RC2. Here is a full BACKTRACE from a build off main just now.

18:59:36.888  ERROR  env_bootstrap > panic at /home/xxxxx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/smithay-client-toolkit-0.17.0/src/shell/xdg/frame/fallback_frame.rs:430:52 - !?
   0: env_bootstrap::register_panic_hook::{{closure}}
             at env-bootstrap/src/lib.rs:176:18
   1: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2021:9
      std::panicking::rust_panic_with_hook
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:783:13
   2: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:657:13
   3: std::sys_common::backtrace::__rust_end_short_backtrace
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:170:18
   4: rust_begin_unwind
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:645:5
   5: core::panicking::panic_fmt
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:72:14
   6: core::panicking::panic_display
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:178:5
      core::panicking::panic_str
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:152:5
      core::option::expect_failed
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/option.rs:1985:5
   7: core::option::Option<T>::expect
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/option.rs:894:21
   8: <smithay_client_toolkit::shell::xdg::frame::fallback_frame::FallbackFrame<State> as smithay_client_toolkit::shell::xdg::frame::DecorationsFrame>::resize
             at /home/xxxxx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/smithay-client-toolkit-0.17.0/src/shell/xdg/frame/fallback_frame.rs:430:26
   9: window::os::wayland::window::WaylandWindow::new_window::{{closure}}
             at window/src/os/wayland/window.rs:247:9
  10: window::os::x_and_wayland::Connection::new_window::{{closure}}
             at window/src/os/x_and_wayland.rs:89:18
  11: window::os::x_and_wayland::Window::new_window::{{closure}}
             at window/src/os/x_and_wayland.rs:201:14
  12: wezterm_gui::termwindow::TermWindow::new_window::{{closure}}
             at wezterm-gui/src/termwindow/mod.rs:818:10
  13: wezterm_gui::frontend::GuiFrontEnd::reconcile_workspace::{{closure}}
             at wezterm-gui/src/frontend.rs:421:73
  14: <async_task::runnable::Builder<M>::spawn_local::Checked<F> as core::future::future::Future>::poll
             at /home/xxxxx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/runnable.rs:455:26
  15: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/future/future.rs:125:9
  16: async_task::raw::RawTask<F,T,S,M>::run
             at /home/xxxxx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/raw.rs:557:17
  17: async_task::runnable::Runnable<M>::run
             at /home/xxxxx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/runnable.rs:781:18
  18: window::spawn::schedule_with_pri::{{closure}}
             at window/src/spawn.rs:40:13
  19: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
  20: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9
  21: window::spawn::SpawnQueue::run_impl
             at window/src/spawn.rs:169:13
  22: window::spawn::SpawnQueue::run
             at window/src/spawn.rs:63:9
  23: window::os::wayland::connection::WaylandConnection::run_message_loop_impl
             at window/src/os/wayland/connection.rs:74:30
  24: <window::os::wayland::connection::WaylandConnection as window::connection::ConnectionOps>::run_message_loop
             at window/src/os/wayland/connection.rs:167:19
  25: <window::os::x_and_wayland::Connection as window::connection::ConnectionOps>::run_message_loop
             at window/src/os/x_and_wayland.rs:150:33
  26: wezterm_gui::frontend::GuiFrontEnd::run_forever
             at wezterm-gui/src/frontend.rs:323:9
  27: wezterm_gui::run_terminal_gui
             at wezterm-gui/src/main.rs:771:5
  28: wezterm_gui::run
             at wezterm-gui/src/main.rs:1233:23
  29: wezterm_gui::main
             at wezterm-gui/src/main.rs:817:21
  30: core::ops::function::FnOnce::call_once
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
  31: std::sys_common::backtrace::__rust_begin_short_backtrace
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:154:18
  32: std::rt::lang_start::{{closure}}
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/rt.rs:167:18
  33: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:284:13
      std::panicking::try::do_call
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
      std::panicking::try
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
      std::panic::catch_unwind
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
      std::rt::lang_start_internal::{{closure}}
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/rt.rs:148:48
      std::panicking::try::do_call
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
      std::panicking::try
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
      std::panic::catch_unwind
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
      std::rt::lang_start_internal
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/rt.rs:148:20
  34: std::rt::lang_start
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/rt.rs:166:17
  35: main
  36: __libc_start_call_main
             at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
  37: __libc_start_main_impl
             at ./csu/../csu/libc-start.c:360:3
  38: _start

thread 'main' panicked at /home/xxxxx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/smithay-client-toolkit-0.17.0/src/shell/xdg/frame/fallback_frame.rs:430:52:
trying to resize hidden frame
stack backtrace:
   0:     0x5609388c773c - std::backtrace_rs::backtrace::libunwind::trace::ha637c64ce894333a
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:     0x5609388c773c - std::backtrace_rs::backtrace::trace_unsynchronized::h47f62dea28e0c88d
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x5609388c773c - std::sys_common::backtrace::_print_fmt::h9eef0abe20ede486
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x5609388c773c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hed7f999df88cc644
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x5609388fafd0 - core::fmt::rt::Argument::fmt::h1539a9308b8d058d
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/fmt/rt.rs:142:9
   5:     0x5609388fafd0 - core::fmt::write::h3a39390d8560d9c9
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/fmt/mod.rs:1120:17
   6:     0x5609388c22bf - std::io::Write::write_fmt::h5fc9997dfe05f882
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/io/mod.rs:1762:15
   7:     0x5609388c7524 - std::sys_common::backtrace::_print::h894006fb5c6f3d45
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x5609388c7524 - std::sys_common::backtrace::print::h23a2d212c6fff936
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x5609388c9267 - std::panicking::default_hook::{{closure}}::h8a1d2ee00185001a
  10:     0x5609388c8fcf - std::panicking::default_hook::h6038f2eba384e475
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:292:9
  11:     0x5609349811b3 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h18b5dc7d32a40a73
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2021:9
  12:     0x5609344eab01 - wezterm_gui::notify_on_panic::{{closure}}::hc01702b27c608d12
                               at /home/xxxxx/source/github/wezterm/wezterm-gui/src/main.rs:788:9
  13:     0x5609349811b3 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h18b5dc7d32a40a73
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2021:9
  14:     0x560934987c66 - env_bootstrap::register_panic_hook::{{closure}}::h60d4cf4b612e285d
                               at /home/xxxxx/source/github/wezterm/env-bootstrap/src/lib.rs:189:9
  15:     0x5609388c9878 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h1f8f335eaa9cfaee
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2021:9
  16:     0x5609388c9878 - std::panicking::rust_panic_with_hook::h2b5517d590cab22e
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:783:13
  17:     0x5609388c95ce - std::panicking::begin_panic_handler::{{closure}}::h233112c06e0ef43e
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:657:13
  18:     0x5609388c7c06 - std::sys_common::backtrace::__rust_end_short_backtrace::h6e893f24d7ebbff8
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:170:18
  19:     0x5609388c9332 - rust_begin_unwind
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:645:5
  20:     0x5609341fed25 - core::panicking::panic_fmt::hbf0e066aabfa482c
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:72:14
  21:     0x5609341fece3 - core::panicking::panic_display::h68e6012a1c287ca5
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:178:5
  22:     0x5609341fece3 - core::panicking::panic_str::h1ca8e3b0d2d70f80
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:152:5
  23:     0x5609341fece3 - core::option::expect_failed::h1ae4bac6b7606972
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/option.rs:1985:5
  24:     0x560936480302 - core::option::Option<T>::expect::h1dff7bf05101cabc
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/option.rs:894:21
  25:     0x560936625064 - <smithay_client_toolkit::shell::xdg::frame::fallback_frame::FallbackFrame<State> as smithay_client_toolkit::shell::xdg::frame::DecorationsFrame>::resize::h2a585b3a7feb60fe
                               at /home/xxxxx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/smithay-client-toolkit-0.17.0/src/shell/xdg/frame/fallback_frame.rs:430:26
  26:     0x56093423195d - window::os::wayland::window::WaylandWindow::new_window::{{closure}}::h5fd8b0fc83f07b3f
                               at /home/xxxxx/source/github/wezterm/window/src/os/wayland/window.rs:247:9
  27:     0x560934261920 - window::os::x_and_wayland::Connection::new_window::{{closure}}::h1e0efb600bb50ddf
                               at /home/xxxxx/source/github/wezterm/window/src/os/x_and_wayland.rs:89:18
  28:     0x560934261e8b - window::os::x_and_wayland::Window::new_window::{{closure}}::hc4cb01514634a7df
                               at /home/xxxxx/source/github/wezterm/window/src/os/x_and_wayland.rs:201:14
  29:     0x56093424316b - wezterm_gui::termwindow::TermWindow::new_window::{{closure}}::hf8d804b60b39c2b1
                               at /home/xxxxx/source/github/wezterm/wezterm-gui/src/termwindow/mod.rs:818:10
  30:     0x560934657e0c - wezterm_gui::frontend::GuiFrontEnd::reconcile_workspace::{{closure}}::h135cfe9805fa636b
                               at /home/xxxxx/source/github/wezterm/wezterm-gui/src/frontend.rs:421:73
  31:     0x5609344549b2 - <async_task::runnable::Builder<M>::spawn_local::Checked<F> as core::future::future::Future>::poll::h3712c887143f3074
                               at /home/xxxxx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/runnable.rs:455:26
  32:     0x560934373bbb - <core::pin::Pin<P> as core::future::future::Future>::poll::h15b21ceb1cbc1113
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/future/future.rs:125:9
  33:     0x5609346ebd09 - async_task::raw::RawTask<F,T,S,M>::run::h9cdaf988b2bb3d37
                               at /home/xxxxx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/raw.rs:557:17
  34:     0x5609384b0aef - async_task::runnable::Runnable<M>::run::h72504f440a7721af
                               at /home/xxxxx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/runnable.rs:781:18
  35:     0x56093662db6b - window::spawn::schedule_with_pri::{{closure}}::hb2789b5203911457
                               at /home/xxxxx/source/github/wezterm/window/src/spawn.rs:40:13
  36:     0x560936556521 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h747abdd83a6710e1
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
  37:     0x56093779b708 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hb29bffeed012a79c
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9
  38:     0x560936655b05 - window::spawn::SpawnQueue::run_impl::hca95c8973e4faa29
                               at /home/xxxxx/source/github/wezterm/window/src/spawn.rs:169:13
  39:     0x5609366547fa - window::spawn::SpawnQueue::run::h995d2581d04f8ca8
                               at /home/xxxxx/source/github/wezterm/window/src/spawn.rs:63:9
  40:     0x56093650c214 - window::os::wayland::connection::WaylandConnection::run_message_loop_impl::h23b6931a6c2200be
                               at /home/xxxxx/source/github/wezterm/window/src/os/wayland/connection.rs:74:30
  41:     0x56093650d143 - <window::os::wayland::connection::WaylandConnection as window::connection::ConnectionOps>::run_message_loop::he59f6f2c4fc0ed90
                               at /home/xxxxx/source/github/wezterm/window/src/os/wayland/connection.rs:167:19
  42:     0x560936484d98 - <window::os::x_and_wayland::Connection as window::connection::ConnectionOps>::run_message_loop::h8d476533d02cdddc
                               at /home/xxxxx/source/github/wezterm/window/src/os/x_and_wayland.rs:150:33
  43:     0x56093480cf19 - wezterm_gui::frontend::GuiFrontEnd::run_forever::h1214e3a3bbb468ab
                               at /home/xxxxx/source/github/wezterm/wezterm-gui/src/frontend.rs:323:9
  44:     0x5609344f58a0 - wezterm_gui::run_terminal_gui::hea98cc7f42d10b85
                               at /home/xxxxx/source/github/wezterm/wezterm-gui/src/main.rs:771:5
  45:     0x5609344feeb0 - wezterm_gui::run::ha9c45d4443a5dfe8
                               at /home/xxxxx/source/github/wezterm/wezterm-gui/src/main.rs:1233:23
  46:     0x5609344f61c1 - wezterm_gui::main::h7e26b6637c8f6c3a
                               at /home/xxxxx/source/github/wezterm/wezterm-gui/src/main.rs:817:21
  47:     0x56093490e25b - core::ops::function::FnOnce::call_once::he2013f2922c06998
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
  48:     0x5609344c068e - std::sys_common::backtrace::__rust_begin_short_backtrace::he6abc8f594ffa2b6
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:154:18
  49:     0x56093437aad1 - std::rt::lang_start::{{closure}}::h04a91ab8f41390bf
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/rt.rs:167:18
  50:     0x5609388b8b27 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hd95060ecd5e1ca24
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:284:13
  51:     0x5609388b8b27 - std::panicking::try::do_call::h6e8cf51db32a6e4b
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
  52:     0x5609388b8b27 - std::panicking::try::h3a52eefe24fe3c29
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
  53:     0x5609388b8b27 - std::panic::catch_unwind::h24c28c23c02c3841
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
  54:     0x5609388b8b27 - std::rt::lang_start_internal::{{closure}}::h705d3c9cbc06ef47
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/rt.rs:148:48
  55:     0x5609388b8b27 - std::panicking::try::do_call::ha21f52ba13158470
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
  56:     0x5609388b8b27 - std::panicking::try::h5581346bf6aeb1f8
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
  57:     0x5609388b8b27 - std::panic::catch_unwind::h7919645a6b72e25b
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
  58:     0x5609388b8b27 - std::rt::lang_start_internal::h12de51168669836e
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/rt.rs:148:20
  59:     0x56093437aaaa - std::rt::lang_start::h2ba3107426798e90
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/rt.rs:166:17
  60:     0x5609345029fe - main
  61:     0x7fed03828150 - __libc_start_call_main
                               at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
  62:     0x7fed03828209 - __libc_start_main_impl
                               at ./csu/../csu/libc-start.c:360:3
  63:     0x5609341ff655 - _start
  64:                0x0 - <unknown>

@wez wez added the Wayland label Feb 4, 2024
@wez
Copy link
Owner

wez commented Feb 4, 2024

Thanks, can you run wezterm like this:

WEZTERM_LOG=window::connection=trace,info wezterm

and share what gets logged?

wez added a commit that referenced this issue Feb 4, 2024
This avoids a nasty panic, and shows some more context,
but doesn't really fix anything.

refs: #4948
@Wielding
Copy link

Wielding commented Feb 4, 2024

This is the only additional information displayed on the console before the trace with that set:

22:01:22.958 TRACE window::connection > Screens { main: ScreenInfo { name: "DP-3", rect: Rect(1920x1200 at (0, 0)), scale: 1.0, max_fps: None, effective_dpi: Some(96.0) }, active: ScreenInfo { name: "DP-3", rect: Rect(1920x1200 at (0, 0)), scale: 1.0, max_fps: None, effective_dpi: Some(96.0) }, by_name: {"DP-3": ScreenInfo { name: "DP-3", rect: Rect(1920x1200 at (0, 0)), scale: 1.0, max_fps: None, effective_dpi: Some(96.0) }, "DP-2": ScreenInfo { name: "DP-2", rect: Rect(1920x1200 at (0, 0)), scale: 1.0, max_fps: None, effective_dpi: Some(96.0) }}, virtual_rect: Rect(1920x1200 at (0, 0)) }

wez added a commit that referenced this issue Feb 4, 2024
@wez
Copy link
Owner

wez commented Feb 4, 2024

Thanks; so I think this is because the frame is hidden because there are no client-side decorations.
I just pushed a really dumb "don't do that" kind of fix for this

@Wielding
Copy link

Wielding commented Feb 4, 2024

That changed something but it still panics. Now I briefly see a wezterm window that is not sized correctly in the frame before the panic at the same place in simthay-client-toolkit.

22:09:05.337 TRACE window::connection > Screens { main: ScreenInfo { name: "DP-3", rect: Rect(1920x1200 at (0, 0)), scale: 1.0, max_fps: None, effective_dpi: Some(96.0) }, active: ScreenInfo { name: "DP-3", rect: Rect(1920x1200 at (0, 0)), scale: 1.0, max_fps: None, effective_dpi: Some(96.0) }, by_name: {"DP-3": ScreenInfo { name: "DP-3", rect: Rect(1920x1200 at (0, 0)), scale: 1.0, max_fps: None, effective_dpi: Some(96.0) }, "DP-2": ScreenInfo { name: "DP-2", rect: Rect(1920x1200 at (0, 0)), scale: 1.0, max_fps: None, effective_dpi: Some(96.0) }}, virtual_rect: Rect(1920x1200 at (0, 0)) }

@ardrigh
Copy link

ardrigh commented Feb 4, 2024

I just updated my nighly from Copr on Fedora 39 and hit same issues
wezterm-20240203_191807_281a0ce4-0.x86_64 looks like this was a few commits back from current main

> WEZTERM_LOG=window::connection=trace,info wezterm
16:32:35.859  TRACE  window::connection > Screens { main: ScreenInfo { name: "DP-3", rect: Rect(2560x1440 at (0, 0)), scale: 1.0, max_fps: None, effective_dpi: Some(96.0) }, active: ScreenInfo { name: "DP-3", rect: Rect(2560x1440 at (0, 0)), scale: 1.0, max_fps: None, effective_dpi: Some(96.0) }, by_name: {"DP-3": ScreenInfo { name: "DP-3", rect: Rect(2560x1440 at (0, 0)), scale: 1.0, max_fps: None, effective_dpi: Some(96.0) }, "eDP-1": ScreenInfo { name: "eDP-1", rect: Rect(1920x1080 at (0, 1440)), scale: 1.0, max_fps: None, effective_dpi: Some(96.0) }}, virtual_rect: Rect(2560x2520 at (0, 0)) }
16:32:35.859  ERROR  env_bootstrap      > panic at /builddir/.cargo/registry/src/index.crates.io-6f17d22bba15001f/smithay-client-toolkit-0.17.0/src/shell/xdg/frame/fallback_frame.rs:430:52 - !?
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: <unknown>
  15: <unknown>
  16: <unknown>
  17: <unknown>
  18: <unknown>
  19: <unknown>
  20: __libc_start_call_main
  21: __libc_start_main_impl
  22: <unknown>

thread 'main' panicked at /builddir/.cargo/registry/src/index.crates.io-6f17d22bba15001f/smithay-client-toolkit-0.17.0/src/shell/xdg/frame/fallback_frame.rs:430:52:
trying to resize hidden frame
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@ardrigh
Copy link

ardrigh commented Feb 4, 2024

This is the output I get running from latest commit

> git lg
* 2ce302c E wayland: don't try to resize a hidden frame [Wez Furlong] ([email protected]) 39 minutes ago
> cargo run --bin wezterm -- start
    Finished dev [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/wezterm start`
16:44:02.794  ERROR  env_bootstrap > panic at /home/user/.local/cargo/registry/src/index.crates.io-6f17d22bba15001f/smithay-client-toolkit-0.17.0/src/shell/xdg/frame/fallback_frame.rs:430:52 - !?
   0: env_bootstrap::register_panic_hook::{{closure}}
             at env-bootstrap/src/lib.rs:176:18
   1: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2021:9
      std::panicking::rust_panic_with_hook
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:783:13
   2: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:657:13
   3: std::sys_common::backtrace::__rust_end_short_backtrace
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:170:18
   4: rust_begin_unwind
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:645:5
   5: core::panicking::panic_fmt
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:72:14
   6: core::panicking::panic_display
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:178:5
      core::panicking::panic_str
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:152:5
      core::option::expect_failed
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/option.rs:1985:5
   7: core::option::Option<T>::expect
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/option.rs:894:21
   8: <smithay_client_toolkit::shell::xdg::frame::fallback_frame::FallbackFrame<State> as smithay_client_toolkit::shell::xdg::frame::DecorationsFrame>::resize
             at /home/user/.local/cargo/registry/src/index.crates.io-6f17d22bba15001f/smithay-client-toolkit-0.17.0/src/shell/xdg/frame/fallback_frame.rs:430:26
   9: window::os::wayland::window::WaylandWindowInner::dispatch_pending_event
             at window/src/os/wayland/window.rs:805:17
  10: window::os::wayland::window::<impl window::os::wayland::state::WaylandState>::handle_window_event::{{closure}}
             at window/src/os/wayland/window.rs:1182:17
  11: window::os::wayland::connection::WaylandConnection::with_window_inner::{{closure}}
             at window/src/os/wayland/connection.rs:147:29
  12: async_task::raw::RawTask<F,T,S,M>::run
             at /home/user/.local/cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/raw.rs:557:17
  13: async_task::runnable::Runnable<M>::run
             at /home/user/.local/cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/runnable.rs:781:18
  14: window::spawn::schedule_with_pri::{{closure}}
             at window/src/spawn.rs:40:13
  15: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
  16: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9
  17: window::spawn::SpawnQueue::run_impl
             at window/src/spawn.rs:169:13
  18: window::spawn::SpawnQueue::run
             at window/src/spawn.rs:63:9
  19: window::os::wayland::connection::WaylandConnection::run_message_loop_impl
             at window/src/os/wayland/connection.rs:74:30
  20: <window::os::wayland::connection::WaylandConnection as window::connection::ConnectionOps>::run_message_loop
             at window/src/os/wayland/connection.rs:167:19
  21: <window::os::x_and_wayland::Connection as window::connection::ConnectionOps>::run_message_loop
             at window/src/os/x_and_wayland.rs:150:33
  22: wezterm_gui::frontend::GuiFrontEnd::run_forever
             at wezterm-gui/src/frontend.rs:323:9
  23: wezterm_gui::run_terminal_gui
             at wezterm-gui/src/main.rs:771:5
  24: wezterm_gui::run
             at wezterm-gui/src/main.rs:1233:23
  25: wezterm_gui::main
             at wezterm-gui/src/main.rs:817:21
  26: core::ops::function::FnOnce::call_once
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
  27: std::sys_common::backtrace::__rust_begin_short_backtrace
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:154:18
  28: std::rt::lang_start::{{closure}}
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/rt.rs:167:18
  29: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:284:13
      std::panicking::try::do_call
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
      std::panicking::try
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
      std::panic::catch_unwind
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
      std::rt::lang_start_internal::{{closure}}
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/rt.rs:148:48
      std::panicking::try::do_call
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
      std::panicking::try
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
      std::panic::catch_unwind
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
      std::rt::lang_start_internal
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/rt.rs:148:20
  30: std::rt::lang_start
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/rt.rs:166:17
  31: main
  32: __libc_start_call_main
  33: __libc_start_main_impl
  34: _start

thread 'main' panicked at /home/user/.local/cargo/registry/src/index.crates.io-6f17d22bba15001f/smithay-client-toolkit-0.17.0/src/shell/xdg/frame/fallback_frame.rs:430:52:
trying to resize hidden frame
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread panicked while processing panic. aborting.
fish: Job 1, 'cargo run --bin wezterm -- start' terminated by signal SIGABRT (Abort)

@wez
Copy link
Owner

wez commented Feb 4, 2024

I think main should behave a little better now; doesn't panic in sway in that way any more.

@ardrigh
Copy link

ardrigh commented Feb 4, 2024

I think main should behave a little better now; doesn't panic in sway in that way any more.

This has stopped the abort panic, now in GNOME I am not getting the resize bar on the window.

When I type anything inside the wezterm window, it prints an error line for each character

For reference my system details are all listed in #4825

> git lg
* 2c5fa35 N Update Lua Reference with Lua version [Benjamin Kane] ([email protected]) 7 hours ago (HEAD -> main, wezterm/main, wezterm/HEAD)
* 38dbd8d E wayland: hook up some resize handling [Wez Furlong] ([email protected]) 5 hours ago
> WEZTERM_LOG=window::connection=trace,info cargo run --bin wezterm -- start
    Finished dev [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/wezterm start`
00:34:07.698  TRACE  window::connection > Screens { main: ScreenInfo { name: "DP-3", rect: Rect(2560x1440 at (0, 0)), scale: 1.0, max_fps: None, effective_dpi: Some(96.0) }, active: ScreenInfo { name: "DP-3", rect: Rect(2560x1440 at (0, 0)), scale: 1.0, max_fps: None, effective_dpi: Some(96.0) }, by_name: {"eDP-1": ScreenInfo { name: "eDP-1", rect: Rect(1920x1080 at (0, 1440)), scale: 1.0, max_fps: None, effective_dpi: Some(96.0) }, "DP-3": ScreenInfo { name: "DP-3", rect: Rect(2560x1440 at (0, 0)), scale: 1.0, max_fps: None, effective_dpi: Some(96.0) }}, virtual_rect: Rect(2560x2520 at (0, 0)) }
00:34:09.992  ERROR  window::os::wayland::window > set_cursor: Cursor not found
00:34:10.482  ERROR  window::os::wayland::window > set_cursor: Cursor not found
00:34:11.044  ERROR  window::os::wayland::window > set_cursor: Cursor not found
00:34:11.435  ERROR  window::os::wayland::window > set_cursor: Cursor not found

@Wielding
Copy link

Wielding commented Feb 4, 2024

I am getting the same cursor error and the cursor does not change or completely vanishes when moving over the wezterm window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Wayland
Projects
None yet
Development

No branches or pull requests

4 participants