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

Unable to launch WezTerm with WebGPU front-end #3425

Open
micgao opened this issue Apr 2, 2023 · 15 comments
Open

Unable to launch WezTerm with WebGPU front-end #3425

micgao opened this issue Apr 2, 2023 · 15 comments
Labels
bug Something isn't working frontend:webgpu Windows Issue applies to Microsoft Windows

Comments

@micgao
Copy link

micgao commented Apr 2, 2023

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

Windows

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

No response

WezTerm version

20230330-074438-c766d5e4

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 fails to launch when front_end = "WebGpu" is set in the config. This is also the case when it's the only option set in the config file, as well as trying to launch with wezterm -n --config "front_end='WebGpu'"

However, if I launch a new instance of WezTerm with front_end = "OpenGL", then change the config file to use WebGpu and spawn a new window, sometimes the new window will be created as expected using the WebGpu front-end (I can confirm the setting has been applied properly by the font rendering). Occasionally, this workaround won't work.

I have tried various configurations of both webgpu_power_preference and webgpu_preferred_adapter, but the behavior persists. From my current working instance from the debug overlay:

OpenGL version: WebGPU: name=NVIDIA GeForce GTX 1650 Ti with Max-Q Design, device_type=DiscreteGpu, backend=Vulkan, driver=NVIDIA, driver_info=517.13, vendor=4318, device=8085

To Reproduce

Try to launch WezTerm with wezterm -n --config "front_end='WebGpu'"

Configuration

local wezterm = require("wezterm")

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

config.front_end = "WebGpu"

return config

Expected Behavior

WezTerm to launch

Logs

Log when trying (and failing) to launch with front_end = "WebGpu"

Log when launching successfully with OpenGL, switching to WebGpu, trying to spawn a new window, and crashing

Log using workaround

Anything else?

No response

@micgao micgao added the bug Something isn't working label Apr 2, 2023
@wez
Copy link
Owner

wez commented Apr 2, 2023

Please set WEZTERM_LOG=trace and collect the logs from the config.front_end = "WebGpu" case and share them here.

Also, please open the debug overlay and type:

wezterm.gui.enumerate_gpus()

and share the output here.

@wez wez added the waiting-on-op Waiting for more information from the original poster label Apr 2, 2023
@micgao
Copy link
Author

micgao commented Apr 2, 2023

Log when launching with WEZTERM_LOG=trace and config.front_end = "WebGpu" as the only thing in the config file

Output of wezterm.gui.enumerate_gpus() from debug overlay:

[
{
"backend": "Vulkan",
"device": 8085,
"device_type": "DiscreteGpu",
"driver": "NVIDIA",
"driver_info": "517.13",
"name": "NVIDIA GeForce GTX 1650 Ti with Max-Q Design",
"vendor": 4318,
},
{
"backend": "Dx12",
"device": 8085,
"device_type": "DiscreteGpu",
"name": "NVIDIA GeForce GTX 1650 Ti with Max-Q Design",
"vendor": 4318,
},
{
"backend": "Dx12",
"device": 140,
"device_type": "Cpu",
"name": "Microsoft Basic Render Driver",
"vendor": 5140,
},
{
"backend": "Gl",
"device": 0,
"device_type": "Other",
"name": "ANGLE (NVIDIA GeForce GTX 1650 Ti with Max-Q Design Direct3D11 vs_5_0 ps_5_0)",
"vendor": 0,
},
]

I have tried setting the webgpu_preferred_adapter with the options listed, but behavior persists.

@github-actions github-actions bot removed the waiting-on-op Waiting for more information from the original poster label Apr 2, 2023
@wez
Copy link
Owner

wez commented Apr 2, 2023

It hasn't logged anything from the webgpu module, and there are no errors logged. When you say fails to launch, what happens? Is there a crash dialog?

If so, are you in a position to attach a debugger?
If so, I'd suggest building from source so that you can get a good backtrace.

On Windows you need:

  • Strawberry perl. not any other perl; it has to be strawberry perl. This is needed to build openssl. Building openssl can take a few minutes the first time through.
  • Rust - install the msvc flavor of rust using https://rustup.rs/

Then build and run the debug version like this:

git clone --depth=1 --branch=main --recursive https://github.com/wez/wezterm.git
cd wezterm
git submodule update --init --recursive
cargo run --bin wezterm -- start

@wez wez added the waiting-on-op Waiting for more information from the original poster label Apr 2, 2023
@micgao
Copy link
Author

micgao commented Apr 2, 2023

When I try to launch wezterm (with the wezterm command or clicking the wezterm-gui.exe), nothing seems to happen. The window doesn't appear briefly before closing, there's no error message, and no other sign.

I tried running the debug version, but ran into this error:

Running target\debug\wezterm.exe start
17:54:44.809 ERROR wezterm > The system cannot find the file specified. (os error 2); terminating
error: process didn't exit successfully: target\debug\wezterm.exe start (exit code: 1)

I was able to build the release version, and am able to run that.

I looked in the Windows Logs and did find these:
Faulting application name: wezterm-gui.exe, version: 1.0.0.0, time stamp: 0x6428eb49
Faulting module name: nvoglv64.dll, version: 31.0.15.1713, time stamp: 0x6303455f
Exception code: 0xc0000005
Fault offset: 0x000000000117944f
Faulting process ID: 0x0xD28
Faulting application start time: 0x0x1D9650DB76E781A
Faulting application path: C:\Users\micga.cargo\bin\wezterm-gui.exe
Faulting module path: C:\WINDOWS\System32\DriverStore\FileRepository\nvlt.inf_amd64_085dd52f5af0c5b4\nvoglv64.dll
Report ID: 63c315f7-413e-47cf-88a4-ad6a6af90a6d
Faulting package full name:
Faulting package-relative application ID:

The nvoglv64.dll module being part of the Nvidia drivers

@github-actions github-actions bot removed the waiting-on-op Waiting for more information from the original poster label Apr 2, 2023
@wez
Copy link
Owner

wez commented Apr 3, 2023

It's likely that this issue is a bug in the nvidia drivers, especially because the faulting module is the nvidia drivers themselves, but also: wezterm doesn't know that it's nvidia and doesn't do anything different, and it works on other systems and combinations of drivers.

There's not a lot I can do without a stack trace.

Can you try launching the debug build of wezterm-gui.exe under a debugger?

@wez wez added the waiting-on-op Waiting for more information from the original poster label Apr 3, 2023
@micgao
Copy link
Author

micgao commented Apr 7, 2023

Here is what I got:

11:59:48.972  ERROR  env_bootstrap > panic at window\src\os\windows\window.rs:1098:27 - !?
   0: backtrace::backtrace::dbghelp::trace
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\backtrace-0.3.67\src\backtrace\dbghelp.rs:98
   1: backtrace::backtrace::trace_unsynchronized<backtrace::capture::impl$1::create::closure_env$0>
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\backtrace-0.3.67\src\backtrace\mod.rs:66
   2: backtrace::backtrace::trace<backtrace::capture::impl$1::create::closure_env$0>
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\backtrace-0.3.67\src\backtrace\mod.rs:53
   3: backtrace::capture::Backtrace::create
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\backtrace-0.3.67\src\capture.rs:176
   4: backtrace::capture::Backtrace::new
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\backtrace-0.3.67\src\capture.rs:140
   5: env_bootstrap::register_panic_hook::closure$0
             at env-bootstrap\src\lib.rs:149
   6: alloc::boxed::impl$47::call
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\alloc\src\boxed.rs:1990
   7: std::panicking::rust_panic_with_hook
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:694
   8: std::panicking::begin_panic_handler::closure$0
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:581
   9: std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::closure_env$0,never$>
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\sys_common\backtrace.rs:150
  10: std::panicking::begin_panic_handler
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:577
  11: core::panicking::panic_fmt
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\core\src\panicking.rs:67
  12: core::result::unwrap_failed
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\core\src\result.rs:1690
  13: enum2$<core::result::Result<core::cell::RefMut<window::os::windows::window::WindowInner>,core::cell::BorrowMutError> >::expect<core::cell::RefMut<window::os::windows::window::WindowInner>,core::cell::BorrowMutError>
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\result.rs:1049
  14: core::cell::RefCell<window::os::windows::window::WindowInner>::borrow_mut<window::os::windows::window::WindowInner>
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\cell.rs:1018
  15: window::os::windows::window::wm_nchittest
             at window\src\os\windows\window.rs:1098
  16: window::os::windows::window::do_wnd_proc
             at window\src\os\windows\window.rs:2652
  17: window::os::windows::window::wnd_proc::closure$0
             at window\src\os\windows\window.rs:2717
  18: std::panicking::try::do_call<window::os::windows::window::wnd_proc::closure_env$0,isize>
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\panicking.rs:485
  19: std::panicking::try::do_catch<core::panic::unwind_safe::AssertUnwindSafe<async_task::raw::impl$3::run::closure_env$1<enum2$<window::os::windows::connection::impl$1::with_window_inner::async_block_env$0<tuple$<>,window::os::windows::window::impl$42::set_in
  20: std::panicking::try<isize,window::os::windows::window::wnd_proc::closure_env$0>
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\panicking.rs:449
  21: std::panic::catch_unwind<window::os::windows::window::wnd_proc::closure_env$0,isize>
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\panic.rs:140
  22: window::os::windows::window::wnd_proc
             at window\src\os\windows\window.rs:2716
  23: CallWindowProcW
  24: CallWindowProcW
  25: <unknown>
  26: CallWindowProcW
  27: CallWindowProcA
  28: GetAsyncKeyState
  29: KiUserCallbackDispatcher
  30: NtUserPeekMessage
  31: PeekMessageW
  32: PeekMessageW
  33: Ordinal88
  34: Ordinal88
  35: Ordinal88
  36: CoUnloadingWOW
  37: CoUnloadingWOW
  38: WindowsPreallocateStringBuffer
  39: WindowsPreallocateStringBuffer
  40: WindowsPreallocateStringBuffer
  41: WindowsPreallocateStringBuffer
  42: NdrServerCallNdr64
  43: WindowsPreallocateStringBuffer
  44: ObjectStublessClient32
  45: WindowsIsStringEmpty
  46: WindowsIsStringEmpty
  47: WindowsIsStringEmpty
  48: CoTaskMemAlloc
  49: RoGetActivationFactory
  50: GetRegistryPathDetokenizer
  51: GetRegistryPathDetokenizer
  52: GetRegistryPathDetokenizer
  53: GetRegistryPathDetokenizer
  54: CreateDesktopAppXActivationInfo
  55: PersistAppExecutionAliasToFileHandleEx
  56: DllGetClassObject
  57: DllGetClassObject
  58: LoadAppExecutionAliasInfoEx
  59: FatalAppExitW
  60: IsProcessCritical
  61: CreateProcessInternalW
  62: CreateProcessW
  63: CreateProcessW
  64: std::sys::windows::process::Command::spawn
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\sys\windows\process.rs:326
  65: std::sys::windows::process::Command::output
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\sys\windows\process.rs:352
  66: std::process::Command::output
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\process.rs:922
  67: config::wsl::WslDistro::load_distro_list
             at config\src\wsl.rs:57
  68: config::wsl::WslDomain::default_domains
             at config\src\wsl.rs:24
  69: config::config::_IMPL_FROMDYNAMIC_FOR_Config::impl$0::from_dynamic
             at config\src\config.rs:50
  70: config::lua::config_builder_new_index
             at config\src\lua.rs:130
  71: core::ops::function::Fn::call<enum2$<core::result::Result<tuple$<>,enum2$<mlua::error::Error> > > (*)(ref$<mlua::lua::Lua>,tuple$<mlua::table::Table,alloc::string::String,enum2$<mlua::value::Value> >),tuple$<ref$<mlua::lua::Lua>,tuple$<mlua::table::Table,
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\ops\function.rs:79
  72: mlua::lua::impl$8::create_function::closure$0<tuple$<mlua::table::Table,alloc::string::String,enum2$<mlua::value::Value> >,tuple$<>,enum2$<core::result::Result<tuple$<>,enum2$<mlua::error::Error> > > (*)(ref$<mlua::lua::Lua>,tuple$<mlua::table::Table,allo
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mlua-0.8.8\src\lua.rs:1584
  73: mlua::lua::impl$8::create_callback::call_callback::closure$0
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mlua-0.8.8\src\lua.rs:2677
  74: mlua::lua::callback_error_ext::closure$1<mlua::lua::impl$8::create_callback::call_callback::closure_env$0,i32>
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mlua-0.8.8\src\lua.rs:3115
  75: core::panic::unwind_safe::impl$23::call_once<enum2$<core::result::Result<i32,enum2$<mlua::error::Error> > >,mlua::lua::callback_error_ext::closure_env$1<mlua::lua::impl$8::create_callback::call_callback::closure_env$0,i32> >
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\panic\unwind_safe.rs:271
  76: std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<mlua::lua::callback_error_ext::closure_env$1<mlua::lua::impl$8::create_callback::call_callback::closure_env$0,i32> >,enum2$<core::result::Result<i32,enum2$<mlua::error::Error> > > >
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\panicking.rs:485
  77: std::panicking::try::do_catch<core::panic::unwind_safe::AssertUnwindSafe<std::sys::common::thread_local::fast_local::fast::destroy_value::closure_env$0<core::cell::Cell<tuple$<u64,u64> > > >,tuple$<> >
  78: std::panicking::try<enum2$<core::result::Result<i32,enum2$<mlua::error::Error> > >,core::panic::unwind_safe::AssertUnwindSafe<mlua::lua::callback_error_ext::closure_env$1<mlua::lua::impl$8::create_callback::call_callback::closure_env$0,i32> > >
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\panicking.rs:449
  79: std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<mlua::lua::callback_error_ext::closure_env$1<mlua::lua::impl$8::create_callback::call_callback::closure_env$0,i32> >,enum2$<core::result::Result<i32,enum2$<mlua::error::Error> > > >
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\panic.rs:140
  80: mlua::lua::callback_error_ext<mlua::lua::impl$8::create_callback::call_callback::closure_env$0,i32>
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mlua-0.8.8\src\lua.rs:3115
  81: mlua::lua::impl$8::create_callback::call_callback
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mlua-0.8.8\src\lua.rs:2656
  82: precallC
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\ldo.c:506
  83: luaD_precall
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\ldo.c:569
  84: ccall
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\ldo.c:607
  85: luaV_finishset
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\lvm.c:354
  86: luaV_execute
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\lvm.c:1168
  87: ccall
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\ldo.c:609
  88: luaD_rawrunprotected
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\ldo.c:144
  89: lua_resume
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\ldo.c:822
  90: mlua::thread::Thread::resume<mlua::value::MultiValue,mlua::value::MultiValue>
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mlua-0.8.8\src\thread.rs:136
  91: mlua::thread::impl$5::poll<enum2$<mlua::value::Value> >
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mlua-0.8.8\src\thread.rs:424
  92: core::future::future::impl$1::poll<alloc::boxed::Box<dyn$<core::future::future::Future<assoc$<Output,enum2$<core::result::Result<enum2$<mlua::value::Value>,enum2$<mlua::error::Error> > > > > >,alloc::alloc::Global> >
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\future\future.rs:125
  93: async_io::driver::block_on<enum2$<core::result::Result<enum2$<mlua::value::Value>,enum2$<mlua::error::Error> > >,core::pin::Pin<alloc::boxed::Box<dyn$<core::future::future::Future<assoc$<Output,enum2$<core::result::Result<enum2$<mlua::value::Value>,enum2$
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\async-io-1.13.0\src\driver.rs:146
  94: config::config::impl$1::try_load::closure$0
             at config\src\config.rs:1012
  95: enum2$<wezterm_dynamic::error::Error>::capture_warnings<config::config::impl$1::try_load::closure_env$0,enum2$<core::result::Result<config::config::Config,anyhow::Error> > >
             at wezterm-dynamic\src\error.rs:102
  96: config::config::Config::try_load
             at config\src\config.rs:1009
  97: config::config::Config::load_with_overrides
             at config\src\config.rs:945
  98: config::ConfigInner::overridden
             at config\src\lib.rs:612
  99: config::Configuration::overridden
             at config\src\lib.rs:688
 100: config::overridden_config
             at config\src\lib.rs:401
 101: wezterm_gui::termwindow::TermWindow::config_was_reloaded
             at wezterm-gui\src\termwindow\mod.rs:1593
 102: wezterm_gui::termwindow::impl$4::new_window::async_fn$0::closure$8::closure$0
             at wezterm-gui\src\termwindow\mod.rs:817
 103: core::ops::function::FnOnce::call_once<wezterm_gui::termwindow::impl$4::new_window::async_fn$0::closure$8::closure_env$0,tuple$<ref_mut$<wezterm_gui::termwindow::TermWindow> > >
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\ops\function.rs:250
 104: alloc::boxed::impl$45::call_once<tuple$<ref_mut$<wezterm_gui::termwindow::TermWindow> >,dyn$<core::ops::function::FnOnce<tuple$<ref_mut$<wezterm_gui::termwindow::TermWindow> >,assoc$<Output,tuple$<> > >,core::marker::Send,core::marker::Sync>,alloc::alloc:
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\alloc\src\boxed.rs:1976
 105: wezterm_gui::termwindow::TermWindow::dispatch_notif
             at wezterm-gui\src\termwindow\mod.rs:1226
 106: wezterm_gui::termwindow::TermWindow::dispatch_window_event
             at wezterm-gui\src\termwindow\mod.rs:941
 107: wezterm_gui::termwindow::impl$4::new_window::async_fn$0::closure$7
             at wezterm-gui\src\termwindow\mod.rs:803
 108: alloc::boxed::impl$46::call_mut<tuple$<enum2$<window::WindowEvent>,ref$<window::os::windows::window::Window> >,dyn$<core::ops::function::FnMut<tuple$<enum2$<window::WindowEvent>,ref$<window::os::windows::window::Window> >,assoc$<Output,tuple$<> > > >,allo
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\alloc\src\boxed.rs:1983
 109: window::WindowEventSender::dispatch
             at window\src\lib.rs:214
 110: window::os::windows::window::impl$42::notify::closure$0<enum2$<wezterm_gui::termwindow::TermWindowNotif> >
             at window\src\os\windows\window.rs:704
 111: window::os::windows::connection::impl$1::with_window_inner::async_block$0<tuple$<>,window::os::windows::window::impl$42::notify::closure_env$0<enum2$<wezterm_gui::termwindow::TermWindowNotif> > >
             at window\src\os\windows\connection.rs:269
 112: async_task::raw::RawTask<enum2$<window::os::windows::connection::impl$1::with_window_inner::async_block_env$0<tuple$<>,window::os::windows::window::impl$42::notify::closure_env$0<enum2$<wezterm_gui::termwindow::TermWindowNotif> > > >,tuple$<>,promise::spa
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\async-task-4.4.0\src\raw.rs:563
 113: async_task::runnable::Runnable<tuple$<> >::run<tuple$<> >
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\async-task-4.4.0\src\runnable.rs:782
 114: window::spawn::schedule_with_pri::closure$0
             at window\src\spawn.rs:40
 115: core::ops::function::FnOnce::call_once<window::spawn::schedule_with_pri::closure_env$0,tuple$<> >
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\ops\function.rs:250
 116: alloc::boxed::impl$45::call_once<tuple$<>,dyn$<core::ops::function::FnOnce<tuple$<>,assoc$<Output,tuple$<> > >,core::marker::Send>,alloc::alloc::Global>
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\alloc\src\boxed.rs:1976
 117: window::spawn::SpawnQueue::run_impl
             at window\src\spawn.rs:121
 118: window::spawn::SpawnQueue::run
             at window\src\spawn.rs:63
 119: window::os::windows::connection::impl$0::run_message_loop
             at window\src\os\windows\connection.rs:71
 120: wezterm_gui::frontend::GuiFrontEnd::run_forever
             at wezterm-gui\src\frontend.rs:292
 121: wezterm_gui::run_terminal_gui
             at wezterm-gui\src\main.rs:810
 122: wezterm_gui::run
             at wezterm-gui\src\main.rs:1262
 123: wezterm_gui::main
             at wezterm-gui\src\main.rs:856
 124: core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\ops\function.rs:250
 125: std::sys_common::backtrace::__rust_begin_short_backtrace<void (*)(),tuple$<> >
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\sys_common\backtrace.rs:134
 126: std::sys_common::backtrace::__rust_begin_short_backtrace<void (*)(),tuple$<> >
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\sys_common\backtrace.rs:134
 127: std::rt::lang_start::closure$0<tuple$<> >
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\rt.rs:166
 128: core::ops::function::impls::impl$2::call_once
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\core\src\ops\function.rs:287
 129: std::panicking::try::do_call
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:485
 130: std::panicking::try
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:449
 131: std::panic::catch_unwind
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panic.rs:140
 132: std::rt::lang_start_internal::closure$2
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\rt.rs:148
 133: std::panicking::try::do_call
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:485
 134: std::panicking::try
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:449
 135: std::panic::catch_unwind
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panic.rs:140
 136: std::rt::lang_start_internal
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\rt.rs:148
 137: std::rt::lang_start<tuple$<> >
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\rt.rs:165
 138: main
 139: invoke_main
             at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
 140: __scrt_common_main_seh
             at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
 141: BaseThreadInitThunk
 142: RtlUserThreadStart

thread 'main' panicked at 'already borrowed: BorrowMutError', window\src\os\windows\window.rs:1098:27
stack backtrace:
   0:     0x7ff61d60d2c2 - std::backtrace_rs::backtrace::dbghelp::trace
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\..\..\backtrace\src\backtrace\dbghelp.rs:98
   1:     0x7ff61d60d2c2 - std::backtrace_rs::backtrace::trace_unsynchronized
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
   2:     0x7ff61d60d2c2 - std::sys_common::backtrace::_print_fmt
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\sys_common\backtrace.rs:65
   3:     0x7ff61d60d2c2 - std::sys_common::backtrace::_print::impl$0::fmt
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\sys_common\backtrace.rs:44
   4:     0x7ff61d62fa9b - core::fmt::write
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\core\src\fmt\mod.rs:1254
   5:     0x7ff61d6061ea - std::io::Write::write_fmt<std::sys::windows::stdio::Stderr>
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\io\mod.rs:1698
   6:     0x7ff61d60d00b - std::sys_common::backtrace::_print
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\sys_common\backtrace.rs:47
   7:     0x7ff61d60d00b - std::sys_common::backtrace::print
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\sys_common\backtrace.rs:34
   8:     0x7ff61d60ff2a - std::panicking::default_hook::closure$1
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:269
   9:     0x7ff61d60fb90 - std::panicking::default_hook
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:288
  10:     0x7ff61ca24243 - alloc::boxed::impl$47::call<tuple$<ref$<core::panic::panic_info::PanicInfo> >,dyn$<core::ops::function::Fn<tuple$<ref$<core::panic::panic_info::PanicInfo> >,assoc$<Output,tuple$<> > >,core::marker::Send,core::marker::Sync>,alloc::alloc::Global>
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\alloc\src\boxed.rs:1990
  11:     0x7ff61c879767 - wezterm_gui::notify_on_panic::closure$0
                               at C:\Users\micga\source\wezterm\wezterm-gui\src\main.rs:827
  12:     0x7ff61ca24243 - alloc::boxed::impl$47::call<tuple$<ref$<core::panic::panic_info::PanicInfo> >,dyn$<core::ops::function::Fn<tuple$<ref$<core::panic::panic_info::PanicInfo> >,assoc$<Output,tuple$<> > >,core::marker::Send,core::marker::Sync>,alloc::alloc::Global>
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\alloc\src\boxed.rs:1990
  13:     0x7ff61d7ac261 - env_bootstrap::register_panic_hook::closure$0
                               at C:\Users\micga\source\wezterm\env-bootstrap\src\lib.rs:162
  14:     0x7ff61d61079f - alloc::boxed::impl$47::call
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\alloc\src\boxed.rs:1990
  15:     0x7ff61d61079f - std::panicking::rust_panic_with_hook
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:694
  16:     0x7ff61d6104fe - std::panicking::begin_panic_handler::closure$0
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:581
  17:     0x7ff61d60df69 - std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::closure_env$0,never$>
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\sys_common\backtrace.rs:150
  18:     0x7ff61d610210 - std::panicking::begin_panic_handler
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:577
  19:     0x7ff61fcf0265 - core::panicking::panic_fmt
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\core\src\panicking.rs:67
  20:     0x7ff61fcf0886 - core::result::unwrap_failed
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\core\src\result.rs:1690
  21:     0x7ff61cef8c5d - enum2$<core::result::Result<core::cell::RefMut<window::os::windows::window::WindowInner>,core::cell::BorrowMutError> >::expect<core::cell::RefMut<window::os::windows::window::WindowInner>,core::cell::BorrowMutError>
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\result.rs:1049
  22:     0x7ff61ced7354 - core::cell::RefCell<window::os::windows::window::WindowInner>::borrow_mut<window::os::windows::window::WindowInner>
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\cell.rs:1018
  23:     0x7ff61cec6a39 - window::os::windows::window::wm_nchittest
                               at C:\Users\micga\source\wezterm\window\src\os\windows\window.rs:1098
  24:     0x7ff61cecf99a - window::os::windows::window::do_wnd_proc
                               at C:\Users\micga\source\wezterm\window\src\os\windows\window.rs:2652
  25:     0x7ff61e5becb6 - window::os::windows::window::wnd_proc::closure$0
                               at C:\Users\micga\source\wezterm\window\src\os\windows\window.rs:2717
  26:     0x7ff61f0461f2 - std::panicking::try::do_call<window::os::windows::window::wnd_proc::closure_env$0,isize>
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\panicking.rs:485
  27:     0x7ff61f0473a3 - std::panicking::try::do_catch<core::panic::unwind_safe::AssertUnwindSafe<async_task::raw::impl$3::run::closure_env$1<enum2$<window::os::windows::connection::impl$1::with_window_inner::async_block_env$0<tuple$<>,window::os::windows::window::impl$42::set_in
  28:     0x7ff61f043e3e - std::panicking::try<isize,window::os::windows::window::wnd_proc::closure_env$0>
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\panicking.rs:449
  29:     0x7ff61e5bac01 - std::panic::catch_unwind<window::os::windows::window::wnd_proc::closure_env$0,isize>
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\panic.rs:140
  30:     0x7ff61cecfe46 - window::os::windows::window::wnd_proc
                               at C:\Users\micga\source\wezterm\window\src\os\windows\window.rs:2716
  31:     0x7ffb36119e67 - CallWindowProcW
  32:     0x7ffb36119a56 - CallWindowProcW
  33:     0x7ffb00e7c064 - <unknown>
  34:     0x7ffb36119e67 - CallWindowProcW
  35:     0x7ffb361198ec - CallWindowProcA
  36:     0x7ffb3614c683 - GetAsyncKeyState
  37:     0x7ffb37a54024 - KiUserCallbackDispatcher
  38:     0x7ffb35611234 - NtUserPeekMessage
  39:     0x7ffb361171e6 - PeekMessageW
  40:     0x7ffb3611715a - PeekMessageW
  41:     0x7ffb374a32eb - Ordinal88
  42:     0x7ffb374a2fca - Ordinal88
  43:     0x7ffb374a345f - Ordinal88
  44:     0x7ffb374a4141 - CoUnloadingWOW
  45:     0x7ffb374a3d79 - CoUnloadingWOW
  46:     0x7ffb3743ae2b - WindowsPreallocateStringBuffer
  47:     0x7ffb3743801f - WindowsPreallocateStringBuffer
  48:     0x7ffb37438e21 - WindowsPreallocateStringBuffer
  49:     0x7ffb374386f1 - WindowsPreallocateStringBuffer
  50:     0x7ffb35c4b655 - NdrServerCallNdr64
  51:     0x7ffb37431c76 - WindowsPreallocateStringBuffer
  52:     0x7ffb375f2c72 - ObjectStublessClient32
  53:     0x7ffb37485f69 - WindowsIsStringEmpty
  54:     0x7ffb37484795 - WindowsIsStringEmpty
  55:     0x7ffb37483537 - WindowsIsStringEmpty
  56:     0x7ffb373dcc7b - CoTaskMemAlloc
  57:     0x7ffb3740480d - RoGetActivationFactory
  58:     0x7ffb1bb2c602 - GetRegistryPathDetokenizer
  59:     0x7ffb1bb2b93b - GetRegistryPathDetokenizer
  60:     0x7ffb1bb2e9af - GetRegistryPathDetokenizer
  61:     0x7ffb1bb1a669 - GetRegistryPathDetokenizer
  62:     0x7ffb1baed76b - CreateDesktopAppXActivationInfo
  63:     0x7ffacc32d7c7 - PersistAppExecutionAliasToFileHandleEx
  64:     0x7ffacc326444 - DllGetClassObject
  65:     0x7ffacc324ae5 - DllGetClassObject
  66:     0x7ffacc3295f4 - LoadAppExecutionAliasInfoEx
  67:     0x7ffb34f69463 - FatalAppExitW
  68:     0x7ffb34f69a57 - IsProcessCritical
  69:     0x7ffb34e8c37f - CreateProcessInternalW
  70:     0x7ffb34eb56a6 - CreateProcessW
  71:     0x7ffb360182a4 - CreateProcessW
  72:     0x7ff61d61b6a2 - std::sys::windows::process::Command::spawn
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\sys\windows\process.rs:326
  73:     0x7ff61d60b29b - std::sys::windows::process::Command::output
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\sys\windows\process.rs:352
  74:     0x7ff61d60b29b - std::process::Command::output
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\process.rs:922
  75:     0x7ff61e75169d - config::wsl::WslDistro::load_distro_list
                               at C:\Users\micga\source\wezterm\config\src\wsl.rs:57
  76:     0x7ff61e7511eb - config::wsl::WslDomain::default_domains
                               at C:\Users\micga\source\wezterm\config\src\wsl.rs:24
  77:     0x7ff61d07b0f8 - config::config::_IMPL_FROMDYNAMIC_FOR_Config::impl$0::from_dynamic
                               at C:\Users\micga\source\wezterm\config\src\config.rs:50
  78:     0x7ff61d12d605 - config::lua::config_builder_new_index
                               at C:\Users\micga\source\wezterm\config\src\lua.rs:130
  79:     0x7ff61d118d91 - core::ops::function::Fn::call<enum2$<core::result::Result<tuple$<>,enum2$<mlua::error::Error> > > (*)(ref$<mlua::lua::Lua>,tuple$<mlua::table::Table,alloc::string::String,enum2$<mlua::value::Value> >),tuple$<ref$<mlua::lua::Lua>,tuple$<mlua::table::Table,
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\ops\function.rs:79
  80:     0x7ff61d025f1a - mlua::lua::impl$8::create_function::closure$0<tuple$<mlua::table::Table,alloc::string::String,enum2$<mlua::value::Value> >,tuple$<>,enum2$<core::result::Result<tuple$<>,enum2$<mlua::error::Error> > > (*)(ref$<mlua::lua::Lua>,tuple$<mlua::table::Table,allo
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mlua-0.8.8\src\lua.rs:1584
  81:     0x7ff61d5b033e - mlua::lua::impl$8::create_callback::call_callback::closure$0
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mlua-0.8.8\src\lua.rs:2677
  82:     0x7ff61d5b63b3 - mlua::lua::callback_error_ext::closure$1<mlua::lua::impl$8::create_callback::call_callback::closure_env$0,i32>
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mlua-0.8.8\src\lua.rs:3115
  83:     0x7ff61f4bb020 - core::panic::unwind_safe::impl$23::call_once<enum2$<core::result::Result<i32,enum2$<mlua::error::Error> > >,mlua::lua::callback_error_ext::closure_env$1<mlua::lua::impl$8::create_callback::call_callback::closure_env$0,i32> >
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\panic\unwind_safe.rs:271
  84:     0x7ff61f2f9160 - std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<mlua::lua::callback_error_ext::closure_env$1<mlua::lua::impl$8::create_callback::call_callback::closure_env$0,i32> >,enum2$<core::result::Result<i32,enum2$<mlua::error::Error> > > >
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\panicking.rs:485
  85:     0x7ff61f2f98e3 - std::panicking::try::do_catch<core::panic::unwind_safe::AssertUnwindSafe<std::sys::common::thread_local::fast_local::fast::destroy_value::closure_env$0<core::cell::Cell<tuple$<u64,u64> > > >,tuple$<> >
  86:     0x7ff61f2f8c80 - std::panicking::try<enum2$<core::result::Result<i32,enum2$<mlua::error::Error> > >,core::panic::unwind_safe::AssertUnwindSafe<mlua::lua::callback_error_ext::closure_env$1<mlua::lua::impl$8::create_callback::call_callback::closure_env$0,i32> > >
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\panicking.rs:449
  87:     0x7ff61ec2bab1 - std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<mlua::lua::callback_error_ext::closure_env$1<mlua::lua::impl$8::create_callback::call_callback::closure_env$0,i32> >,enum2$<core::result::Result<i32,enum2$<mlua::error::Error> > > >
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\panic.rs:140
  88:     0x7ff61d5b55a1 - mlua::lua::callback_error_ext<mlua::lua::impl$8::create_callback::call_callback::closure_env$0,i32>
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mlua-0.8.8\src\lua.rs:3115
  89:     0x7ff61d5aff52 - mlua::lua::impl$8::create_callback::call_callback
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mlua-0.8.8\src\lua.rs:2656
  90:     0x7ff61f73bcf2 - precallC
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\ldo.c:506
  91:     0x7ff61f73affe - luaD_precall
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\ldo.c:569
  92:     0x7ff61f73bdec - ccall
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\ldo.c:607
  93:     0x7ff61f743170 - luaV_finishset
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\lvm.c:354
  94:     0x7ff61f743e6e - luaV_execute
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\lvm.c:1168
  95:     0x7ff61f73be05 - ccall
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\ldo.c:609
  96:     0x7ff61f73b913 - luaD_rawrunprotected
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\ldo.c:144
  97:     0x7ff61f73a7be - lua_resume
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\ldo.c:822
  98:     0x7ff61e787bc1 - mlua::thread::Thread::resume<mlua::value::MultiValue,mlua::value::MultiValue>
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mlua-0.8.8\src\thread.rs:136
  99:     0x7ff61e79246d - mlua::thread::impl$5::poll<enum2$<mlua::value::Value> >
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mlua-0.8.8\src\thread.rs:424
 100:     0x7ff61d14b997 - core::future::future::impl$1::poll<alloc::boxed::Box<dyn$<core::future::future::Future<assoc$<Output,enum2$<core::result::Result<enum2$<mlua::value::Value>,enum2$<mlua::error::Error> > > > > >,alloc::alloc::Global> >
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\future\future.rs:125
 101:     0x7ff61e7887de - async_io::driver::block_on<enum2$<core::result::Result<enum2$<mlua::value::Value>,enum2$<mlua::error::Error> > >,core::pin::Pin<alloc::boxed::Box<dyn$<core::future::future::Future<assoc$<Output,enum2$<core::result::Result<enum2$<mlua::value::Value>,enum2$
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\async-io-1.13.0\src\driver.rs:146
 102:     0x7ff61e71a66a - config::config::impl$1::try_load::closure$0
                               at C:\Users\micga\source\wezterm\config\src\config.rs:1012
 103:     0x7ff61e74a95c - enum2$<wezterm_dynamic::error::Error>::capture_warnings<config::config::impl$1::try_load::closure_env$0,enum2$<core::result::Result<config::config::Config,anyhow::Error> > >
                               at C:\Users\micga\source\wezterm\wezterm-dynamic\src\error.rs:102
 104:     0x7ff61d066f1f - config::config::Config::try_load
                               at C:\Users\micga\source\wezterm\config\src\config.rs:1009
 105:     0x7ff61d066103 - config::config::Config::load_with_overrides
                               at C:\Users\micga\source\wezterm\config\src\config.rs:945
 106:     0x7ff61d03393f - config::ConfigInner::overridden
                               at C:\Users\micga\source\wezterm\config\src\lib.rs:612
 107:     0x7ff61d033e60 - config::Configuration::overridden
                               at C:\Users\micga\source\wezterm\config\src\lib.rs:688
 108:     0x7ff61d032166 - config::overridden_config
                               at C:\Users\micga\source\wezterm\config\src\lib.rs:401
 109:     0x7ff61c90f25c - wezterm_gui::termwindow::TermWindow::config_was_reloaded
                               at C:\Users\micga\source\wezterm\wezterm-gui\src\termwindow\mod.rs:1593
 110:     0x7ff61c64e1ee - wezterm_gui::termwindow::impl$4::new_window::async_fn$0::closure$8::closure$0
                               at C:\Users\micga\source\wezterm\wezterm-gui\src\termwindow\mod.rs:817
 111:     0x7ff61c589488 - core::ops::function::FnOnce::call_once<wezterm_gui::termwindow::impl$4::new_window::async_fn$0::closure$8::closure_env$0,tuple$<ref_mut$<wezterm_gui::termwindow::TermWindow> > >
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\ops\function.rs:250
 112:     0x7ff61c444820 - alloc::boxed::impl$45::call_once<tuple$<ref_mut$<wezterm_gui::termwindow::TermWindow> >,dyn$<core::ops::function::FnOnce<tuple$<ref_mut$<wezterm_gui::termwindow::TermWindow> >,assoc$<Output,tuple$<> > >,core::marker::Send,core::marker::Sync>,alloc::alloc:
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\alloc\src\boxed.rs:1976
 113:     0x7ff61c90b18a - wezterm_gui::termwindow::TermWindow::dispatch_notif
                               at C:\Users\micga\source\wezterm\wezterm-gui\src\termwindow\mod.rs:1226
 114:     0x7ff61c909f63 - wezterm_gui::termwindow::TermWindow::dispatch_window_event
                               at C:\Users\micga\source\wezterm\wezterm-gui\src\termwindow\mod.rs:941
 115:     0x7ff61c64dd8a - wezterm_gui::termwindow::impl$4::new_window::async_fn$0::closure$7
                               at C:\Users\micga\source\wezterm\wezterm-gui\src\termwindow\mod.rs:803
 116:     0x7ff61e62c7b5 - alloc::boxed::impl$46::call_mut<tuple$<enum2$<window::WindowEvent>,ref$<window::os::windows::window::Window> >,dyn$<core::ops::function::FnMut<tuple$<enum2$<window::WindowEvent>,ref$<window::os::windows::window::Window> >,assoc$<Output,tuple$<> > > >,allo
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\alloc\src\boxed.rs:1983
 117:     0x7ff61cef2e3d - window::WindowEventSender::dispatch
                               at C:\Users\micga\source\wezterm\window\src\lib.rs:214
 118:     0x7ff61c7577e4 - window::os::windows::window::impl$42::notify::closure$0<enum2$<wezterm_gui::termwindow::TermWindowNotif> >
                               at C:\Users\micga\source\wezterm\window\src\os\windows\window.rs:704
 119:     0x7ff61c49bec6 - window::os::windows::connection::impl$1::with_window_inner::async_block$0<tuple$<>,window::os::windows::window::impl$42::notify::closure_env$0<enum2$<wezterm_gui::termwindow::TermWindowNotif> > >
                               at C:\Users\micga\source\wezterm\window\src\os\windows\connection.rs:269
 120:     0x7ff61c81fbe4 - async_task::raw::RawTask<enum2$<window::os::windows::connection::impl$1::with_window_inner::async_block_env$0<tuple$<>,window::os::windows::window::impl$42::notify::closure_env$0<enum2$<wezterm_gui::termwindow::TermWindowNotif> > > >,tuple$<>,promise::spa
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\async-task-4.4.0\src\raw.rs:563
 121:     0x7ff61d59463c - async_task::runnable::Runnable<tuple$<> >::run<tuple$<> >
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\async-task-4.4.0\src\runnable.rs:782
 122:     0x7ff61e5c270e - window::spawn::schedule_with_pri::closure$0
                               at C:\Users\micga\source\wezterm\window\src\spawn.rs:40
 123:     0x7ff61cee9471 - core::ops::function::FnOnce::call_once<window::spawn::schedule_with_pri::closure_env$0,tuple$<> >
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\ops\function.rs:250
 124:     0x7ff61e5c2638 - alloc::boxed::impl$45::call_once<tuple$<>,dyn$<core::ops::function::FnOnce<tuple$<>,assoc$<Output,tuple$<> > >,core::marker::Send>,alloc::alloc::Global>
                               at C:\Users\micga\source\wezterm\window\src\spawn.rs:121
 126:     0x7ff61ced2c1e - window::spawn::SpawnQueue::run
                               at C:\Users\micga\source\wezterm\window\src\spawn.rs:63
 127:     0x7ff61cedab95 - window::os::windows::connection::impl$0::run_message_loop
                               at C:\Users\micga\source\wezterm\window\src\os\windows\connection.rs:71
 128:     0x7ff61c4ae011 - wezterm_gui::frontend::GuiFrontEnd::run_forever
                               at C:\Users\micga\source\wezterm\wezterm-gui\src\frontend.rs:292
 129:     0x7ff61c632749 - wezterm_gui::run_terminal_gui
                               at C:\Users\micga\source\wezterm\wezterm-gui\src\main.rs:810
 130:     0x7ff61c63acd1 - wezterm_gui::run
                               at C:\Users\micga\source\wezterm\wezterm-gui\src\main.rs:1262
 131:     0x7ff61c63308f - wezterm_gui::main
                               at C:\Users\micga\source\wezterm\wezterm-gui\src\main.rs:856
 132:     0x7ff61c58bd2b - core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\ops\function.rs:250
 133:     0x7ff61c665d7e - std::sys_common::backtrace::__rust_begin_short_backtrace<void (*)(),tuple$<> >
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\sys_common\backtrace.rs:134
 134:     0x7ff61c665d7e - std::sys_common::backtrace::__rust_begin_short_backtrace<void (*)(),tuple$<> >
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\sys_common\backtrace.rs:134
 135:     0x7ff61c6cf2f1 - std::rt::lang_start::closure$0<tuple$<> >
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\rt.rs:166
 136:     0x7ff61d5fd45e - core::ops::function::impls::impl$2::call_once
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\core\src\ops\function.rs:287
 137:     0x7ff61d5fd45e - std::panicking::try::do_call
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:485
 138:     0x7ff61d5fd45e - std::panicking::try
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:449
 139:     0x7ff61d5fd45e - std::panic::catch_unwind
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panic.rs:140
 140:     0x7ff61d5fd45e - std::rt::lang_start_internal::closure$2
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\rt.rs:148
 141:     0x7ff61d5fd45e - std::panicking::try::do_call
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:485
 142:     0x7ff61d5fd45e - std::panicking::try
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:449
 143:     0x7ff61d5fd45e - std::panic::catch_unwind
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panic.rs:140
 144:     0x7ff61d5fd45e - std::rt::lang_start_internal
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\rt.rs:148
 145:     0x7ff61c6cf2ca - std::rt::lang_start<tuple$<> >
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\rt.rs:165
 146:     0x7ff61c63e2f9 - main
 147:     0x7ff61fca873c - invoke_main
                               at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
 148:     0x7ff61fca873c - __scrt_common_main_seh
                               at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
 149:     0x7ffb36003db1 - BaseThreadInitThunk
 150:     0x7ffb379b32a1 - RtlUserThreadStart
11:59:49.193  ERROR  window::os::windows::window > caught Any { .. }
error: process didn't exit successfully: `target\debug\wezterm.exe start` (exit code: 1)

@github-actions github-actions bot removed the waiting-on-op Waiting for more information from the original poster label Apr 7, 2023
@wez
Copy link
Owner

wez commented Apr 7, 2023

Thanks! Can you also share the git hash of the build you were running there?

wez added a commit that referenced this issue Apr 7, 2023
@wez
Copy link
Owner

wez commented Apr 7, 2023

I've pushed a speculative fix for the borrow error

@wez wez added the waiting-on-op Waiting for more information from the original poster label Apr 7, 2023
@micgao
Copy link
Author

micgao commented Apr 8, 2023

Unfortunately, it didn't seem to fix the issue for me. Stack trace above used e3e9821.

I forgot to mention, a previous version I was using (20221119-145034-49b9839f) did not have this issue, and webgpu worked as intended. A quick git bisect points to commit 74dc74b as being the culprit.

Here is the stack trace from the latest 36d5307:

01:44:56.631  ERROR  env_bootstrap > panic at window\src\os\windows\window.rs:1371:31 - !?
   0: backtrace::backtrace::dbghelp::trace
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\backtrace-0.3.67\src\backtrace\dbghelp.rs:98
   1: backtrace::backtrace::trace_unsynchronized<backtrace::capture::impl$1::create::closure_env$0>
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\backtrace-0.3.67\src\backtrace\mod.rs:66
   2: backtrace::backtrace::trace<backtrace::capture::impl$1::create::closure_env$0>
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\backtrace-0.3.67\src\backtrace\mod.rs:53
   3: backtrace::capture::Backtrace::create
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\backtrace-0.3.67\src\capture.rs:176
   4: backtrace::capture::Backtrace::new
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\backtrace-0.3.67\src\capture.rs:140
   5: env_bootstrap::register_panic_hook::closure$0
             at env-bootstrap\src\lib.rs:149
   6: alloc::boxed::impl$47::call
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\alloc\src\boxed.rs:1990
   7: std::panicking::rust_panic_with_hook
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:694
   8: std::panicking::begin_panic_handler::closure$0
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:581
   9: std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::closure_env$0,never$>
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\sys_common\backtrace.rs:150
  10: std::panicking::begin_panic_handler
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:577
  11: core::panicking::panic_fmt
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\core\src\panicking.rs:67
  12: core::result::unwrap_failed
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\core\src\result.rs:1690
  13: enum2$<core::result::Result<core::cell::RefMut<window::os::windows::window::WindowInner>,core::cell::BorrowMutError> >::expect<core::cell::RefMut<window::os::windows::window::WindowInner>,core::cell::BorrowMutError>
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\result.rs:1049
  14: core::cell::RefCell<window::os::windows::window::WindowInner>::borrow_mut<window::os::windows::window::WindowInner>
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\cell.rs:1018
  15: window::os::windows::window::wm_size
             at window\src\os\windows\window.rs:1371
  16: window::os::windows::window::wm_windowposchanged
             at window\src\os\windows\window.rs:1362
  17: window::os::windows::window::do_wnd_proc
             at window\src\os\windows\window.rs:2669
  18: window::os::windows::window::wnd_proc::closure$0
             at window\src\os\windows\window.rs:2731
  19: std::panicking::try::do_call<window::os::windows::window::wnd_proc::closure_env$0,isize>
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\panicking.rs:485
  20: std::panicking::try::do_catch<core::panic::unwind_safe::AssertUnwindSafe<async_task::raw::impl$3::run::closure_env$1<enum2$<window::os::windows::connection::impl$1::with_window_inner::async_block_env$0<tuple$<>,window::os::windows::window::impl$42::set_in
  21: std::panicking::try<isize,window::os::windows::window::wnd_proc::closure_env$0>
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\panicking.rs:449
  22: std::panic::catch_unwind<window::os::windows::window::wnd_proc::closure_env$0,isize>
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\panic.rs:140
  23: window::os::windows::window::wnd_proc
             at window\src\os\windows\window.rs:2730
  24: CallWindowProcW
  25: CallWindowProcW
  26: <unknown>
  27: CallWindowProcW
  28: CallWindowProcA
  29: GetPhysicalCursorPos
  30: KiUserCallbackDispatcher
  31: NtUserPeekMessage
  32: PeekMessageW
  33: PeekMessageW
  34: Ordinal88
  35: Ordinal88
  36: CoUnloadingWOW
  37: CoUnloadingWOW
  38: WindowsPreallocateStringBuffer
  39: WindowsPreallocateStringBuffer
  40: WindowsPreallocateStringBuffer
  41: WindowsPreallocateStringBuffer
  42: NdrServerCallNdr64
  43: WindowsPreallocateStringBuffer
  44: ObjectStublessClient32
  45: WindowsIsStringEmpty
  46: WindowsIsStringEmpty
  47: WindowsIsStringEmpty
  48: CoTaskMemAlloc
  49: RoGetActivationFactory
  50: GetRegistryPathDetokenizer
  51: GetRegistryPathDetokenizer
  52: GetRegistryPathDetokenizer
  53: GetRegistryPathDetokenizer
  54: CreateDesktopAppXActivationInfo
  55: PersistAppExecutionAliasToFileHandleEx
  56: DllGetClassObject
  57: DllGetClassObject
  58: LoadAppExecutionAliasInfoEx
  59: FatalAppExitW
  60: IsProcessCritical
  61: CreateProcessInternalW
  62: CreateProcessW
  63: CreateProcessW
  64: std::sys::windows::process::Command::spawn
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\sys\windows\process.rs:326
  65: std::sys::windows::process::Command::output
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\sys\windows\process.rs:352
  66: std::process::Command::output
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\process.rs:922
  67: config::wsl::WslDistro::load_distro_list
             at config\src\wsl.rs:57
  68: config::wsl::WslDomain::default_domains
             at config\src\wsl.rs:24
  69: config::config::_IMPL_FROMDYNAMIC_FOR_Config::impl$0::from_dynamic
             at config\src\config.rs:50
  70: config::lua::config_builder_new_index
             at config\src\lua.rs:130
  71: core::ops::function::Fn::call<enum2$<core::result::Result<tuple$<>,enum2$<mlua::error::Error> > > (*)(ref$<mlua::lua::Lua>,tuple$<mlua::table::Table,alloc::string::String,enum2$<mlua::value::Value> >),tuple$<ref$<mlua::lua::Lua>,tuple$<mlua::table::Table,
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\ops\function.rs:79
  72: mlua::lua::impl$8::create_function::closure$0<tuple$<mlua::table::Table,alloc::string::String,enum2$<mlua::value::Value> >,tuple$<>,enum2$<core::result::Result<tuple$<>,enum2$<mlua::error::Error> > > (*)(ref$<mlua::lua::Lua>,tuple$<mlua::table::Table,allo
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mlua-0.8.8\src\lua.rs:1584
  73: mlua::lua::impl$8::create_callback::call_callback::closure$0
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mlua-0.8.8\src\lua.rs:2677
  74: mlua::lua::callback_error_ext::closure$1<mlua::lua::impl$8::create_callback::call_callback::closure_env$0,i32>
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mlua-0.8.8\src\lua.rs:3115
  75: core::panic::unwind_safe::impl$23::call_once<enum2$<core::result::Result<i32,enum2$<mlua::error::Error> > >,mlua::lua::callback_error_ext::closure_env$1<mlua::lua::impl$8::create_callback::call_callback::closure_env$0,i32> >
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\panic\unwind_safe.rs:271
  76: std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<mlua::lua::callback_error_ext::closure_env$1<mlua::lua::impl$8::create_callback::call_callback::closure_env$0,i32> >,enum2$<core::result::Result<i32,enum2$<mlua::error::Error> > > >
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\panicking.rs:485
  77: std::panicking::try::do_catch<core::panic::unwind_safe::AssertUnwindSafe<std::sys::common::thread_local::fast_local::fast::destroy_value::closure_env$0<core::cell::Cell<tuple$<u64,u64> > > >,tuple$<> >
  78: std::panicking::try<enum2$<core::result::Result<i32,enum2$<mlua::error::Error> > >,core::panic::unwind_safe::AssertUnwindSafe<mlua::lua::callback_error_ext::closure_env$1<mlua::lua::impl$8::create_callback::call_callback::closure_env$0,i32> > >
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\panicking.rs:449
  79: std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<mlua::lua::callback_error_ext::closure_env$1<mlua::lua::impl$8::create_callback::call_callback::closure_env$0,i32> >,enum2$<core::result::Result<i32,enum2$<mlua::error::Error> > > >
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\panic.rs:140
  80: mlua::lua::callback_error_ext<mlua::lua::impl$8::create_callback::call_callback::closure_env$0,i32>
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mlua-0.8.8\src\lua.rs:3115
  81: mlua::lua::impl$8::create_callback::call_callback
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mlua-0.8.8\src\lua.rs:2656
  82: precallC
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\ldo.c:506
  83: luaD_precall
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\ldo.c:569
  84: ccall
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\ldo.c:607
  85: luaV_finishset
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\lvm.c:354
  86: luaV_execute
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\lvm.c:1168
  87: ccall
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\ldo.c:609
  88: luaD_rawrunprotected
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\ldo.c:144
  89: lua_resume
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\ldo.c:822
  90: mlua::thread::Thread::resume<mlua::value::MultiValue,mlua::value::MultiValue>
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mlua-0.8.8\src\thread.rs:136
  91: mlua::thread::impl$5::poll<enum2$<mlua::value::Value> >
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mlua-0.8.8\src\thread.rs:424
  92: core::future::future::impl$1::poll<alloc::boxed::Box<dyn$<core::future::future::Future<assoc$<Output,enum2$<core::result::Result<enum2$<mlua::value::Value>,enum2$<mlua::error::Error> > > > > >,alloc::alloc::Global> >
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\future\future.rs:125
  93: async_io::driver::block_on<enum2$<core::result::Result<enum2$<mlua::value::Value>,enum2$<mlua::error::Error> > >,core::pin::Pin<alloc::boxed::Box<dyn$<core::future::future::Future<assoc$<Output,enum2$<core::result::Result<enum2$<mlua::value::Value>,enum2$
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\async-io-1.13.0\src\driver.rs:146
  94: config::config::impl$1::try_load::closure$0
             at config\src\config.rs:1012
  95: enum2$<wezterm_dynamic::error::Error>::capture_warnings<config::config::impl$1::try_load::closure_env$0,enum2$<core::result::Result<config::config::Config,anyhow::Error> > >
             at wezterm-dynamic\src\error.rs:102
  96: config::config::Config::try_load
             at config\src\config.rs:1009
  97: config::config::Config::load_with_overrides
             at config\src\config.rs:945
  98: config::ConfigInner::overridden
             at config\src\lib.rs:612
  99: config::Configuration::overridden
             at config\src\lib.rs:688
 100: config::overridden_config
             at config\src\lib.rs:401
 101: wezterm_gui::termwindow::TermWindow::config_was_reloaded
             at wezterm-gui\src\termwindow\mod.rs:1593
 102: wezterm_gui::termwindow::impl$4::new_window::async_fn$0::closure$8::closure$0
             at wezterm-gui\src\termwindow\mod.rs:817
 103: core::ops::function::FnOnce::call_once<wezterm_gui::termwindow::impl$4::new_window::async_fn$0::closure$8::closure_env$0,tuple$<ref_mut$<wezterm_gui::termwindow::TermWindow> > >
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\ops\function.rs:250
 104: alloc::boxed::impl$45::call_once<tuple$<ref_mut$<wezterm_gui::termwindow::TermWindow> >,dyn$<core::ops::function::FnOnce<tuple$<ref_mut$<wezterm_gui::termwindow::TermWindow> >,assoc$<Output,tuple$<> > >,core::marker::Send,core::marker::Sync>,alloc::alloc:
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\alloc\src\boxed.rs:1976
 105: wezterm_gui::termwindow::TermWindow::dispatch_notif
             at wezterm-gui\src\termwindow\mod.rs:1226
 106: wezterm_gui::termwindow::TermWindow::dispatch_window_event
             at wezterm-gui\src\termwindow\mod.rs:941
 107: wezterm_gui::termwindow::impl$4::new_window::async_fn$0::closure$7
             at wezterm-gui\src\termwindow\mod.rs:803
 108: alloc::boxed::impl$46::call_mut<tuple$<enum2$<window::WindowEvent>,ref$<window::os::windows::window::Window> >,dyn$<core::ops::function::FnMut<tuple$<enum2$<window::WindowEvent>,ref$<window::os::windows::window::Window> >,assoc$<Output,tuple$<> > > >,allo
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\alloc\src\boxed.rs:1983
 109: window::WindowEventSender::dispatch
             at window\src\lib.rs:214
 110: window::os::windows::window::impl$42::notify::closure$0<enum2$<wezterm_gui::termwindow::TermWindowNotif> >
             at window\src\os\windows\window.rs:704
 111: window::os::windows::connection::impl$1::with_window_inner::async_block$0<tuple$<>,window::os::windows::window::impl$42::notify::closure_env$0<enum2$<wezterm_gui::termwindow::TermWindowNotif> > >
             at window\src\os\windows\connection.rs:269
 112: async_task::raw::RawTask<enum2$<window::os::windows::connection::impl$1::with_window_inner::async_block_env$0<tuple$<>,window::os::windows::window::impl$42::notify::closure_env$0<enum2$<wezterm_gui::termwindow::TermWindowNotif> > > >,tuple$<>,promise::spa
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\async-task-4.4.0\src\raw.rs:563
 113: async_task::runnable::Runnable<tuple$<> >::run<tuple$<> >
             at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\async-task-4.4.0\src\runnable.rs:782
 114: window::spawn::schedule_with_pri::closure$0
             at window\src\spawn.rs:40
 115: core::ops::function::FnOnce::call_once<window::spawn::schedule_with_pri::closure_env$0,tuple$<> >
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\ops\function.rs:250
 116: alloc::boxed::impl$45::call_once<tuple$<>,dyn$<core::ops::function::FnOnce<tuple$<>,assoc$<Output,tuple$<> > >,core::marker::Send>,alloc::alloc::Global>
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\alloc\src\boxed.rs:1976
 117: window::spawn::SpawnQueue::run_impl
             at window\src\spawn.rs:121
 118: window::spawn::SpawnQueue::run
             at window\src\spawn.rs:63
 119: window::os::windows::connection::impl$0::run_message_loop
             at window\src\os\windows\connection.rs:71
 120: wezterm_gui::frontend::GuiFrontEnd::run_forever
             at wezterm-gui\src\frontend.rs:292
 121: wezterm_gui::run_terminal_gui
             at wezterm-gui\src\main.rs:810
 122: wezterm_gui::run
             at wezterm-gui\src\main.rs:1262
 123: wezterm_gui::main
             at wezterm-gui\src\main.rs:856
 124: core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\ops\function.rs:250
 125: std::sys_common::backtrace::__rust_begin_short_backtrace<void (*)(),tuple$<> >
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\sys_common\backtrace.rs:134
 126: std::sys_common::backtrace::__rust_begin_short_backtrace<void (*)(),tuple$<> >
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\sys_common\backtrace.rs:134
 127: std::rt::lang_start::closure$0<tuple$<> >
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\rt.rs:166
 128: core::ops::function::impls::impl$2::call_once
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\core\src\ops\function.rs:287
 129: std::panicking::try::do_call
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:485
 130: std::panicking::try
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:449
 131: std::panic::catch_unwind
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panic.rs:140
 132: std::rt::lang_start_internal::closure$2
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\rt.rs:148
 133: std::panicking::try::do_call
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:485
 134: std::panicking::try
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:449
 135: std::panic::catch_unwind
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panic.rs:140
 136: std::rt::lang_start_internal
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\rt.rs:148
 137: std::rt::lang_start<tuple$<> >
             at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\rt.rs:165
 138: main
 139: invoke_main
             at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
 140: __scrt_common_main_seh
             at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
 141: BaseThreadInitThunk
 142: RtlUserThreadStart

thread 'main' panicked at 'already borrowed: BorrowMutError', window\src\os\windows\window.rs:1371:31
stack backtrace:
   0:     0x7ff64323d362 - std::backtrace_rs::backtrace::dbghelp::trace
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\..\..\backtrace\src\backtrace\dbghelp.rs:98
   1:     0x7ff64323d362 - std::backtrace_rs::backtrace::trace_unsynchronized
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
   2:     0x7ff64323d362 - std::sys_common::backtrace::_print_fmt
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\sys_common\backtrace.rs:65
   3:     0x7ff64323d362 - std::sys_common::backtrace::_print::impl$0::fmt
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\sys_common\backtrace.rs:44
   4:     0x7ff64325fb3b - core::fmt::write
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\core\src\fmt\mod.rs:1254
   5:     0x7ff64323628a - std::io::Write::write_fmt<std::sys::windows::stdio::Stderr>
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\io\mod.rs:1698
   6:     0x7ff64323d0ab - std::sys_common::backtrace::_print
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\sys_common\backtrace.rs:47
   7:     0x7ff64323d0ab - std::sys_common::backtrace::print
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\sys_common\backtrace.rs:34
   8:     0x7ff64323ffca - std::panicking::default_hook::closure$1
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:269
   9:     0x7ff64323fc30 - std::panicking::default_hook
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:288
  10:     0x7ff642654243 - alloc::boxed::impl$47::call<tuple$<ref$<core::panic::panic_info::PanicInfo> >,dyn$<core::ops::function::Fn<tuple$<ref$<core::panic::panic_info::PanicInfo> >,assoc$<Output,tuple$<> > >,core::marker::Send,core::marker::Sync>,alloc::alloc::Global>
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\alloc\src\boxed.rs:1990
  11:     0x7ff6424a9767 - wezterm_gui::notify_on_panic::closure$0
                               at C:\Users\micga\source\wezterm\wezterm-gui\src\main.rs:827
  12:     0x7ff642654243 - alloc::boxed::impl$47::call<tuple$<ref$<core::panic::panic_info::PanicInfo> >,dyn$<core::ops::function::Fn<tuple$<ref$<core::panic::panic_info::PanicInfo> >,assoc$<Output,tuple$<> > >,core::marker::Send,core::marker::Sync>,alloc::alloc::Global>
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\alloc\src\boxed.rs:1990
  13:     0x7ff6433dc301 - env_bootstrap::register_panic_hook::closure$0
                               at C:\Users\micga\source\wezterm\env-bootstrap\src\lib.rs:162
  14:     0x7ff64324083f - alloc::boxed::impl$47::call
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\alloc\src\boxed.rs:1990
  15:     0x7ff64324083f - std::panicking::rust_panic_with_hook
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:694
  16:     0x7ff64324059e - std::panicking::begin_panic_handler::closure$0
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:581
  17:     0x7ff64323e009 - std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::closure_env$0,never$>
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\sys_common\backtrace.rs:150
  18:     0x7ff6432402b0 - std::panicking::begin_panic_handler
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:577
  19:     0x7ff6459202e5 - core::panicking::panic_fmt
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\core\src\panicking.rs:67
  20:     0x7ff645920906 - core::result::unwrap_failed
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\core\src\result.rs:1690
  21:     0x7ff642b28cfd - enum2$<core::result::Result<core::cell::RefMut<window::os::windows::window::WindowInner>,core::cell::BorrowMutError> >::expect<core::cell::RefMut<window::os::windows::window::WindowInner>,core::cell::BorrowMutError>
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\result.rs:1049
  22:     0x7ff642b073f4 - core::cell::RefCell<window::os::windows::window::WindowInner>::borrow_mut<window::os::windows::window::WindowInner>
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\cell.rs:1018
  23:     0x7ff642af7edd - window::os::windows::window::wm_size
                               at C:\Users\micga\source\wezterm\window\src\os\windows\window.rs:1371
  24:     0x7ff642af7df4 - window::os::windows::window::wm_windowposchanged
                               at C:\Users\micga\source\wezterm\window\src\os\windows\window.rs:1362
  25:     0x7ff642affa9d - window::os::windows::window::do_wnd_proc
                               at C:\Users\micga\source\wezterm\window\src\os\windows\window.rs:2669
  26:     0x7ff6441eed56 - window::os::windows::window::wnd_proc::closure$0
                               at C:\Users\micga\source\wezterm\window\src\os\windows\window.rs:2731
  27:     0x7ff644c76292 - std::panicking::try::do_call<window::os::windows::window::wnd_proc::closure_env$0,isize>
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\panicking.rs:485
  28:     0x7ff644c77443 - std::panicking::try::do_catch<core::panic::unwind_safe::AssertUnwindSafe<async_task::raw::impl$3::run::closure_env$1<enum2$<window::os::windows::connection::impl$1::with_window_inner::async_block_env$0<tuple$<>,window::os::windows::window::impl$42::set_in
  29:     0x7ff644c73ede - std::panicking::try<isize,window::os::windows::window::wnd_proc::closure_env$0>
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\panicking.rs:449
  30:     0x7ff6441eaca1 - std::panic::catch_unwind<window::os::windows::window::wnd_proc::closure_env$0,isize>
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\panic.rs:140
  31:     0x7ff642affee6 - window::os::windows::window::wnd_proc
                               at C:\Users\micga\source\wezterm\window\src\os\windows\window.rs:2730
  32:     0x7ffb36119e67 - CallWindowProcW
  33:     0x7ffb36119a56 - CallWindowProcW
  34:     0x7ffb0065c064 - <unknown>
  35:     0x7ffb36119e67 - CallWindowProcW
  36:     0x7ffb361198ec - CallWindowProcA
  37:     0x7ffb36157790 - GetPhysicalCursorPos
  38:     0x7ffb37a54024 - KiUserCallbackDispatcher
  39:     0x7ffb35611234 - NtUserPeekMessage
  40:     0x7ffb361171e6 - PeekMessageW
  41:     0x7ffb3611715a - PeekMessageW
  42:     0x7ffb374a32eb - Ordinal88
  43:     0x7ffb374a3264 - Ordinal88
  44:     0x7ffb374a4153 - CoUnloadingWOW
  45:     0x7ffb374a3d79 - CoUnloadingWOW
  46:     0x7ffb3743ae2b - WindowsPreallocateStringBuffer
  47:     0x7ffb3743801f - WindowsPreallocateStringBuffer
  48:     0x7ffb37438e21 - WindowsPreallocateStringBuffer
  49:     0x7ffb374386f1 - WindowsPreallocateStringBuffer
  50:     0x7ffb35c4b655 - NdrServerCallNdr64
  51:     0x7ffb37431c76 - WindowsPreallocateStringBuffer
  52:     0x7ffb375f2c72 - ObjectStublessClient32
  53:     0x7ffb37485f69 - WindowsIsStringEmpty
  54:     0x7ffb37484795 - WindowsIsStringEmpty
  55:     0x7ffb37483537 - WindowsIsStringEmpty
  56:     0x7ffb373dcc7b - CoTaskMemAlloc
  57:     0x7ffb3740480d - RoGetActivationFactory
  58:     0x7ffb1bb2c602 - GetRegistryPathDetokenizer
  59:     0x7ffb1bb2b93b - GetRegistryPathDetokenizer
  60:     0x7ffb1bb2e9af - GetRegistryPathDetokenizer
  61:     0x7ffb1bb1a669 - GetRegistryPathDetokenizer
  62:     0x7ffb1baed76b - CreateDesktopAppXActivationInfo
  63:     0x7ffacc32d7c7 - PersistAppExecutionAliasToFileHandleEx
  64:     0x7ffacc326444 - DllGetClassObject
  65:     0x7ffacc324ae5 - DllGetClassObject
  66:     0x7ffacc3295f4 - LoadAppExecutionAliasInfoEx
  67:     0x7ffb34f69463 - FatalAppExitW
  68:     0x7ffb34f69a57 - IsProcessCritical
  69:     0x7ffb34e8c37f - CreateProcessInternalW
  70:     0x7ffb34eb56a6 - CreateProcessW
  71:     0x7ffb360182a4 - CreateProcessW
  72:     0x7ff64324b742 - std::sys::windows::process::Command::spawn
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\sys\windows\process.rs:326
  73:     0x7ff64323b33b - std::sys::windows::process::Command::output
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\sys\windows\process.rs:352
  74:     0x7ff64323b33b - std::process::Command::output
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\process.rs:922
  75:     0x7ff64438173d - config::wsl::WslDistro::load_distro_list
                               at C:\Users\micga\source\wezterm\config\src\wsl.rs:57
  76:     0x7ff64438128b - config::wsl::WslDomain::default_domains
                               at C:\Users\micga\source\wezterm\config\src\wsl.rs:24
  77:     0x7ff642cab198 - config::config::_IMPL_FROMDYNAMIC_FOR_Config::impl$0::from_dynamic
                               at C:\Users\micga\source\wezterm\config\src\config.rs:50
  78:     0x7ff642d5d6a5 - config::lua::config_builder_new_index
                               at C:\Users\micga\source\wezterm\config\src\lua.rs:130
  79:     0x7ff642d48e31 - core::ops::function::Fn::call<enum2$<core::result::Result<tuple$<>,enum2$<mlua::error::Error> > > (*)(ref$<mlua::lua::Lua>,tuple$<mlua::table::Table,alloc::string::String,enum2$<mlua::value::Value> >),tuple$<ref$<mlua::lua::Lua>,tuple$<mlua::table::Table,
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\ops\function.rs:79
  80:     0x7ff642c55fba - mlua::lua::impl$8::create_function::closure$0<tuple$<mlua::table::Table,alloc::string::String,enum2$<mlua::value::Value> >,tuple$<>,enum2$<core::result::Result<tuple$<>,enum2$<mlua::error::Error> > > (*)(ref$<mlua::lua::Lua>,tuple$<mlua::table::Table,allo
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mlua-0.8.8\src\lua.rs:1584
  81:     0x7ff6431e03de - mlua::lua::impl$8::create_callback::call_callback::closure$0
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mlua-0.8.8\src\lua.rs:2677
  82:     0x7ff6431e6453 - mlua::lua::callback_error_ext::closure$1<mlua::lua::impl$8::create_callback::call_callback::closure_env$0,i32>
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mlua-0.8.8\src\lua.rs:3115
  83:     0x7ff6450eb0a0 - core::panic::unwind_safe::impl$23::call_once<enum2$<core::result::Result<i32,enum2$<mlua::error::Error> > >,mlua::lua::callback_error_ext::closure_env$1<mlua::lua::impl$8::create_callback::call_callback::closure_env$0,i32> >
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\panic\unwind_safe.rs:271
  84:     0x7ff644f29200 - std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<mlua::lua::callback_error_ext::closure_env$1<mlua::lua::impl$8::create_callback::call_callback::closure_env$0,i32> >,enum2$<core::result::Result<i32,enum2$<mlua::error::Error> > > >
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\panicking.rs:485
  85:     0x7ff644f29983 - std::panicking::try::do_catch<core::panic::unwind_safe::AssertUnwindSafe<std::sys::common::thread_local::fast_local::fast::destroy_value::closure_env$0<core::cell::Cell<tuple$<u64,u64> > > >,tuple$<> >
  86:     0x7ff644f28d20 - std::panicking::try<enum2$<core::result::Result<i32,enum2$<mlua::error::Error> > >,core::panic::unwind_safe::AssertUnwindSafe<mlua::lua::callback_error_ext::closure_env$1<mlua::lua::impl$8::create_callback::call_callback::closure_env$0,i32> > >
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\panicking.rs:449
  87:     0x7ff64485bb51 - std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<mlua::lua::callback_error_ext::closure_env$1<mlua::lua::impl$8::create_callback::call_callback::closure_env$0,i32> >,enum2$<core::result::Result<i32,enum2$<mlua::error::Error> > > >
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\panic.rs:140
  88:     0x7ff6431e5641 - mlua::lua::callback_error_ext<mlua::lua::impl$8::create_callback::call_callback::closure_env$0,i32>
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mlua-0.8.8\src\lua.rs:3115
  89:     0x7ff6431dfff2 - mlua::lua::impl$8::create_callback::call_callback
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mlua-0.8.8\src\lua.rs:2656
  90:     0x7ff64536bd72 - precallC
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\ldo.c:506
  91:     0x7ff64536b07e - luaD_precall
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\ldo.c:569
  92:     0x7ff64536be6c - ccall
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\ldo.c:607
  93:     0x7ff6453731f0 - luaV_finishset
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\lvm.c:354
  94:     0x7ff645373eee - luaV_execute
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\lvm.c:1168
  95:     0x7ff64536be85 - ccall
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\ldo.c:609
  96:     0x7ff64536b993 - luaD_rawrunprotected
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\ldo.c:144
  97:     0x7ff64536a83e - lua_resume
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lua-src-544.0.1\lua-5.4.4\ldo.c:822
  98:     0x7ff6443b7c61 - mlua::thread::Thread::resume<mlua::value::MultiValue,mlua::value::MultiValue>
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mlua-0.8.8\src\thread.rs:136
  99:     0x7ff6443c250d - mlua::thread::impl$5::poll<enum2$<mlua::value::Value> >
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mlua-0.8.8\src\thread.rs:424
 100:     0x7ff642d7ba37 - core::future::future::impl$1::poll<alloc::boxed::Box<dyn$<core::future::future::Future<assoc$<Output,enum2$<core::result::Result<enum2$<mlua::value::Value>,enum2$<mlua::error::Error> > > > > >,alloc::alloc::Global> >
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\future\future.rs:125
 101:     0x7ff6443b887e - async_io::driver::block_on<enum2$<core::result::Result<enum2$<mlua::value::Value>,enum2$<mlua::error::Error> > >,core::pin::Pin<alloc::boxed::Box<dyn$<core::future::future::Future<assoc$<Output,enum2$<core::result::Result<enum2$<mlua::value::Value>,enum2$
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\async-io-1.13.0\src\driver.rs:146
 102:     0x7ff64434a70a - config::config::impl$1::try_load::closure$0
                               at C:\Users\micga\source\wezterm\config\src\config.rs:1012
 103:     0x7ff64437a9fc - enum2$<wezterm_dynamic::error::Error>::capture_warnings<config::config::impl$1::try_load::closure_env$0,enum2$<core::result::Result<config::config::Config,anyhow::Error> > >
                               at C:\Users\micga\source\wezterm\wezterm-dynamic\src\error.rs:102
 104:     0x7ff642c96fbf - config::config::Config::try_load
                               at C:\Users\micga\source\wezterm\config\src\config.rs:1009
 105:     0x7ff642c961a3 - config::config::Config::load_with_overrides
                               at C:\Users\micga\source\wezterm\config\src\config.rs:945
 106:     0x7ff642c639df - config::ConfigInner::overridden
                               at C:\Users\micga\source\wezterm\config\src\lib.rs:612
 107:     0x7ff642c63f00 - config::Configuration::overridden
                               at C:\Users\micga\source\wezterm\config\src\lib.rs:688
 108:     0x7ff642c62206 - config::overridden_config
                               at C:\Users\micga\source\wezterm\config\src\lib.rs:401
 109:     0x7ff64253f25c - wezterm_gui::termwindow::TermWindow::config_was_reloaded
                               at C:\Users\micga\source\wezterm\wezterm-gui\src\termwindow\mod.rs:1593
 110:     0x7ff64227e1ee - wezterm_gui::termwindow::impl$4::new_window::async_fn$0::closure$8::closure$0
                               at C:\Users\micga\source\wezterm\wezterm-gui\src\termwindow\mod.rs:817
 111:     0x7ff6421b9488 - core::ops::function::FnOnce::call_once<wezterm_gui::termwindow::impl$4::new_window::async_fn$0::closure$8::closure_env$0,tuple$<ref_mut$<wezterm_gui::termwindow::TermWindow> > >
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\ops\function.rs:250
 112:     0x7ff642074820 - alloc::boxed::impl$45::call_once<tuple$<ref_mut$<wezterm_gui::termwindow::TermWindow> >,dyn$<core::ops::function::FnOnce<tuple$<ref_mut$<wezterm_gui::termwindow::TermWindow> >,assoc$<Output,tuple$<> > >,core::marker::Send,core::marker::Sync>,alloc::alloc:
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\alloc\src\boxed.rs:1976
 113:     0x7ff64253b18a - wezterm_gui::termwindow::TermWindow::dispatch_notif
                               at C:\Users\micga\source\wezterm\wezterm-gui\src\termwindow\mod.rs:1226
 114:     0x7ff642539f63 - wezterm_gui::termwindow::TermWindow::dispatch_window_event
                               at C:\Users\micga\source\wezterm\wezterm-gui\src\termwindow\mod.rs:941
 115:     0x7ff64227dd8a - wezterm_gui::termwindow::impl$4::new_window::async_fn$0::closure$7
                               at C:\Users\micga\source\wezterm\wezterm-gui\src\termwindow\mod.rs:803
 116:     0x7ff64425c855 - alloc::boxed::impl$46::call_mut<tuple$<enum2$<window::WindowEvent>,ref$<window::os::windows::window::Window> >,dyn$<core::ops::function::FnMut<tuple$<enum2$<window::WindowEvent>,ref$<window::os::windows::window::Window> >,assoc$<Output,tuple$<> > > >,allo
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\alloc\src\boxed.rs:1983
 117:     0x7ff642b22edd - window::WindowEventSender::dispatch
                               at C:\Users\micga\source\wezterm\window\src\lib.rs:214
 118:     0x7ff6423877e4 - window::os::windows::window::impl$42::notify::closure$0<enum2$<wezterm_gui::termwindow::TermWindowNotif> >
                               at C:\Users\micga\source\wezterm\window\src\os\windows\window.rs:704
 119:     0x7ff6420cbec6 - window::os::windows::connection::impl$1::with_window_inner::async_block$0<tuple$<>,window::os::windows::window::impl$42::notify::closure_env$0<enum2$<wezterm_gui::termwindow::TermWindowNotif> > >
                               at C:\Users\micga\source\wezterm\window\src\os\windows\connection.rs:269
 120:     0x7ff64244fbe4 - async_task::raw::RawTask<enum2$<window::os::windows::connection::impl$1::with_window_inner::async_block_env$0<tuple$<>,window::os::windows::window::impl$42::notify::closure_env$0<enum2$<wezterm_gui::termwindow::TermWindowNotif> > > >,tuple$<>,promise::spa
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\async-task-4.4.0\src\raw.rs:563
 121:     0x7ff6431c46dc - async_task::runnable::Runnable<tuple$<> >::run<tuple$<> >
                               at C:\Users\micga\.cargo\registry\src\index.crates.io-6f17d22bba15001f\async-task-4.4.0\src\runnable.rs:782
 122:     0x7ff6441f27ae - window::spawn::schedule_with_pri::closure$0
                               at C:\Users\micga\source\wezterm\window\src\spawn.rs:40
 123:     0x7ff642b19511 - core::ops::function::FnOnce::call_once<window::spawn::schedule_with_pri::closure_env$0,tuple$<> >
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\ops\function.rs:250
 124:     0x7ff6441f26d8 - alloc::boxed::impl$45::call_once<tuple$<>,dyn$<core::ops::function::FnOnce<tuple$<>,assoc$<Output,tuple$<> > >,core::marker::Send>,alloc::alloc::Global>
                               at C:\Users\micga\source\wezterm\window\src\spawn.rs:121
 126:     0x7ff642b02cbe - window::spawn::SpawnQueue::run
                               at C:\Users\micga\source\wezterm\window\src\spawn.rs:63
 127:     0x7ff642b0ac35 - window::os::windows::connection::impl$0::run_message_loop
                               at C:\Users\micga\source\wezterm\window\src\os\windows\connection.rs:71
 128:     0x7ff6420de011 - wezterm_gui::frontend::GuiFrontEnd::run_forever
                               at C:\Users\micga\source\wezterm\wezterm-gui\src\frontend.rs:292
 129:     0x7ff642262749 - wezterm_gui::run_terminal_gui
                               at C:\Users\micga\source\wezterm\wezterm-gui\src\main.rs:810
 130:     0x7ff64226acd1 - wezterm_gui::run
                               at C:\Users\micga\source\wezterm\wezterm-gui\src\main.rs:1262
 131:     0x7ff64226308f - wezterm_gui::main
                               at C:\Users\micga\source\wezterm\wezterm-gui\src\main.rs:856
 132:     0x7ff6421bbd2b - core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\core\src\ops\function.rs:250
 133:     0x7ff642295d7e - std::sys_common::backtrace::__rust_begin_short_backtrace<void (*)(),tuple$<> >
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\sys_common\backtrace.rs:134
 134:     0x7ff642295d7e - std::sys_common::backtrace::__rust_begin_short_backtrace<void (*)(),tuple$<> >
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\sys_common\backtrace.rs:134
 135:     0x7ff6422ff2f1 - std::rt::lang_start::closure$0<tuple$<> >
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\rt.rs:166
 136:     0x7ff64322d4fe - core::ops::function::impls::impl$2::call_once
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\core\src\ops\function.rs:287
 137:     0x7ff64322d4fe - std::panicking::try::do_call
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:485
 138:     0x7ff64322d4fe - std::panicking::try
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:449
 139:     0x7ff64322d4fe - std::panic::catch_unwind
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panic.rs:140
 140:     0x7ff64322d4fe - std::rt::lang_start_internal::closure$2
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\rt.rs:148
 141:     0x7ff64322d4fe - std::panicking::try::do_call
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:485
 142:     0x7ff64322d4fe - std::panicking::try
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panicking.rs:449
 143:     0x7ff64322d4fe - std::panic::catch_unwind
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\panic.rs:140
 144:     0x7ff64322d4fe - std::rt::lang_start_internal
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library\std\src\rt.rs:148
 145:     0x7ff6422ff2ca - std::rt::lang_start<tuple$<> >
                               at /rustc/0599b6b931816ab46ab79072189075f543931cbd\library\std\src\rt.rs:165
 146:     0x7ff64226e2f9 - main
 147:     0x7ff6458d87bc - invoke_main
                               at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
 148:     0x7ff6458d87bc - __scrt_common_main_seh
                               at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
 149:     0x7ffb36003db1 - BaseThreadInitThunk
 150:     0x7ffb379b32a1 - RtlUserThreadStart
01:44:56.973  ERROR  window::os::windows::window > caught Any { .. }
error: process didn't exit successfully: `target\debug\wezterm.exe start` (exit code: 1)

@github-actions github-actions bot removed the waiting-on-op Waiting for more information from the original poster label Apr 8, 2023
wez added a commit that referenced this issue Apr 8, 2023
The stack trace in #3425
shows a recursive borrow triggered indirectly by spawning
a subprocess and having that trigger the wndproc.

This commit doesn't really fix the recursive problem, but may
sidestep it, and it's probably best to avoid always running
the `wsl` command to get this list anyway, similar to the
change in 25255d9

refs: #3425
@wez
Copy link
Owner

wez commented Apr 8, 2023

What's weird is that those panic traces are completely unrelated to webgpu; there's some kind of recursive call to the window proc being triggered as a side effect of the config stuff spawning the wsl command to find the default list of wsl domains.

I've pushed a commit that should avoid doing that work until needed, which should hopefully help!

@wez wez added the waiting-on-op Waiting for more information from the original poster label Apr 8, 2023
@micgao
Copy link
Author

micgao commented Apr 10, 2023

Unfortunately, it didn't seem to fix the issue.

However, I had some time to look into it today, and it seems like reverting the changes made in 74dc74b (basically going back to using 0.14 rather than 0.15 of the wgpu crate, as the changes were mostly connected to that) completely solves everything. Tried building and running on top of the latest commit with no problem.

@github-actions github-actions bot removed the waiting-on-op Waiting for more information from the original poster label Apr 10, 2023
@wez
Copy link
Owner

wez commented Apr 10, 2023

Reverting back to 0.14 is not an option. Is there a revised stack trace on the latest nightly?

@wez wez added the waiting-on-op Waiting for more information from the original poster label Apr 10, 2023
@micgao
Copy link
Author

micgao commented Apr 15, 2023

On the latest nightly, when I try to run, this is all I get:

RUST_BACKTRACE=full cargo run --bin wezterm -- start                                                                                                                                               at 18:34:14
    Finished dev [unoptimized + debuginfo] target(s) in 1.02s
     Running `target\debug\wezterm.exe start`
error: process didn't exit successfully: `target\debug\wezterm.exe start` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)

Windows did generate a dump file that might be helpful?

*** WARNING: Unable to verify checksum for wezterm-gui.exe

KEY_VALUES_STRING: 1

    Key  : AV.Fault
    Value: Read

    Key  : Analysis.CPU.mSec
    Value: 437

    Key  : Analysis.DebugAnalysisManager
    Value: Create

    Key  : Analysis.Elapsed.mSec
    Value: 9248

    Key  : Analysis.IO.Other.Mb
    Value: 0

    Key  : Analysis.IO.Read.Mb
    Value: 1

    Key  : Analysis.IO.Write.Mb
    Value: 23

    Key  : Analysis.Init.CPU.mSec
    Value: 203

    Key  : Analysis.Init.Elapsed.mSec
    Value: 6919

    Key  : Analysis.Memory.CommitPeak.Mb
    Value: 572

    Key  : Timeline.Process.Start.DeltaSec
    Value: 3

    Key  : WER.OS.Branch
    Value: rs_prerelease

    Key  : WER.OS.Timestamp
    Value: 2023-04-03T12:34:00Z

    Key  : WER.OS.Version
    Value: 10.0.25336.1000

    Key  : WER.Process.Version
    Value: 1.0.0.0


FILE_IN_CAB:  wezterm-gui.exe.17852.dmp

NTGLOBALFLAG:  0

PROCESS_BAM_CURRENT_THROTTLED: 0

PROCESS_BAM_PREVIOUS_THROTTLED: 0

APPLICATION_VERIFIER_FLAGS:  0

CONTEXT:  (.ecxr)
rax=00007ffb9e9231a8 rbx=00007ffb3ba67b48 rcx=00000273060f2568
rdx=0000008cabedf5d8 rsi=0000008cabedf770 rdi=0000000000000000
rip=00007ffb39be944f rsp=0000008cabedf560 rbp=0000008cabedf5e9
 r8=000000000000000e  r9=0000008cabedf650 r10=00007ffb3af1f4f0
r11=000002a09d070fa0 r12=0000000000000000 r13=0000027304014c30
r14=0000000000000000 r15=00007ffb3b90d1e0
iopl=0         nv up ei pl nz na pe nc
cs=0033  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010202
nvoglv64!vk_optimusGetInstanceProcAddr+0x2b52f:
00007ffb`39be944f ff5070          call    qword ptr [rax+70h] ds:00007ffb`9e923218=????????????????
Resetting default scope

EXCEPTION_RECORD:  (.exr -1)
ExceptionAddress: 00007ffb39be944f (nvoglv64!vk_optimusGetInstanceProcAddr+0x000000000002b52f)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 0000000000000000
   Parameter[1]: 00007ffb9e923218
Attempt to read from address 00007ffb9e923218

PROCESS_NAME:  wezterm-gui.exe

READ_ADDRESS:  00007ffb9e923218 

ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s.

EXCEPTION_CODE_STR:  c0000005

EXCEPTION_PARAMETER1:  0000000000000000

EXCEPTION_PARAMETER2:  00007ffb9e923218

ADDITIONAL_DEBUG_TEXT:  Followup set based on attribute [Is_OriginalExceptionThread] from Frame:[0] on thread:[5888]

STACK_TEXT:  
0000008c`abedf560 00007ffb`39bf7d2d     : 00000000`00000000 00000000`00000000 00000000`0000000e 00000000`00000000 : nvoglv64!vk_optimusGetInstanceProcAddr+0x2b52f
0000008c`abedf650 00007ffb`39bfd67c     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : nvoglv64!vkGetInstanceProcAddr+0x461d
0000008c`abedf680 00007ffb`7336b3ea     : 00000273`0619e0b0 00000000`00000000 00000000`00000000 00000273`0619fc50 : nvoglv64!vkGetInstanceProcAddr+0x9f6c
0000008c`abedf6e0 00007ffb`7339cfeb     : 00000273`00000078 00000000`00000000 0000008c`abedf8d4 00007ffb`5720f8df : vulkan_1!terminator_EnumerateDeviceExtensionProperties+0x23a
0000008c`abedf770 00007ff6`2487c321     : 00000273`03f39ab0 0000008c`abedf8a0 0000008c`abeff5d0 00000273`03f39d1a : vulkan_1!vkEnumerateDeviceExtensionProperties+0x5b
0000008c`abedf7b0 00007ff6`248a4a4e     : 00000000`00020000 0000008c`abedf870 0000008c`abedf860 00000273`03e82d00 : wezterm_gui!ash::instance::impl$4::enumerate_device_extension_properties::closure$0+0x71
0000008c`abedf820 00007ff6`2487c299     : 00000000`00000002 00007ffb`5720f28a 00000000`00000000 00000000`00000000 : wezterm_gui!ash::prelude::read_into_uninitialized_vector<u32,ash::vk::definitions::ExtensionProperties,ash::instance::impl$4::enumerate_device_extension_properties::closure_env$0>+0x8e
0000008c`abedf980 00007ff6`238b8b25     : 00000273`06a0ae38 00000273`04010f60 00000000`00000000 00007ffb`5720f8df : wezterm_gui!ash::instance::Instance::enumerate_device_extension_properties+0x39
0000008c`abedf9d0 00007ff6`238b9b85     : 00000000`00000000 00000000`00000000 00000000`00000000 00000273`06941510 : wezterm_gui!wgpu_hal::vulkan::InstanceShared::inspect+0x75
0000008c`abee4de0 00007ff6`23980bbb     : 00000000`00000004 00000000`00000020 00000000`00000004 00000000`00000004 : wezterm_gui!wgpu_hal::vulkan::Instance::expose_adapter+0x85
0000008c`abee7a00 00007ff6`2397f390     : 00000000`00000004 00007ff6`239db70a 00007ff6`27192cf8 00000000`00000013 : wezterm_gui!wgpu_hal::vulkan::instance::impl$4::enumerate_adapters::closure$0+0x2b
0000008c`abee7a50 00007ff6`2254e35e     : 00000273`05f89510 00000000`00000020 00000000`00000004 0000008c`abee8548 : wezterm_gui!core::ops::function::impls::impl$4::call_once<tuple$<ash::vk::definitions::PhysicalDevice>,wgpu_hal::vulkan::instance::impl$4::enumerate_adapters::closure_env$0>+0x20
0000008c`abee7a90 00007ff6`2387c245     : 01010273`05e6d700 00000000`00000000 00000000`00000004 00000000`00000000 : wezterm_gui!enum2$<core::option::Option<ash::vk::definitions::PhysicalDevice> >::map<ash::vk::definitions::PhysicalDevice,enum2$<core::option::Option<wgpu_hal::ExposedAdapter<wgpu_hal::vulkan::Api> > >,ref_mut$<wgpu_hal::vulkan::instance::impl$4::enumerate_adapters::closure_env$0> >+0x7e
0000008c`abee8220 00007ff6`2486a028     : 00000000`0000000f 00000000`00000000 00000000`00000008 00000000`00000000 : wezterm_gui!core::iter::adapters::map::impl$2::next<enum2$<core::option::Option<wgpu_hal::ExposedAdapter<wgpu_hal::vulkan::Api> > >,alloc::vec::into_iter::IntoIter<ash::vk::definitions::PhysicalDevice,alloc::alloc::Global>,wgpu_hal::vulkan::instance::impl$4::enumerate_adapters::closure_env$0>+0x45
0000008c`abee8270 00007ff6`239d0d62     : 01010273`05e6d700 00000000`00000000 00000000`00000004 00000000`00000000 : wezterm_gui!core::iter::adapters::fuse::impl$10::next<core::iter::adapters::map::Map<alloc::vec::into_iter::IntoIter<ash::vk::definitions::PhysicalDevice,alloc::alloc::Global>,wgpu_hal::vulkan::instance::impl$4::enumerate_adapters::closure_env$0> >+0xb8
0000008c`abee8300 00007ff6`239d0996     : 00000000`00000000 00007ff6`27174d45 00000000`0000000c 00000000`00000000 : wezterm_gui!core::iter::adapters::flatten::impl$20::next<core::iter::adapters::map::Map<alloc::vec::into_iter::IntoIter<ash::vk::definitions::PhysicalDevice,alloc::alloc::Global>,wgpu_hal::vulkan::instance::impl$4::enumerate_adapters::closure_env$0>,core::option::IntoIter<wgpu_hal::ExposedAdapter<wgpu_hal::vulkan::Api> > >+0xb2
0000008c`abeeae40 00007ff6`225589dd     : 00000000`00000004 00000000`00000000 00000000`00000000 00000000`00000004 : wezterm_gui!core::iter::adapters::flatten::impl$3::next<alloc::vec::into_iter::IntoIter<ash::vk::definitions::PhysicalDevice,alloc::alloc::Global>,enum2$<core::option::Option<wgpu_hal::ExposedAdapter<wgpu_hal::vulkan::Api> > >,wgpu_hal::vulkan::instance::impl$4::enumerate_adapters::closure_env$0>+0x16
0000008c`abeeae80 00007ff6`2256e851     : 0074006d`006b0064 00630078`0064002d 0000008c`abeee458 0000008c`abeee458 : wezterm_gui!alloc::vec::spec_from_iter_nested::impl$0::from_iter<wgpu_hal::ExposedAdapter<wgpu_hal::vulkan::Api>,core::iter::adapters::flatten::FlatMap<alloc::vec::into_iter::IntoIter<ash::vk::definitions::PhysicalDevice,alloc::alloc::Global>,enum2$<core::option::Option<wgpu_hal::ExposedAdapter<wgpu_hal::vulkan::Api> > >,wgpu_hal::vulkan::instance::impl$4::enumerate_adapters::closure_env$0> >+0x3d
0000008c`abeed3a0 00007ff6`2256d85a     : 00000000`00000000 00000000`00000001 00000000`00000000 00007ff6`27174d10 : wezterm_gui!alloc::vec::spec_from_iter::impl$0::from_iter<wgpu_hal::ExposedAdapter<wgpu_hal::vulkan::Api>,core::iter::adapters::flatten::FlatMap<alloc::vec::into_iter::IntoIter<ash::vk::definitions::PhysicalDevice,alloc::alloc::Global>,enum2$<core::option::Option<wgpu_hal::ExposedAdapter<wgpu_hal::vulkan::Api> > >,wgpu_hal::vulkan::instance::impl$4::enumerate_adapters::closure_env$0> >+0x11
0000008c`abeed3d0 00007ff6`239d3a91     : 00000000`00000001 00000000`00000001 00000273`060012e8 0000008c`abeee458 : wezterm_gui!alloc::vec::impl$15::from_iter<wgpu_hal::ExposedAdapter<wgpu_hal::vulkan::Api>,core::iter::adapters::flatten::FlatMap<alloc::vec::into_iter::IntoIter<ash::vk::definitions::PhysicalDevice,alloc::alloc::Global>,enum2$<core::option::Option<wgpu_hal::ExposedAdapter<wgpu_hal::vulkan::Api> > >,wgpu_hal::vulkan::instance::impl$4::enumerate_adapters::closure_env$0> >+0x2a
0000008c`abeee270 00007ff6`238d4f6d     : 00000000`00000000 00000000`00000000 00000000`00000004 00000000`00000000 : wezterm_gui!core::iter::traits::iterator::Iterator::collect<core::iter::adapters::flatten::FlatMap<alloc::vec::into_iter::IntoIter<ash::vk::definitions::PhysicalDevice,alloc::alloc::Global>,enum2$<core::option::Option<wgpu_hal::ExposedAdapter<wgpu_hal::vulkan::Api> > >,wgpu_hal::vulkan::instance::impl$4::enumerate_adapters::closure_env$0>,alloc::vec::Vec<wgpu_hal::ExposedAdapter<wgpu_hal::vulkan::Api>,alloc::alloc::Global> >+0x11
0000008c`abeee2a0 00007ff6`2350d8e5     : 02000000`00000000 00007ff6`2480fb97 00000000`0000001e 00000273`03f3fb81 : wezterm_gui!wgpu_hal::vulkan::instance::impl$4::enumerate_adapters+0x24d
0000008c`abeef3f0 00007ff6`236d16a7     : 00000000`00000002 00007ffb`7334d890 00007ffb`73347380 00000273`03f32c20 : wezterm_gui!wgpu_core::instance::impl$6::request_adapter::gather<wgpu_hal::vulkan::Api,tuple$<> >+0xe5
0000008c`abeef540 00007ff6`2334a690     : 0000008c`abef0158 0000008c`abef0158 00000273`05caeea8 00000273`0e797940 : wezterm_gui!wgpu_core::hub::Global<wgpu_core::hub::IdentityManagerFactory>::request_adapter<wgpu_core::hub::IdentityManagerFactory>+0x227
0000008c`abeefc10 00007ff6`2335de35     : 00000000`00000008 00000000`006f1164 00007ff6`21e60000 00000273`0e797930 : wezterm_gui!wgpu::backend::direct::impl$7::instance_request_adapter+0x70
0000008c`abeefc90 00007ff6`224a7b39     : 00000000`00000000 00007ffb`73347d80 00007ffb`7334b480 0000008c`abef0060 : wezterm_gui!wgpu::context::impl$5::instance_request_adapter<wgpu::backend::direct::Context>+0x25
0000008c`abeefd50 00007ff6`21f26df6     : 0000008c`abeeffc0 00000273`06048290 00000273`06048290 0000008c`abef0160 : wezterm_gui!wgpu::Instance::request_adapter+0x69
0000008c`abeefe00 00007ff6`21f25c67     : ffff7bab`a769b74a 00007ff6`8908cb4a 00000273`0604fb90 00000000`02000002 : wezterm_gui!wezterm_gui::termwindow::webgpu::impl$6::new_impl::async_fn$0+0xfb6
0000008c`abef1c50 00007ff6`21f5bb12     : 00000000`00000008 00007ffb`a9b73841 00000273`03f30000 00007ffb`a9b6b18b : wezterm_gui!wezterm_gui::termwindow::webgpu::impl$6::new::async_fn$0+0x127
0000008c`abef2820 00007ff6`2208c5fc     : 0000008c`abefbcb0 00007ff6`22791ada 00000273`0402df70 00000000`00000000 : wezterm_gui!wezterm_gui::termwindow::impl$4::new_window::async_fn$0+0x332
0000008c`abefbbd0 00007ff6`21e932c8     : 00000273`05caecc0 00007ff6`21f78c87 00000000`00000002 00000000`00000028 : wezterm_gui!wezterm_gui::frontend::impl$1::reconcile_workspace::async_block$1+0xfc
0000008c`abefc9c0 00007ff6`222b9005     : 00000273`05e22dc0 7801ee78`5753054f 00000273`03f43078 00000000`00000014 : wezterm_gui!async_task::runnable::impl$6::spawn_local::impl$1::poll<enum2$<wezterm_gui::frontend::impl$1::reconcile_workspace::async_block_env$1> >+0x58
0000008c`abefca10 00007ff6`22f35a34     : 00007ff6`25e53138 00000000`0004258a 00000273`25517cf8 00000273`03f82ef0 : wezterm_gui!async_task::raw::RawTask<async_task::runnable::impl$6::spawn_local::Checked<enum2$<wezterm_gui::frontend::impl$1::reconcile_workspace::async_block_env$1> >,tuple$<>,promise::spawn::spawn::closure_env$0<enum2$<wezterm_gui::frontend::impl$1::reconcile_workspace::async_block_env$1>,tuple$<> >,tuple$<> >::run<async_task::runnable::impl$6::spawn_local::Checked<enum2$<wezterm_gui::frontend::impl$1::reconcile_workspace::async_block_env$1> >,tuple$<>,promise::spawn::spawn::closure_env$0<enum2$<wezterm_gui::frontend::impl$1::reconcile_workspace::async_block_env$1>,tuple$<> >,tuple$<> >+0x655
0000008c`abefce00 00007ff6`24020d6e     : 00007ff6`25d96668 00007ff6`25e53138 00000000`00000008 00000000`00000008 : wezterm_gui!async_task::runnable::Runnable<tuple$<> >::run<tuple$<> >+0x64
0000008c`abefce70 00007ff6`228536e1     : 00000273`059730c0 00007ff6`25e53138 00000273`059730c0 00000273`059730c0 : wezterm_gui!window::spawn::schedule_with_pri::closure$0+0xe
0000008c`abefcea0 00007ff6`24049dc8     : 00000273`03f39ab0 00007ff6`25e53090 0000008c`abefcfa0 00007ff6`27ec7f60 : wezterm_gui!core::ops::function::FnOnce::call_once<window::spawn::schedule_with_pri::closure_env$0,tuple$<> >+0x11
0000008c`abefcee0 00007ff6`2287a6be     : 02000000`00000008 00007ff6`27ec7f60 00000000`00000003 00007ff6`27ec7f58 : wezterm_gui!alloc::boxed::impl$45::call_once<tuple$<>,dyn$<core::ops::function::FnOnce<tuple$<>,assoc$<Output,tuple$<> > >,core::marker::Send>,alloc::alloc::Global>+0x28
0000008c`abefcf40 00007ff6`22879c2e     : 00007ff6`27ec7f58 0000008c`abefcfa0 00007ff6`27ec7f58 00007ff6`27ec7f58 : wezterm_gui!window::spawn::SpawnQueue::run_impl+0x5e
0000008c`abefcfa0 00007ff6`2288e475     : 00000000`00000000 ffffffff`fffffffe 0000008c`abefd0b0 00007ff6`2260aaef : wezterm_gui!window::spawn::SpawnQueue::run+0xe
0000008c`abefcfd0 00007ff6`220e8b11     : 01000000`00000001 00000000`00000000 00000000`00000008 00000000`00000000 : wezterm_gui!window::os::windows::connection::impl$0::run_message_loop+0x95
0000008c`abefd110 00007ff6`21f10e1b     : 00000000`00000003 00000000`00000010 00000000`00000000 00000000`00000000 : wezterm_gui!wezterm_gui::frontend::GuiFrontEnd::run_forever+0x31
0000008c`abefd160 00007ff6`21f19357     : 00000000`00000000 00000273`4d00004d 00007ffb`a7b28d28 00007ffb`a9b5d9be : wezterm_gui!wezterm_gui::run_terminal_gui+0xe4b
0000008c`abefe350 00007ff6`21f1174f     : 00007ffb`a8800000 00000000`00000000 00000000`00000005 0000008c`abeff5a0 : wezterm_gui!wezterm_gui::run+0xbb7
0000008c`abeff420 00007ff6`21fa32db     : 00000000`00000000 00000000`00000008 00000000`00000000 00000000`00000000 : wezterm_gui!wezterm_gui::main+0x1f
0000008c`abeff460 00007ff6`2211896e     : 00000000`00000000 00000000`00000030 00000000`00000005 00000273`03f50000 : wezterm_gui!core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >+0xb
0000008c`abeff4a0 00007ff6`21f49db1     : 01007ff6`271159d8 00000273`03f58e50 00000273`03f39ab0 00000273`03f58e50 : wezterm_gui!std::sys_common::backtrace::__rust_begin_short_backtrace<void (*)(),tuple$<> >+0xe
0000008c`abeff4e0 00007ff6`22f8ea1e     : 00000273`03f39ab0 0000008c`abeff5d0 00000273`03f84280 00007ffb`a9b92cb0 : wezterm_gui!std::rt::lang_start::closure$0<tuple$<> >+0x11
0000008c`abeff520 00007ff6`21f49d8a     : 00000000`00000000 00007ff6`22fa2db3 00000000`00140013 00007ff6`27114e53 : wezterm_gui!std::rt::lang_start_internal+0xbe

SYMBOL_NAME:  nvoglv64+2b52f

MODULE_NAME: nvoglv64

IMAGE_NAME:  nvoglv64.dll

STACK_COMMAND:  .ecxr ; ~~[0x5888]s ; .frame 0 ; ~0s; .ecxr ; kb

FAILURE_BUCKET_ID:  INVALID_POINTER_READ_LEAK_c0000005_nvoglv64.dll!Unknown

OS_VERSION:  10.0.25336.1000

BUILDLAB_STR:  rs_prerelease

OSPLATFORM_TYPE:  x64

OSNAME:  Windows 10

IMAGE_VERSION:  31.0.15.1713

FAILURE_ID_HASH:  {5dbbf795-9ea5-4b2f-eeed-dc38c31f6501}

Followup:     MachineOwner
---------

@github-actions github-actions bot removed the waiting-on-op Waiting for more information from the original poster label Apr 15, 2023
@wez
Copy link
Owner

wez commented Apr 15, 2023

OK, now we're at something that is related to webgpu.
Do you have a windows debugger?
I suggest looking at WinDbg Preview, which you can obtain from the windows store for free.
Launch wezterm from inside it, and it should produce a stack trace.

Other things to try:

@wez wez added the waiting-on-op Waiting for more information from the original poster label Apr 15, 2023
@micgao
Copy link
Author

micgao commented Apr 18, 2023

I've tried setting the preferred adapter to all of the configurations listed by wezterm.gui.enumerate_gpus() and it did not seem to have any effect on the crash. I also tried to change webgpu_power_preference, and same thing.

I can however build and run the examples from the wgpu repo with no problem, and both vulkan and dx12 as backend work fine (as well as both low and high wgpu power pref).

I tried running through WinDbg, and here's what I get:
wezterm_debug.txt

@github-actions github-actions bot removed the waiting-on-op Waiting for more information from the original poster label Apr 18, 2023
@wez wez added Windows Issue applies to Microsoft Windows frontend:webgpu labels Feb 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend:webgpu Windows Issue applies to Microsoft Windows
Projects
None yet
Development

No branches or pull requests

2 participants