Wezterm: Crash on switching tabs

Created on 22 Jun 2020  ·  8Comments  ·  Source: wez/wezterm

Describe the bug

Switching to a different tab is consistently crashing.

Environment (please complete the following information):

  • OS: Windows 10, build 19041.329
  • Version: wezterm 20200620-160318-e00b076c-6-g076cf3d1

To Reproduce

  1. Start WezTerm.
  2. Click “+” to create a new tab.
  3. Click on the first tab’s label.
  4. Observe it crash.

Configuration

None.

Expected behavior

… not to crash! 😆

bug

All 8 comments

Can you provide some more details on what you're seeing?
What is crashing? Is wezterm exiting? Is the tab immediately exiting, leaving wezterm running?
Can you try starting wezterm from a different console window so that you can capture its stderr output?

Please also share the output from running set in the initial console window (assuming that you are running cmd.exe; I'd like to see what the environment is set to).

WezTerm exits.

Sorry, I removed the software from my machine because of these problems (and font rendering, a brief check looked like it wasn’t doing font fallbacks, which I rather want), and don’t feel like downloading and running it again. I might try it again at some point in the future, but not now.

When you're ready to try again and work with me to get to the bottom of things, please open a new issue with more details!
I'm going to close this one because it doesn't seem like it will go anywhere with the information available right now.

@wez as I can reproduce the issue on Windows, what can I provide to track down the problem?

This is the stderr I see:

thread 'main' panicked at 'already mutably borrowed: BorrowError', /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\src\libcore\cell.rs:798:9 note: run withRUST_BACKTRACE=1environment variable to display a backtrace 2020-06-22T18:23:10.990Z ERROR window::os::windows::window > caught Any

Wezterm (wezterm 20200620-160318-e00b076c-6-g076cf3d) is crashing, And the window (with both tabs) disappearing.

Ah interesting. To identify where this is coming from:

  • Build a debug build from source cargo build (no --release)
  • set RUST_BACKTRACE=1
  • cargo run

It should then emit a pretty long stack trace; please share that here!

If you can't get the debug build working for whatever reason, the released build may still show something useful it you set RUST_BACKTRACE=1.

Thanks for repoening this

 2020-06-22T19:18:47.196Z ERROR wezterm::frontend::gui::termwindow > scale changed so resize to RowsAndCols { rows: 62, cols: 142 } Dimensions { pixel_width: 860, pixel_height: 764, dpi: 96 }
thread 'main' panicked at 'already mutably borrowed: BorrowError', /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\src\libcore\cell.rs:798:9
stack backtrace:
   0: backtrace::backtrace::trace_unsynchronized
             at C:\Users\VssAdministrator\.cargo\registry\src\github.com-1ecc6299db9ec823\backtrace-0.3.44\src\backtrace\mod.rs:66
   1: std::sys_common::backtrace::_print_fmt
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\sys_common\backtrace.rs:78
   2: std::sys_common::backtrace::_print::{{impl}}::fmt
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\sys_common\backtrace.rs:59
   3: core::fmt::write
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libcore\fmt\mod.rs:1063
   4: std::io::Write::write_fmt<std::sys::windows::stdio::Stderr>
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\io\mod.rs:1426
   5: std::sys_common::backtrace::_print
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\sys_common\backtrace.rs:62
   6: std::sys_common::backtrace::print
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\sys_common\backtrace.rs:49
   7: std::panicking::default_hook::{{closure}}
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\panicking.rs:204
   8: std::panicking::default_hook
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\panicking.rs:224
   9: std::panicking::rust_panic_with_hook
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\panicking.rs:474
  10: std::panicking::begin_panic_handler
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\panicking.rs:378
  11: core::panicking::panic_fmt
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libcore\panicking.rs:85
  12: core::option::expect_none_failed
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libcore\option.rs:1211
  13: wezterm::mux::Mux::get_window
  14: wezterm::frontend::gui::termwindow::TermWindow::set_viewport          15: wezterm::frontend::gui::termwindow::TermWindow::periodic_window_maintenance
  16: <dyn wezterm::frontend::gui::termwindow::ShapeCacheKeyTrait as core::cmp::PartialEq>::eq
  17: window::os::windows::window::do_wnd_proc
  18: std::panicking::try::do_call
  19: panic_unwind::__rust_maybe_catch_panic
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libpanic_unwind\lib.rs:86
  20: window::os::windows::window::do_wnd_proc
  21: CallWindowProcW
  22: CallWindowProcW
  23: glPushClientAttrib
  24: CallWindowProcW
  25: DispatchMessageW
  26: <window::os::windows::connection::Connection as window::connection::ConnectionOps>::run_message_loop
  27: wezterm::terminate_with_error
  28: wezterm::terminate_with_error
  29: std::io::Write::write_fmt
  30: std::rt::lang_start_internal::{{closure}}
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\rt.rs:52
  31: std::panicking::try::do_call<closure-0,i32>
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\panicking.rs:303
  32: panic_unwind::__rust_maybe_catch_panic
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libpanic_unwind\lib.rs:86
  33: std::panicking::try
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\panicking.rs:281
  34: std::panic::catch_unwind
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\panic.rs:394
  35: std::rt::lang_start_internal
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\rt.rs:51
  36: main
  37: invoke_main
             at d:\agent\_work\2\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
  38: __scrt_common_main_seh
             at d:\agent\_work\2\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
  39: BaseThreadInitThunk
  40: RtlUserThreadStart
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
 2020-06-22T19:18:48.938Z ERROR window::os::windows::window        > caught Any

Thanks; I believe that this is resolved by the commit referenced above!

I can confirm the referenced commit resolves the problem. Thanks!

Was this page helpful?
0 / 5 - 0 ratings