gpui-component icon indicating copy to clipboard operation
gpui-component copied to clipboard

drawer_story: Clicking the "WebView in Drawer" button causes a panic with the error: "RefCell already borrowed".

Open loyy77 opened this issue 6 months ago • 2 comments

@huacnlee

Reproduction Steps:

OS: Windows 10/11

  1. cargo run
  2. Drawer - Click the "WebView in Drawer" button

Env

OS:Windows10, Windows11 targets: x86_64-pc-windows-gnu, x86_64-pc-windows-msvc

tips

  1. After commenting out the update method exposed in the panic stack (e.g., lines 647–663 in table_story), and keeping only the event handling code in drawer_story, the crash no longer occurs.
  2. The update method related to text box focus is also involved.

Stack backtrace:


2025-10-16T12:31:13.594368Z  INFO gpui_component::theme::registry: Themes reloaded successfully.
2025-10-16T12:31:13.595600Z  INFO gpui_component::theme::registry: Reload active theme: "Default Light"...
2025-10-16T12:31:14.396164Z ERROR gpui::platform::windows::direct_write: Menlo, Monaco, Consolas, monospace not found, use Microsoft YaHei UI instead.
2025-10-16T12:31:23.815814Z ERROR : RefCell already borrowed

Stack backtrace:
   0: std::backtrace::Backtrace::create
             at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\std\src\..\..\backtrace\src\backtrace/win64.rs:85:14
   1: std::backtrace::Backtrace::capture
             at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\std\src/backtrace.rs:296:9
   2: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from      
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\anyhow-1.0.99\src\backtrace.rs:27:14
   3: <core::result::Result<T,F> as core::ops::try_trait::FromResidual<core::result::Result<core::convert::Infallible,E>>>::from_residual
             at D:\dev\rust\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\core\src\result.rs:2177:27
   4: <gpui::app::async_context::AsyncApp as gpui::AppContext>::update_window   
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app\async_context.rs:88:24
   5: gpui::window::AnyWindowHandle::update
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\window.rs:4809:12
   6: gpui::window::Window::new::{{closure}}
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\window.rs:1137:22
   7: <alloc::boxed::Box<F,A> as core::ops::function::FnMut<Args>>::call_mut    
             at D:\dev\rust\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\alloc\src\boxed.rs:2011:9
   8: gpui::platform::windows::events::<impl gpui::platform::windows::window::WindowsWindowInner>::handle_hit_test_msg
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\platform\windows\events.rs:859:24
   9: gpui::platform::windows::events::<impl gpui::platform::windows::window::WindowsWindowInner>::handle_msg
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\platform\windows\events.rs:53:34
  10: gpui::platform::windows::window::window_procedure
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\platform\windows\window.rs:1186:15
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: <unknown>
  15: <unknown>
  16: <unknown>
  17: windows::Win32::UI::WindowsAndMessaging::GetMessageA
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\windows-0.61.3\src\Windows\Win32\UI\WindowsAndMessaging\mod.rs:979:14
  18: webview2_com::wait_with_pump
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\webview2-com-0.38.0\src\lib.rs:69:19
  19: lb_wry::webview2::InnerWebView::create_controller
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\lb-wry-0.53.3\src\webview2\mod.rs:595:5
  20: lb_wry::webview2::InnerWebView::new_in_hwnd
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\lb-wry-0.53.3\src\webview2\mod.rs:164:22
  21: lb_wry::webview2::InnerWebView::new_as_child
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\lb-wry-0.53.3\src\webview2\mod.rs:117:5
  22: lb_wry::WebViewBuilder::build_as_child
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\lb-wry-0.53.3\src\lib.rs:1464:5
  23: <story::drawer_story::DrawerStory as gpui::element::Render>::render::{{closure}}::{{closure}}
             at .\crates\story\src\drawer_story.rs:489:46
  24: <gpui::app::App as gpui::AppContext>::new::{{closure}}
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:2120:26
  25: gpui::app::App::update
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:764:22
  26: <gpui::app::App as gpui::AppContext>::new
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:2117:14
  27: <gpui::app::context::Context<T> as gpui::AppContext>::new
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app\context.rs:740:18
  28: <story::drawer_story::DrawerStory as gpui::element::Render>::render::{{closure}}
             at .\crates\story\src\drawer_story.rs:487:54
  29: gpui::app::context::Context<T>::listener::{{closure}}::{{closure}}        
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app\context.rs:258:40
  30: <gpui::app::App as gpui::AppContext>::update_entity::{{closure}}
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:2158:26
  31: gpui::app::App::update
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:764:22
  32: <gpui::app::App as gpui::AppContext>::update_entity
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:2156:14
  33: gpui::app::entity_map::WeakEntity<T>::update::{{closure}}
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app\entity_map.rs:708:32
  34: core::result::Result<T,E>::map
             at D:\dev\rust\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\core\src\result.rs:829:25
  35: gpui::app::entity_map::WeakEntity<T>::update
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app\entity_map.rs:708:18
  36: gpui::app::context::Context<T>::listener::{{closure}}
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app\context.rs:258:18
  37: <gpui_component::button::button::Button as gpui::element::RenderOnce>::render::{{closure}}::{{closure}}
             at .\crates\ui\src\button\button.rs:546:21
  38: gpui::elements::div::Interactivity::on_click::{{closure}}
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\elements\div.rs:488:13
  39: gpui::elements::div::Interactivity::paint_mouse_listeners::{{closure}}    
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\elements\div.rs:2231:37
  40: gpui::window::Window::on_mouse_event::{{closure}}
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\window.rs:3410:21
  41: <alloc::boxed::Box<F,A> as core::ops::function::FnMut<Args>>::call_mut    
             at D:\dev\rust\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\alloc\src\boxed.rs:2011:9
  42: gpui::window::Window::dispatch_mouse_event
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\window.rs:3687:17
  43: gpui::window::Window::dispatch_event
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\window.rs:3646:18
  44: gpui::window::Window::new::{{closure}}::{{closure}}
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\window.rs:1128:61
  45: gpui::app::App::update_window_id::{{closure}}
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:1374:26
  46: gpui::app::App::update
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:764:22
  47: gpui::app::App::update_window_id
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:1368:14
  48: <gpui::app::App as gpui::AppContext>::update_window
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:2190:14
  49: <gpui::app::async_context::AsyncApp as gpui::AppContext>::update_window   
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app\async_context.rs:89:14
  50: gpui::window::AnyWindowHandle::update
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\window.rs:4809:12
  51: gpui::window::Window::new::{{closure}}
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\window.rs:1128:22
  52: <alloc::boxed::Box<F,A> as core::ops::function::FnMut<Args>>::call_mut    
             at D:\dev\rust\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\alloc\src\boxed.rs:2011:9
  53: gpui::platform::windows::events::<impl gpui::platform::windows::window::WindowsWindowInner>::handle_mouse_up_msg
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\platform\windows\events.rs:499:24
  54: gpui::platform::windows::events::<impl gpui::platform::windows::window::WindowsWindowInner>::handle_msg
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\platform\windows\events.rs:87:34
  55: gpui::platform::windows::window::window_procedure
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\platform\windows\window.rs:1186:15
  56: <unknown>
  57: <unknown>
  58: windows::Win32::UI::WindowsAndMessaging::DispatchMessageW
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\windows-0.61.3\src\Windows\Win32\UI\WindowsAndMessaging\mod.rs:577:14
  59: <gpui::platform::windows::platform::WindowsPlatform as gpui::platform::Platform>::run
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\platform\windows\platform.rs:315:17
  60: gpui::app::Application::run
             at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:180:18
  61: story::main
             at .\crates\story\src\main.rs:297:9
  62: core::ops::function::FnOnce::call_once
             at D:\dev\rust\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\core\src\ops\function.rs:250:5
  63: std::sys::backtrace::__rust_begin_short_backtrace
             at D:\dev\rust\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\std\src\sys\backtrace.rs:158:18
  64: std::rt::lang_start::{{closure}}
             at D:\dev\rust\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\std\src\rt.rs:206:18
  65: std::rt::lang_start_internal
             at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\core\src\ops/function.rs:287:21
  66: std::rt::lang_start
             at D:\dev\rust\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\std\src\rt.rs:205:5
  67: main
  68: __tmainCRTStartup
             at D:/W/B/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:236:11
  69: mainCRTStartup
             at D:/W/B/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:122:9
  70: <unknown>
  71: <unknown>

thread 'main' (13984) panicked at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app\async_context.rs:57:27:
RefCell already borrowed
stack backtrace:
   0:     0x7ff7a121bd49 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h32343b5dd45e2f28
                               at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\std\src\..\..\backtrace\src\backtrace/win64.rs:85:14
   1:     0x7ff7a124c0da - core::fmt::write::hea225b1eb05c1b0e
                               at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\core\src\fmt/rt.rs:173:76
   2:     0x7ff7a11d1422 - std::io::Write::write_fmt::h8e404690adf51363
                               at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\std\src\io/mod.rs:639:11
   3:     0x7ff7a11e8415 - std::sys::backtrace::BacktraceLock::print::hf2feafb8b87e7958
                               at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\std\src\sys/backtrace.rs:42:9
   4:     0x7ff7a11efb9d - std::panicking::default_hook::{{closure}}::h929f71b2e9d86efa
                               at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\std\src/panicking.rs:301:27
   5:     0x7ff7a11efa08 - std::panicking::default_hook::haa092a62a60a497a      
                               at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\std\src/panicking.rs:328:9
   6:     0x7ff7a11f0383 - std::panicking::panic_with_hook::hf43ecc9a81405116   
                               at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\std\src/panicking.rs:834:13
   7:     0x7ff7a11f00a2 - std::panicking::panic_handler::{{closure}}::h288648033c22f5cd
                               at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\std\src/panicking.rs:707:13
   8:     0x7ff7a11e85df - std::sys::backtrace::__rust_end_short_backtrace::hbb3fc33c88ed4c8b
                               at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\std\src\sys/backtrace.rs:174:18
   9:     0x7ff7a11c8f8e - __rustc[5beaa93ec76eda40]::rust_begin_unwind
                               at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\std\src/panicking.rs:698:5
  10:     0x7ff7a125bd71 - core::panicking::panic_fmt::h69d28f0814a147e5        
                               at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\core\src/panicking.rs:80:14
  11:     0x7ff7a12599d4 - core::cell::panic_already_borrowed::do_panic::runtime::h61ee86c08b36e5d4
                               at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\core\src/panic.rs:173:21
  12:     0x7ff7a125997f - core::cell::panic_already_borrowed::h57e358672bdb5296
                               at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\core\src\intrinsics/mod.rs:2435:9
  13:     0x7ff79e9c59e5 - core::cell::RefCell<T>::borrow_mut::h3ac3158834679509
                               at D:\dev\rust\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\core\src\cell.rs:1178:25
  14:     0x7ff79ed14a40 - gpui::app::AppCell::borrow_mut::h58be2119e0b0c118    
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:83:28
  15:     0x7ff79cd76ab1 - <gpui::app::async_context::AsyncApp as gpui::AppContext>::update_entity::h38344b79496004f3
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app\async_context.rs:57:27
  16:     0x7ff79cd1438e - gpui::app::entity_map::WeakEntity<T>::update::{{closure}}::h5b381c7a147f6ad6
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app\entity_map.rs:708:32
  17:     0x7ff79cefac35 - core::result::Result<T,E>::map::h356cd378dfed530c
                               at D:\dev\rust\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\core\src\result.rs:829:25
  18:     0x7ff79cd0fb66 - gpui::app::entity_map::WeakEntity<T>::update::hdbb2381ce6230132
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app\entity_map.rs:708:18
  19:     0x7ff79ce5e702 - story::table_story::TableStory::new::{{closure}}::{{closure}}::h3bf16e3a62a1c53a
                               at D:\dev\rustProject\gpui-component\crates\story\src\table_story.rs:647:22
  20:     0x7ff79caeacc9 - gpui::app::context::Context<T>::spawn::{{closure}}::{{closure}}::h3a1879fe7ef1f9e8
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app\context.rs:244:52
  21:     0x7ff79cb8464f - gpui::app::App::spawn::{{closure}}::h5eab46c26f6cc2a8
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:1432:44
  22:     0x7ff79cc50e2c - <core::pin::Pin<P> as core::future::future::Future>::poll::h4757a1ecf8af5135
                               at D:\dev\rust\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\core\src\future\future.rs:133:9     
  23:     0x7ff79cc0f0e6 - <gpui::executor::spawn_local_with_source_location::Checked<F> as core::future::future::Future>::poll::h1ce06b45a97e29f9
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\executor.rs:531:64
  24:     0x7ff79ce8a6ac - async_task::raw::RawTask<F,T,S,M>::run::h4e7498a881bf3d54
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\async-task-4.7.1\src\raw.rs:557:17
  25:     0x7ff7a07902e9 - async_task::runnable::Runnable<M>::run::hb76a57a413183da5
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\async-task-4.7.1\src\runnable.rs:781:18
  26:     0x7ff79ed613c1 - gpui::platform::windows::platform::WindowsPlatformInner::run_foreground_task::h2b28d1e6de3c9c13
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\platform\windows\platform.rs:750:22
  27:     0x7ff79ed61146 - gpui::platform::windows::platform::WindowsPlatformInner::handle_gpui_events::he31cac29f9822d0c
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\platform\windows\platform.rs:724:60
  28:     0x7ff79ed60b4d - gpui::platform::windows::platform::WindowsPlatformInner::handle_msg::h4085f59d16108029
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\platform\windows\platform.rs:702:47
  29:     0x7ff79ed604ad - gpui::platform::windows::platform::window_procedure::hc6f2a54bd7028fa8
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\platform\windows\platform.rs:1125:15
  30:     0x7ffd9c3e7846 - <unknown>
  31:     0x7ffd9c3e539d - <unknown>
  32:     0x7ff79ced8329 - windows::Win32::UI::WindowsAndMessaging::DispatchMessageA::h42f735bba61815a8
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\windows-0.61.3\src\Windows\Win32\UI\WindowsAndMessaging\mod.rs:572:14
  33:     0x7ff79cd52a91 - webview2_com::wait_with_pump::he136e8b9cc3b36a7      
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\webview2-com-0.38.0\src\lib.rs:76:21
  34:     0x7ff79cf53982 - lb_wry::webview2::InnerWebView::create_controller::h440e0f8194cc8b10
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\lb-wry-0.53.3\src\webview2\mod.rs:595:5
  35:     0x7ff79cf48533 - lb_wry::webview2::InnerWebView::new_in_hwnd::hc97b243e670fd2ea
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\lb-wry-0.53.3\src\webview2\mod.rs:164:22
  36:     0x7ff79cf4bff0 - lb_wry::webview2::InnerWebView::new_as_child::h3b7fd3ddd04300a9
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\lb-wry-0.53.3\src\webview2\mod.rs:117:5
  37:     0x7ff79cf48048 - lb_wry::WebViewBuilder::build_as_child::h0b7fe80fca1738c1
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\lb-wry-0.53.3\src\lib.rs:1464:5
  38:     0x7ff79ce75ee4 - <story::drawer_story::DrawerStory as gpui::element::Render>::render::{{closure}}::{{closure}}::h26efb07c459e29e3
                               at D:\dev\rustProject\gpui-component\crates\story\src\drawer_story.rs:489:46
  39:     0x7ff79cc05cc7 - <gpui::app::App as gpui::AppContext>::new::{{closure}}::hcb9de6bafbf36fdc
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:2120:26
  40:     0x7ff79cb9a2ba - gpui::app::App::update::ha7c718f86f598a9c
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:764:22
  41:     0x7ff79cbe6811 - <gpui::app::App as gpui::AppContext>::new::hd1fa57fe38b8f94f
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:2117:14
  42:     0x7ff79cb0e144 - <gpui::app::context::Context<T> as gpui::AppContext>::new::h085c20c07c95521d
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app\context.rs:740:18
  43:     0x7ff79ce755ed - <story::drawer_story::DrawerStory as gpui::element::Render>::render::{{closure}}::h276b7bd77f431d80
                               at D:\dev\rustProject\gpui-component\crates\story\src\drawer_story.rs:487:54
  44:     0x7ff79cb019d7 - gpui::app::context::Context<T>::listener::{{closure}}::{{closure}}::hd6356ec8a3029586
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app\context.rs:258:40
  45:     0x7ff79cbc0eb3 - <gpui::app::App as gpui::AppContext>::update_entity::{{closure}}::h61ea6529fb78d784
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:2158:26
  46:     0x7ff79cb88a82 - gpui::app::App::update::h15a734784c503310
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:764:22
  47:     0x7ff79cba98ed - <gpui::app::App as gpui::AppContext>::update_entity::h8d63c0c8d3b7958e
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:2156:14
  48:     0x7ff79cd147fb - gpui::app::entity_map::WeakEntity<T>::update::{{closure}}::h63d2f6e45c7a9c4f
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app\entity_map.rs:708:32
  49:     0x7ff79cf05e6d - core::result::Result<T,E>::map::hefe6a1b11773c29a    
                               at D:\dev\rust\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\core\src\result.rs:829:25
  50:     0x7ff79cd02e1a - gpui::app::entity_map::WeakEntity<T>::update::h038b159fca0bf175
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app\entity_map.rs:708:18
  51:     0x7ff79cafdfc1 - gpui::app::context::Context<T>::listener::{{closure}}::hf5f1516b66c6893c
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app\context.rs:258:18
  52:     0x7ff79df8f4cf - <gpui_component::button::button::Button as gpui::element::RenderOnce>::render::{{closure}}::{{closure}}::hcb01a41f7acea6c8
                               at D:\dev\rustProject\gpui-component\crates\ui\src\button\button.rs:546:21
  53:     0x7ff79e024b67 - gpui::elements::div::Interactivity::on_click::{{closure}}::h3b0c87620a646bb3
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\elements\div.rs:488:13
  54:     0x7ff79ea6e9a4 - gpui::elements::div::Interactivity::paint_mouse_listeners::{{closure}}::hece95109c6e8845b
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\elements\div.rs:2231:37
  55:     0x7ff79ed22874 - gpui::window::Window::on_mouse_event::{{closure}}::h1d47799493b98a61
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\window.rs:3410:21
  56:     0x7ff79eab977b - <alloc::boxed::Box<F,A> as core::ops::function::FnMut<Args>>::call_mut::hd49a2d6497193acb
                               at D:\dev\rust\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\alloc\src\boxed.rs:2011:9
  57:     0x7ff79ed3fa0b - gpui::window::Window::dispatch_mouse_event::h4ba616ac16a37c60
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\window.rs:3687:17
  58:     0x7ff79ed2006d - gpui::window::Window::dispatch_event::hec7bf2d080333a0d
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\window.rs:3646:18
  59:     0x7ff79ed5036b - gpui::window::Window::new::{{closure}}::{{closure}}::hadd0bcfddbcfddc9
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\window.rs:1128:61
  60:     0x7ff79ed08c21 - gpui::app::App::update_window_id::{{closure}}::hf43d76bd314dd2d7
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:1374:26
  61:     0x7ff79ed0fb68 - gpui::app::App::update::h30e1b43e6afa7b8f
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:764:22
  62:     0x7ff79ecfb194 - gpui::app::App::update_window_id::h90ccd156817bf2e1
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:1368:14
  63:     0x7ff79ed66d13 - <gpui::app::App as gpui::AppContext>::update_window::h95a16353430ea495
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:2190:14
  64:     0x7ff79ed79f35 - <gpui::app::async_context::AsyncApp as gpui::AppContext>::update_window::h1148e3a5c1c2375f
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app\async_context.rs:89:14
  65:     0x7ff79ed1759d - gpui::window::AnyWindowHandle::update::h4790c90d5db03d06
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\window.rs:4809:12
  66:     0x7ff79ed4f68a - gpui::window::Window::new::{{closure}}::h9cd24ba6be4ebda3
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\window.rs:1128:22
  67:     0x7ff79eab95ee - <alloc::boxed::Box<F,A> as core::ops::function::FnMut<Args>>::call_mut::h83faf6a6c0bf2c0e
                               at D:\dev\rust\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\alloc\src\boxed.rs:2011:9
  68:     0x7ff79edc3606 - gpui::platform::windows::events::<impl gpui::platform::windows::window::WindowsWindowInner>::handle_mouse_up_msg::h96dec3f65c14d250  
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\platform\windows\events.rs:499:24
  69:     0x7ff79edbce49 - gpui::platform::windows::events::<impl gpui::platform::windows::window::WindowsWindowInner>::handle_msg::hfd76efeb050c511c
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\platform\windows\events.rs:87:34
  70:     0x7ff79edcc7ed - gpui::platform::windows::window::window_procedure::h8716d6b50babc62b
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\platform\windows\window.rs:1186:15
  71:     0x7ffd9c3e7846 - <unknown>
  72:     0x7ffd9c3e539d - <unknown>
  73:     0x7ff79ede8589 - windows::Win32::UI::WindowsAndMessaging::DispatchMessageW::h705d4be0e303b996
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\windows-0.61.3\src\Windows\Win32\UI\WindowsAndMessaging\mod.rs:577:14
  74:     0x7ff79ed86984 - <gpui::platform::windows::platform::WindowsPlatform as gpui::platform::Platform>::run::hcc091318ef832c01
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\platform\windows\platform.rs:315:17
  75:     0x7ff79ca96f4a - gpui::app::Application::run::hed884dd8c402fe89       
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:180:18
  76:     0x7ff79ca8f04b - story::main::hee7f79f19b324051
                               at D:\dev\rustProject\gpui-component\crates\story\src\main.rs:297:9
  77:     0x7ff79cad57e6 - core::ops::function::FnOnce::call_once::h9ce14643c8c54c36
                               at D:\dev\rust\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\core\src\ops\function.rs:250:5      
  78:     0x7ff79ca71949 - std::sys::backtrace::__rust_begin_short_backtrace::ha920a11b86c54252
                               at D:\dev\rust\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\std\src\sys\backtrace.rs:158:18     
  79:     0x7ff79ca756bc - std::rt::lang_start::{{closure}}::h665fbfc8e7993650  
                               at D:\dev\rust\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\std\src\rt.rs:206:18
  80:     0x7ff7a11d3362 - std::rt::lang_start_internal::h73cb841954e987d9      
                               at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\core\src\ops/function.rs:287:21
  81:     0x7ff79ca756a7 - std::rt::lang_start::ha3b8b49138b96fb4
                               at D:\dev\rust\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\std\src\rt.rs:205:5
  82:     0x7ff79ca9154f - main
  83:     0x7ff79ca710c9 - __tmainCRTStartup
                               at D:/W/B/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:236:11
  84:     0x7ff79ca71416 - mainCRTStartup
                               at D:/W/B/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:122:9
  85:     0x7ffd9d32e8d7 - <unknown>
  86:     0x7ffd9e48c53c - <unknown>

thread 'main' (13984) panicked at library\core\src\panicking.rs:230:5:
panic in a function that cannot unwind
stack backtrace:
   0:     0x7ff7a121bd49 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h32343b5dd45e2f28
                               at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\std\src\..\..\backtrace\src\backtrace/win64.rs:85:14
   1:     0x7ff7a124c0da - core::fmt::write::hea225b1eb05c1b0e
                               at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\core\src\fmt/rt.rs:173:76
   2:     0x7ff7a11d1422 - std::io::Write::write_fmt::h8e404690adf51363
                               at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\std\src\io/mod.rs:639:11
   3:     0x7ff7a11e8415 - std::sys::backtrace::BacktraceLock::print::hf2feafb8b87e7958
                               at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\std\src\sys/backtrace.rs:42:9
   4:     0x7ff7a11efb9d - std::panicking::default_hook::{{closure}}::h929f71b2e9d86efa
                               at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\std\src/panicking.rs:301:27
   5:     0x7ff7a11efa08 - std::panicking::default_hook::haa092a62a60a497a      
                               at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\std\src/panicking.rs:328:9
   6:     0x7ff7a11f0383 - std::panicking::panic_with_hook::hf43ecc9a81405116
                               at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\std\src/panicking.rs:834:13
   7:     0x7ff7a11f006b - std::panicking::panic_handler::{{closure}}::h288648033c22f5cd
                               at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\std\src/panicking.rs:700:13
   8:     0x7ff7a11e85df - std::sys::backtrace::__rust_end_short_backtrace::hbb3fc33c88ed4c8b
                               at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\std\src\sys/backtrace.rs:174:18
   9:     0x7ff7a11c8f8e - __rustc[5beaa93ec76eda40]::rust_begin_unwind
                               at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\std\src/panicking.rs:698:5
  10:     0x7ff7a125ba4d - core::panicking::panic_nounwind_fmt::hdf3b6f36e02b5e25
                               at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\core\src/panicking.rs:122:22
  11:     0x7ff7a125b903 - core::panicking::panic_nounwind::h1ad03354a18bdf52   
                               at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\core\src/panicking.rs:230:5
  12:     0x7ff7a125bbb2 - core::panicking::panic_cannot_unwind::h3e751e7fcd389648
                               at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\core\src/panicking.rs:342:5
  13:     0x7ff79ed6052e - gpui::platform::windows::platform::window_procedure::hc6f2a54bd7028fa8
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\platform\windows\platform.rs:1094:1
  14:     0x7ffd9c3e7846 - <unknown>
  15:     0x7ffd9c3e539d - <unknown>
  16:     0x7ff79ced8329 - windows::Win32::UI::WindowsAndMessaging::DispatchMessageA::h42f735bba61815a8
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\windows-0.61.3\src\Windows\Win32\UI\WindowsAndMessaging\mod.rs:572:14
  17:     0x7ff79cd52a91 - webview2_com::wait_with_pump::he136e8b9cc3b36a7      
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\webview2-com-0.38.0\src\lib.rs:76:21
  18:     0x7ff79cf53982 - lb_wry::webview2::InnerWebView::create_controller::h440e0f8194cc8b10
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\lb-wry-0.53.3\src\webview2\mod.rs:595:5
  19:     0x7ff79cf48533 - lb_wry::webview2::InnerWebView::new_in_hwnd::hc97b243e670fd2ea
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\lb-wry-0.53.3\src\webview2\mod.rs:164:22
  20:     0x7ff79cf4bff0 - lb_wry::webview2::InnerWebView::new_as_child::h3b7fd3ddd04300a9
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\lb-wry-0.53.3\src\webview2\mod.rs:117:5
  21:     0x7ff79cf48048 - lb_wry::WebViewBuilder::build_as_child::h0b7fe80fca1738c1
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\lb-wry-0.53.3\src\lib.rs:1464:5
  22:     0x7ff79ce75ee4 - <story::drawer_story::DrawerStory as gpui::element::Render>::render::{{closure}}::{{closure}}::h26efb07c459e29e3
                               at D:\dev\rustProject\gpui-component\crates\story\src\drawer_story.rs:489:46
  23:     0x7ff79cc05cc7 - <gpui::app::App as gpui::AppContext>::new::{{closure}}::hcb9de6bafbf36fdc
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:2120:26
  24:     0x7ff79cb9a2ba - gpui::app::App::update::ha7c718f86f598a9c
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:764:22
  25:     0x7ff79cbe6811 - <gpui::app::App as gpui::AppContext>::new::hd1fa57fe38b8f94f
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:2117:14
  26:     0x7ff79cb0e144 - <gpui::app::context::Context<T> as gpui::AppContext>::new::h085c20c07c95521d
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app\context.rs:740:18
  27:     0x7ff79ce755ed - <story::drawer_story::DrawerStory as gpui::element::Render>::render::{{closure}}::h276b7bd77f431d80
                               at D:\dev\rustProject\gpui-component\crates\story\src\drawer_story.rs:487:54
  28:     0x7ff79cb019d7 - gpui::app::context::Context<T>::listener::{{closure}}::{{closure}}::hd6356ec8a3029586
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app\context.rs:258:40
  29:     0x7ff79cbc0eb3 - <gpui::app::App as gpui::AppContext>::update_entity::{{closure}}::h61ea6529fb78d784
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:2158:26
  30:     0x7ff79cb88a82 - gpui::app::App::update::h15a734784c503310
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:764:22
  31:     0x7ff79cba98ed - <gpui::app::App as gpui::AppContext>::update_entity::h8d63c0c8d3b7958e
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:2156:14
  32:     0x7ff79cd147fb - gpui::app::entity_map::WeakEntity<T>::update::{{closure}}::h63d2f6e45c7a9c4f
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app\entity_map.rs:708:32
  33:     0x7ff79cf05e6d - core::result::Result<T,E>::map::hefe6a1b11773c29a    
                               at D:\dev\rust\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\core\src\result.rs:829:25
  34:     0x7ff79cd02e1a - gpui::app::entity_map::WeakEntity<T>::update::h038b159fca0bf175
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app\entity_map.rs:708:18
  35:     0x7ff79cafdfc1 - gpui::app::context::Context<T>::listener::{{closure}}::hf5f1516b66c6893c
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app\context.rs:258:18
  36:     0x7ff79df8f4cf - <gpui_component::button::button::Button as gpui::element::RenderOnce>::render::{{closure}}::{{closure}}::hcb01a41f7acea6c8
                               at D:\dev\rustProject\gpui-component\crates\ui\src\button\button.rs:546:21
  37:     0x7ff79e024b67 - gpui::elements::div::Interactivity::on_click::{{closure}}::h3b0c87620a646bb3
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\elements\div.rs:488:13
  38:     0x7ff79ea6e9a4 - gpui::elements::div::Interactivity::paint_mouse_listeners::{{closure}}::hece95109c6e8845b
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\elements\div.rs:2231:37
  39:     0x7ff79ed22874 - gpui::window::Window::on_mouse_event::{{closure}}::h1d47799493b98a61
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\window.rs:3410:21
  40:     0x7ff79eab977b - <alloc::boxed::Box<F,A> as core::ops::function::FnMut<Args>>::call_mut::hd49a2d6497193acb
                               at D:\dev\rust\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\alloc\src\boxed.rs:2011:9
  41:     0x7ff79ed3fa0b - gpui::window::Window::dispatch_mouse_event::h4ba616ac16a37c60
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\window.rs:3687:17
  42:     0x7ff79ed2006d - gpui::window::Window::dispatch_event::hec7bf2d080333a0d
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\window.rs:3646:18
  43:     0x7ff79ed5036b - gpui::window::Window::new::{{closure}}::{{closure}}::hadd0bcfddbcfddc9
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\window.rs:1128:61
  44:     0x7ff79ed08c21 - gpui::app::App::update_window_id::{{closure}}::hf43d76bd314dd2d7
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:1374:26
  45:     0x7ff79ed0fb68 - gpui::app::App::update::h30e1b43e6afa7b8f
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:764:22
  46:     0x7ff79ecfb194 - gpui::app::App::update_window_id::h90ccd156817bf2e1  
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:1368:14
  47:     0x7ff79ed66d13 - <gpui::app::App as gpui::AppContext>::update_window::h95a16353430ea495
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:2190:14
  48:     0x7ff79ed79f35 - <gpui::app::async_context::AsyncApp as gpui::AppContext>::update_window::h1148e3a5c1c2375f
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app\async_context.rs:89:14
  49:     0x7ff79ed1759d - gpui::window::AnyWindowHandle::update::h4790c90d5db03d06
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\window.rs:4809:12
  50:     0x7ff79ed4f68a - gpui::window::Window::new::{{closure}}::h9cd24ba6be4ebda3
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\window.rs:1128:22
  51:     0x7ff79eab95ee - <alloc::boxed::Box<F,A> as core::ops::function::FnMut<Args>>::call_mut::h83faf6a6c0bf2c0e
                               at D:\dev\rust\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\alloc\src\boxed.rs:2011:9
  52:     0x7ff79edc3606 - gpui::platform::windows::events::<impl gpui::platform::windows::window::WindowsWindowInner>::handle_mouse_up_msg::h96dec3f65c14d250  
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\platform\windows\events.rs:499:24
  53:     0x7ff79edbce49 - gpui::platform::windows::events::<impl gpui::platform::windows::window::WindowsWindowInner>::handle_msg::hfd76efeb050c511c
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\platform\windows\events.rs:87:34
  54:     0x7ff79edcc7ed - gpui::platform::windows::window::window_procedure::h8716d6b50babc62b
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\platform\windows\window.rs:1186:15
  55:     0x7ffd9c3e7846 - <unknown>
  56:     0x7ffd9c3e539d - <unknown>
  57:     0x7ff79ede8589 - windows::Win32::UI::WindowsAndMessaging::DispatchMessageW::h705d4be0e303b996
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\windows-0.61.3\src\Windows\Win32\UI\WindowsAndMessaging\mod.rs:577:14
  58:     0x7ff79ed86984 - <gpui::platform::windows::platform::WindowsPlatform as gpui::platform::Platform>::run::hcc091318ef832c01
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\platform\windows\platform.rs:315:17
  59:     0x7ff79ca96f4a - gpui::app::Application::run::hed884dd8c402fe89       
                               at D:\dev\rust\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gpui-0.2.0\src\app.rs:180:18
  60:     0x7ff79ca8f04b - story::main::hee7f79f19b324051
                               at D:\dev\rustProject\gpui-component\crates\story\src\main.rs:297:9
  61:     0x7ff79cad57e6 - core::ops::function::FnOnce::call_once::h9ce14643c8c54c36
                               at D:\dev\rust\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\core\src\ops\function.rs:250:5      
  62:     0x7ff79ca71949 - std::sys::backtrace::__rust_begin_short_backtrace::ha920a11b86c54252
                               at D:\dev\rust\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\std\src\sys\backtrace.rs:158:18     
  63:     0x7ff79ca756bc - std::rt::lang_start::{{closure}}::h665fbfc8e7993650  
                               at D:\dev\rust\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\std\src\rt.rs:206:18
  64:     0x7ff7a11d3362 - std::rt::lang_start_internal::h73cb841954e987d9      
                               at /rustc/4b94758d2ba7d0ef71ccf5fde29ce4bc5d6fe2a4/library\core\src\ops/function.rs:287:21
  65:     0x7ff79ca756a7 - std::rt::lang_start::ha3b8b49138b96fb4
  67:     0x7ff79ca710c9 - __tmainCRTStartup
                               at D:/W/B/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:236:11
  68:     0x7ff79ca71416 - mainCRTStartup
                               at D:/W/B/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:122:9
  69:     0x7ffd9d32e8d7 - <unknown>
  70:     0x7ffd9e48c53c - <unknown>
thread caused non-unwinding panic. aborting.
error: process didn't exit successfully: `D:\dev\rust\.target\debug\story.exe` (exit code: 0xc0000409, STATUS_STACK_BUFFER_OVERRUN)        
PS D:\dev\rustProject\gpui-component>











  67:     0x7ff79ca710c9 - __tmainCRTStartup
                               at D:/W/B/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:236:11
  68:     0x7ff79ca71416 - mainCRTStartup
                               at D:/W/B/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:122:9
  69:     0x7ffd9d32e8d7 - <unknown>
  70:     0x7ffd9e48c53c - <unknown>
thread caused non-unwinding panic. aborting.
error: process didn't exit successfully: `D:\dev\rust\.target\debug\story.exe` (exit code: 0xc0000409, STATUS_STACK_BUFFER_OVERRUN)        
PS D:\dev\rustProject\gpui-component>




  67:     0x7ff79ca710c9 - __tmainCRTStartup
                               at D:/W/B/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:236:11
  68:     0x7ff79ca71416 - mainCRTStartup
                               at D:/W/B/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:122:9
  69:     0x7ffd9d32e8d7 - <unknown>
  70:     0x7ffd9e48c53c - <unknown>
thread caused non-unwinding panic. aborting.
error: process didn't exit successfully: `D:\dev\rust\.target\debug\story.exe` (exit code: 0xc0000409, STATUS_STACK_BUFFER_OVERRUN)        
  67:     0x7ff79ca710c9 - __tmainCRTStartup
                               at D:/W/B/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:236:11
  68:     0x7ff79ca71416 - mainCRTStartup
  67:     0x7ff79ca710c9 - __tmainCRTStartup
                               at D:/W/B/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:236:11
  67:     0x7ff79ca710c9 - __tmainCRTStartup
  67:     0x7ff79ca710c9 - __tmainCRTStartup
                               at D:/W/B/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:236:11
  68:     0x7ff79ca71416 - mainCRTStartup
                               at D:/W/B/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:122:9
  69:     0x7ffd9d32e8d7 - <unknown>
  70:     0x7ffd9e48c53c - <unknown>
thread caused non-unwinding panic. aborting.
error: process didn't exit successfully: `D:\dev\rust\.target\debug\story.exe` (exit code: 0xc0000409, STATUS_STACK_BUFFER_OVERRUN) 

loyy77 avatar Oct 16 '25 13:10 loyy77

https://github.com/longbridge/gpui-component/blob/e0c1f91ed4591913a1dc65a8bf36628788eb25eb/crates/story/examples/webview.rs#L27:L30

Add this.

huacnlee avatar Oct 16 '25 13:10 huacnlee

The attempted fix did not work.

crates\story\src\main.rs:

fn main() {
    #[cfg(target_os = "windows")]
    unsafe {
        std::env::set_var("GPUI_DISABLE_DIRECT_COMPOSITION", "true");
    }
    let app = Application::new().with_assets(Assets);

    // Parse `cargo run -- <story_name>`
    let name = std::env::args().nth(1);

    app.run(move |cx| {
        story::init(cx);
        cx.activate(true);

        story::create_new_window(
            "GPUI Component",
            move |window, cx| Gallery::view(name.as_deref(), window, cx),
            cx,
        );
    });
}

loyy77 avatar Oct 16 '25 14:10 loyy77