leptos-rs / leptos

Build fast web applications with Rust.

Home Page:https://leptos.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Random wasm.__wbindgen_start() crashes

t0muxx opened this issue · comments

commented

Describe the bug

On a project using Tauri as backend and Leptos, we are currently having trouble with some crash that seems to appears randomly. These crashes happens at the application startup or when we Reload and requires either a Reload or a app kill and fresh restart.
These crashes happens pretty often (between 2/10 to 7/10 tries).
This happens on my system (Fedora 37), and on Ubuntu too. It should be noted that on Ubuntu it seems to happens less times.

Here is the stacktraces of the crashes we encountered :

  • In dev build :
    • crash type 1 :
[Error] Unhandled Promise Rejection: RuntimeError: Out of bounds memory access (evaluating 'wasm.__wbindgen_start()')
    <?>.wasm-function[core::hash::impls::<impl core::hash::Hash for u32>::hash::h49c96e0f9e440a65] (src_ui-778b67a7df262be.js:1058)
    <?>.wasm-function[<slotmap::KeyData as core::hash::Hash>::hash::he1274043b766661f]
    <?>.wasm-function[<leptos_reactive::node::NodeId as core::hash::Hash>::hash::he267642e464e4900]
    <?>.wasm-function[indexmap::map::IndexMap<K,V,S>::hash::hf6d4d355de7ea204]
    <?>.wasm-function[indexmap::map::IndexMap<K,V,S>::insert_full::h87e014e70b42b4a3]
    <?>.wasm-function[indexmap::map::IndexMap<K,V,S>::insert::ha48e91eff6994cc3]
    <?>.wasm-function[indexmap::set::IndexSet<T,S>::insert::h3ee6c22575021da7]
    <?>.wasm-function[leptos_reactive::signal::<impl leptos_reactive::node::NodeId>::subscribe::h53da37a0f1f50767]
    <?>.wasm-function[<leptos_reactive::memo::Memo<T> as leptos_reactive::signal::SignalWith<T>>::try_with::{{closure}}::h660bc99fab9b0ac4]
    <?>.wasm-function[leptos_reactive::runtime::with_runtime::{{closure}}::h384c2085e63c88c4]
    <?>.wasm-function[std::thread::local::LocalKey<T>::try_with::h7736a8b83fb30d4b]
    <?>.wasm-function[std::thread::local::LocalKey<T>::with::hb5784cc193319539]
    <?>.wasm-function[<leptos_reactive::memo::Memo<T> as leptos_reactive::signal::SignalWith<T>>::try_with::hca399f857223fd09]
    <?>.wasm-function[<leptos_reactive::memo::Memo<T> as leptos_reactive::signal::SignalWith<T>>::with::h99f65aaa1751c5f6]
    <?>.wasm-function[leptos_router::history::location::create_location::{{closure}}::ha4b4c9564b7fa83e]
    <?>.wasm-function[<leptos_reactive::memo::MemoState<T,F> as leptos_reactive::effect::AnyComputation>::run::ha556c0c97d745cc6]
    <?>.wasm-function[leptos_reactive::runtime::Runtime::update::{{closure}}::hb70cc9e3a6c99be0]
    <?>.wasm-function[leptos_reactive::runtime::Runtime::with_observer::h83739edeef6ce776]
    <?>.wasm-function[leptos_reactive::runtime::Runtime::update::h79a330e00d962024]
    <?>.wasm-function[leptos_reactive::runtime::Runtime::update_if_necessary::h250e2145cac819fe]
    <?>.wasm-function[leptos_reactive::signal::<impl leptos_reactive::node::NodeId>::try_with_no_subscription_inner::h32682f6e5b1e4e41]
    <?>.wasm-function[<leptos_reactive::memo::Memo<T> as leptos_reactive::signal::SignalGetUntracked<T>>::get_untracked::{{closure}}::h596c0070379eb8e9]
    <?>.wasm-function[leptos_reactive::runtime::with_runtime::{{closure}}::hcd31f9f63eaa67c3]
    <?>.wasm-function[std::thread::local::LocalKey<T>::try_with::hc8658184ebc962f3]
    <?>.wasm-function[std::thread::local::LocalKey<T>::with::h5605693315614c9d]
    <?>.wasm-function[<leptos_reactive::memo::Memo<T> as leptos_reactive::signal::SignalGetUntracked<T>>::get_untracked::hf7bba795f96df82c]
    <?>.wasm-function[leptos_router::components::router::RouterContext::new::h544a1b8c07230287]
    <?>.wasm-function[leptos_router::components::router::Router::__Router::h619a297d6648a4ee]
    <?>.wasm-function[leptos_router::components::router::Router::{{closure}}::h7c278d00c02f282f]
    <?>.wasm-function[<leptos_dom::components::Component<F,V> as leptos_dom::IntoView>::into_view::{{closure}}::{{closure}}::hc7871d46e236078d]
    <?>.wasm-function[leptos_reactive::scope::Scope::untrack::{{closure}}::h01211c658af23726]
    <?>.wasm-function[leptos_reactive::runtime::with_runtime::{{closure}}::h4dfc09ec71b1087e]
    <?>.wasm-function[std::thread::local::LocalKey<T>::try_with::h4877a97457644965]
    <?>.wasm-function[std::thread::local::LocalKey<T>::with::h2e6c4ff2a016d0e9]
    <?>.wasm-function[<leptos_dom::components::Component<F,V> as leptos_dom::IntoView>::into_view::{{closure}}::hf732ee21d2246e99]
    <?>.wasm-function[<leptos_dom::components::Component<F,V> as leptos_dom::IntoView>::into_view::h93c59823c0f8fb43]
    <?>.wasm-function[src_ui::components::app::App::__App::{{closure}}::h79ef7ba326b464fc]
    <?>.wasm-function[src_ui::components::app::App::__App::h44e8ee7a1c906fd7]
    <?>.wasm-function[src_ui::components::app::App::{{closure}}::hbda077d7c82a3ae4]
    <?>.wasm-function[<leptos_dom::components::Component<F,V> as leptos_dom::IntoView>::into_view::{{closure}}::{{closure}}::h7e92d57edb861b06]
    <?>.wasm-function[leptos_reactive::scope::Scope::untrack::{{closure}}::hccba1993775313d9]
    <?>.wasm-function[leptos_reactive::runtime::with_runtime::{{closure}}::h4269b5708bd064c4]
    <?>.wasm-function[std::thread::local::LocalKey<T>::try_with::h969a4f097653a465]
    <?>.wasm-function[std::thread::local::LocalKey<T>::with::h55b7ab9292b54f27]
    <?>.wasm-function[<leptos_dom::components::Component<F,V> as leptos_dom::IntoView>::into_view::{{closure}}::hb0ba6ee9b6785f82]
    <?>.wasm-function[<leptos_dom::components::Component<F,V> as leptos_dom::IntoView>::into_view::ha5b7d232b66319a5]
    <?>.wasm-function[leptos_dom::mount_to::{{closure}}::h07e7ca63e570020b]
    <?>.wasm-function[leptos_reactive::scope::create_scope::hf19172b291f84206]
    <?>.wasm-function[leptos_dom::mount_to::h6550755480c69fa9]
    <?>.wasm-function[leptos_dom::mount_to_body::h20b1c505ddcc43ed]
    <?>.wasm-function[src_ui::main::hf17c0b0765134acc]
    <?>.wasm-function[core::ops::function::FnOnce::call_once::h9198a4e6f834befa]
    <?>.wasm-function[std::sys_common::backtrace::__rust_begin_short_backtrace::h4a47b5575b9dad3d]
    <?>.wasm-function[std::rt::lang_start::{{closure}}::h6455acd01da97846]
    <?>.wasm-function[std::rt::lang_start_internal::he194b5a0b66634e9]
    <?>.wasm-function[std::rt::lang_start::h025b8fb0a9fc408c]
    <?>.wasm-function[main]
    <?>.wasm-function[]
    wasm-stub
    __wbg_finalize_init (src_ui-778b67a7df262be.js:1058)
  • crash type 2 :
[Error] Unhandled Promise Rejection: RuntimeError: Out of bounds memory access (near '...e__h8d894d71de05ecb8(arg0, arg1, addHeap...')
    <?>.wasm-function[<wasm_bindgen::JsValue as core::ops::drop::Drop>::drop::hccc4d52c7838a58b] (src_ui-5e7e7185e0a6d408.js:251:135)
    <?>.wasm-function[core::ptr::drop_in_place<wasm_bindgen::JsValue>::hfe7245c020f05ba2]
    <?>.wasm-function[core::ptr::drop_in_place<js_sys::Object>::hb1912e39e1b4e806]
    <?>.wasm-function[core::ptr::drop_in_place<js_sys::Function>::ha2da89346d9daaa3]
    <?>.wasm-function[js_sys::try_iter::ha284e7adb7a19087]
    <?>.wasm-function[<leptos_router::history::url::Url as core::convert::TryFrom<&str>>::try_from::h4e4edb3fe86572ac]
    <?>.wasm-function[leptos_router::history::location::create_location::{{closure}}::{{closure}}::h33cff23d2f1d4364]
    <?>.wasm-function[<leptos_reactive::signal::ReadSignal<T> as leptos_reactive::signal::SignalWith<T>>::with::{{closure}}::h65aec291d8226ac1]
    <?>.wasm-function[leptos_reactive::runtime::with_runtime::{{closure}}::h7f2f495332ec9460]
    <?>.wasm-function[std::thread::local::LocalKey<T>::try_with::h75289b2d9a8c7f97]
    <?>.wasm-function[std::thread::local::LocalKey<T>::with::h6215fa4df6226349]
    <?>.wasm-function[leptos_router::history::location::create_location::{{closure}}::hbb48b42e7167fc9c]
    <?>.wasm-function[<leptos_reactive::memo::MemoState<T,F> as leptos_reactive::effect::AnyComputation>::run::h97f496ee79225875]
    <?>.wasm-function[leptos_reactive::runtime::Runtime::update::{{closure}}::hb70cc9e3a6c99be0]
    <?>.wasm-function[leptos_reactive::runtime::Runtime::with_observer::h83739edeef6ce776]
    <?>.wasm-function[leptos_reactive::runtime::Runtime::update::h79a330e00d962024]
    <?>.wasm-function[leptos_reactive::runtime::Runtime::update_if_necessary::h250e2145cac819fe]
    <?>.wasm-function[leptos_reactive::runtime::Runtime::update_if_necessary::h250e2145cac819fe]
    <?>.wasm-function[leptos_reactive::runtime::Runtime::update_if_necessary::h250e2145cac819fe]
    <?>.wasm-function[leptos_reactive::signal::<impl leptos_reactive::node::NodeId>::try_with_no_subscription_inner::h32682f6e5b1e4e41]
    <?>.wasm-function[<leptos_reactive::memo::Memo<T> as leptos_reactive::signal::SignalWith<T>>::try_with::{{closure}}::he513d2a14806cd2d]
    <?>.wasm-function[leptos_reactive::runtime::with_runtime::{{closure}}::he34c05d960f3324b]
    <?>.wasm-function[std::thread::local::LocalKey<T>::try_with::hc23e44f13a820de4]
    <?>.wasm-function[std::thread::local::LocalKey<T>::with::h8ca4ac2235b57881]
    <?>.wasm-function[<leptos_reactive::memo::Memo<T> as leptos_reactive::signal::SignalWith<T>>::try_with::ha5d57fcf3a8ae842]
    <?>.wasm-function[<leptos_reactive::memo::Memo<T> as leptos_reactive::signal::SignalWith<T>>::with::h4ea69f0e5bd25556]
    <?>.wasm-function[leptos_router::components::link::A::__A::inner::{{closure}}::h6074c6defa6542b6]
    <?>.wasm-function[<T as leptos_dom::macro_helpers::into_attribute::IntoAttribute>::into_attribute::{{closure}}::hd35f503c87320da5]
    <?>.wasm-function[leptos_dom::macro_helpers::into_attribute::attribute_helper::{{closure}}::haebdb8e863a8a65d]
    <?>.wasm-function[<leptos_reactive::effect::Effect<T,F> as leptos_reactive::effect::AnyComputation>::run::hb2475a8598ce34a9]
    <?>.wasm-function[leptos_reactive::runtime::Runtime::update::{{closure}}::hb70cc9e3a6c99be0]
    <?>.wasm-function[leptos_reactive::runtime::Runtime::with_observer::h83739edeef6ce776]
    <?>.wasm-function[leptos_reactive::runtime::Runtime::update::h79a330e00d962024]
    <?>.wasm-function[leptos_reactive::runtime::Runtime::update_if_necessary::h250e2145cac819fe]
    <?>.wasm-function[leptos_reactive::runtime::Runtime::run_effects::ha122a979b09e5850]
    <?>.wasm-function[leptos_reactive::signal::<impl leptos_reactive::node::NodeId>::update::{{closure}}::hb7cfa8da363c28db]
    <?>.wasm-function[leptos_reactive::runtime::with_runtime::{{closure}}::heb739153b9de4945]
    <?>.wasm-function[std::thread::local::LocalKey<T>::try_with::hebeee51a2d2523c9]
    <?>.wasm-function[std::thread::local::LocalKey<T>::with::h99dd4558da931464]
    <?>.wasm-function[leptos_router::components::router::RouterContextInner::navigate_from_route::{{closure}}::h981741e2893fb21b]
    <?>.wasm-function[leptos_reactive::scope::Scope::untrack::{{closure}}::h990d5d6adcf951b1]
    <?>.wasm-function[leptos_reactive::runtime::with_runtime::{{closure}}::h38d4c652d83e3bb6]
    <?>.wasm-function[std::thread::local::LocalKey<T>::try_with::h2ca763e137b131bc]
    <?>.wasm-function[std::thread::local::LocalKey<T>::with::h24587499ab04fe0d]
    <?>.wasm-function[leptos_router::components::router::RouterContextInner::navigate_from_route::h91886e7642943bae]
    <?>.wasm-function[leptos_router::hooks::use_navigate::{{closure}}::h5588218ad305bb29]
    <?>.wasm-function[src_ui::leptos_helpers::navigate_to::h229d608f02de8e42]
    <?>.wasm-function[src_ui::leptos_helpers::navigate_to_absolute::h3d3f74a466475b64]
    <?>.wasm-function[src_ui::components::splash::Splash::__Splash::{{closure}}::h879064f889079fa1]
    <?>.wasm-function[<leptos_reactive::effect::Effect<T,F> as leptos_reactive::effect::AnyComputation>::run::h65c03cccd257ca8c]
    <?>.wasm-function[leptos_reactive::runtime::Runtime::update::{{closure}}::hb70cc9e3a6c99be0]
    <?>.wasm-function[leptos_reactive::runtime::Runtime::with_observer::h83739edeef6ce776]
    <?>.wasm-function[leptos_reactive::runtime::Runtime::update::h79a330e00d962024]
    <?>.wasm-function[leptos_reactive::runtime::Runtime::update_if_necessary::h250e2145cac819fe]
    <?>.wasm-function[leptos_reactive::runtime::Runtime::run_effects::ha122a979b09e5850]
    <?>.wasm-function[leptos_reactive::signal::<impl leptos_reactive::node::NodeId>::update::{{closure}}::h9a51058497b507bc]
    <?>.wasm-function[leptos_reactive::runtime::with_runtime::{{closure}}::hb118d785a0506a10]
    <?>.wasm-function[std::thread::local::LocalKey<T>::try_with::hc7c09717bb970879]
    <?>.wasm-function[std::thread::local::LocalKey<T>::with::h001d2abd60205d75]
    <?>.wasm-function[<leptos_reactive::signal::WriteSignal<T> as leptos_reactive::signal::SignalSet<T>>::set::h73cd1f3eadcf6208]
    <?>.wasm-function[src_ui::components::splash::Splash::__Splash::{{closure}}::{{closure}}::hbc76587fe20e9c96]
    <?>.wasm-function[<core::pin::Pin<P> as core::future::future::Future>::poll::h36fbc9c3528ebff5]
    <?>.wasm-function[leptos_server::action::ActionState<I,O>::dispatch::{{closure}}::h91064d4eecf9c6d0]
    <?>.wasm-function[wasm_bindgen_futures::task::singlethread::Task::run::hf43c7c9a7cad0107]
    <?>.wasm-function[wasm_bindgen_futures::queue::QueueState::run_all::h28566b46ac207345]
    <?>.wasm-function[wasm_bindgen_futures::queue::Queue::new::{{closure}}::h62a4847efff71951]
    <?>.wasm-function[<dyn core::ops::function::FnMut<(A,)>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::h8d894d71de05ecb8]
    wasm-stub
    __wbg_adapter_63 (src_ui-5e7e7185e0a6d408.js:251:135)
    real (src_ui-5e7e7185e0a6d408.js:216)
  • In release build :
    • crash type 1 :
[Error] Unhandled Promise Rejection: RuntimeError: Out of bounds memory access (evaluating 'wasm.__wbindgen_start()')
    <?>.wasm-function[indexmap::set::IndexSet<T,S>::iter::h7e54a105d7a147f0] (src_ui-2f855d8bbc19ab92.js:1062)
    <?>.wasm-function[leptos_reactive::runtime::Runtime::update::h0ab7e2c835d95f01]
    <?>.wasm-function[leptos_reactive::runtime::Runtime::update_if_necessary::h9d4b02fa0c9551b1]
    <?>.wasm-function[leptos_reactive::signal::<impl leptos_reactive::node::NodeId>::try_with_no_subscription_inner::h31377ca23962c1f0]
    <?>.wasm-function[<leptos_reactive::memo::Memo<T> as leptos_reactive::signal::SignalWith<T>>::try_with::{{closure}}::h931d0f700af41e10]
    <?>.wasm-function[leptos_reactive::runtime::with_runtime::{{closure}}::hcb5365fac21a0dbc]
    <?>.wasm-function[std::thread::local::LocalKey<T>::try_with::he7134ac3fed5f3a8]
    <?>.wasm-function[std::thread::local::LocalKey<T>::with::ha9d00d6e5f2aeda1]
    <?>.wasm-function[<leptos_reactive::memo::Memo<T> as leptos_reactive::signal::SignalWith<T>>::try_with::h5f292792f5b89bab]
    <?>.wasm-function[<leptos_reactive::memo::Memo<T> as leptos_reactive::signal::SignalWith<T>>::with::hceb9ecf7f63df37c]
    <?>.wasm-function[leptos_router::history::location::create_location::{{closure}}::h8cd6f703d6d9ad25]
    <?>.wasm-function[<leptos_reactive::memo::MemoState<T,F> as leptos_reactive::effect::AnyComputation>::run::h518719647c6d1c0b]
    <?>.wasm-function[leptos_reactive::runtime::Runtime::update::{{closure}}::ha64704b5523bdee8]
    <?>.wasm-function[leptos_reactive::runtime::Runtime::with_observer::h49db6c1f085bed65]
    <?>.wasm-function[leptos_reactive::runtime::Runtime::update::h0ab7e2c835d95f01]
    <?>.wasm-function[leptos_reactive::runtime::Runtime::update_if_necessary::h9d4b02fa0c9551b1]
    <?>.wasm-function[leptos_reactive::signal::<impl leptos_reactive::node::NodeId>::try_with_no_subscription_inner::h31377ca23962c1f0]
    <?>.wasm-function[<leptos_reactive::memo::Memo<T> as leptos_reactive::signal::SignalGetUntracked<T>>::get_untracked::{{closure}}::h7c3f7e52265a05fe]
    <?>.wasm-function[leptos_reactive::runtime::with_runtime::{{closure}}::hcc39f7a8e6e623d3]
    <?>.wasm-function[std::thread::local::LocalKey<T>::try_with::hd68f004dafe1c827]
    <?>.wasm-function[std::thread::local::LocalKey<T>::with::h6f6e449ed49ad61d]
    <?>.wasm-function[<leptos_reactive::memo::Memo<T> as leptos_reactive::signal::SignalGetUntracked<T>>::get_untracked::hec61a69b7a043a5f]
    <?>.wasm-function[leptos_router::components::router::RouterContext::new::h5aefb63f243977fc]
    <?>.wasm-function[leptos_router::components::router::Router::__Router::h69e0301582481a06]
    <?>.wasm-function[leptos_router::components::router::Router::{{closure}}::h7b06404844ade7d4]
    <?>.wasm-function[<leptos_dom::components::Component<F,V> as leptos_dom::IntoView>::into_view::{{closure}}::{{closure}}::h1f1118db5bdd1e04]
    <?>.wasm-function[leptos_reactive::scope::Scope::untrack::{{closure}}::h1f3575f198a73d4a]
    <?>.wasm-function[leptos_reactive::runtime::with_runtime::{{closure}}::h6ab579e6c4e89382]
    <?>.wasm-function[std::thread::local::LocalKey<T>::try_with::h8441ad9219f6db24]
    <?>.wasm-function[std::thread::local::LocalKey<T>::with::hf90f8e8dbdcb7a30]
    <?>.wasm-function[<leptos_dom::components::Component<F,V> as leptos_dom::IntoView>::into_view::{{closure}}::h7beaf652ca2975eb]
    <?>.wasm-function[<leptos_dom::components::Component<F,V> as leptos_dom::IntoView>::into_view::hc397b7d34c49634e]
    <?>.wasm-function[src_ui::components::app::App::__App::{{closure}}::h45ce92b7415a1377]
    <?>.wasm-function[src_ui::components::app::App::__App::hd951970156095976]
    <?>.wasm-function[src_ui::components::app::App::{{closure}}::he0234537e144635c]
    <?>.wasm-function[<leptos_dom::components::Component<F,V> as leptos_dom::IntoView>::into_view::{{closure}}::{{closure}}::h925dbd48d551d9e9]
    <?>.wasm-function[leptos_reactive::scope::Scope::untrack::{{closure}}::h6587b69267fb25e2]
    <?>.wasm-function[leptos_reactive::runtime::with_runtime::{{closure}}::hb7fdbe9a46284f7e]
    <?>.wasm-function[std::thread::local::LocalKey<T>::try_with::h6c9820deabf1a478]
    <?>.wasm-function[std::thread::local::LocalKey<T>::with::he5651ceecba8781f]
    <?>.wasm-function[<leptos_dom::components::Component<F,V> as leptos_dom::IntoView>::into_view::{{closure}}::h18357576f546240a]
    <?>.wasm-function[<leptos_dom::components::Component<F,V> as leptos_dom::IntoView>::into_view::h0cd38ed303bee402]
    <?>.wasm-function[leptos_dom::mount_to::{{closure}}::h9bc0382efa24fd90]
    <?>.wasm-function[leptos_reactive::scope::create_scope::hf754b564a6b1894c]
    <?>.wasm-function[leptos_dom::mount_to::h63f892a993ad2e28]
    <?>.wasm-function[leptos_dom::mount_to_body::ha9199a6d1093c6ec]
    <?>.wasm-function[src_ui::main::h8bcfc90c12012444]
    <?>.wasm-function[core::ops::function::FnOnce::call_once::h098bbe117ce50d01]
    <?>.wasm-function[std::sys_common::backtrace::__rust_begin_short_backtrace::hfb717d6722cd46f0]
    <?>.wasm-function[std::rt::lang_start::{{closure}}::h2704a9444998ee39]
    <?>.wasm-function[std::rt::lang_start_internal::h74fcf0f0f75355d6]
    <?>.wasm-function[std::rt::lang_start::h9e843949dd9b4016]
    <?>.wasm-function[main]
    <?>.wasm-function[]
    wasm-stub
    __wbg_finalize_init (src_ui-2f855d8bbc19ab92.js:1062)
  • crash type 2 :

	[Error] Unhandled Promise Rejection: RuntimeError: Unreachable code should not be executed (evaluating 'wasm.__wbindgen_start()')
	<?>.wasm-function[__rust_start_panic] (src_ui-2f855d8bbc19ab92.js:1062)
	<?>.wasm-function[rust_panic]
	<?>.wasm-function[std::panicking::rust_panic_with_hook::h85b7f6628c291e12]
	<?>.wasm-function[std::panicking::begin_panic_handler::{{closure}}::h1e17bad04a5713a4]
	<?>.wasm-function[std::sys_common::backtrace::__rust_end_short_backtrace::h63adae5c31458c4b]
	<?>.wasm-function[rust_begin_unwind]
	<?>.wasm-function[core::panicking::panic_fmt::hf5c4cd929d4aaa9e]
	<?>.wasm-function[core::fmt::Arguments::new_v1::h6c8e756ac0aac9ae]
	<?>.wasm-function[wasm_bindgen::UnwrapThrowExt::unwrap_throw::h15497ae58d738c3c]
	<?>.wasm-function[leptos_dom::macro_helpers::into_attribute::attribute_expression::he3097725448177a0]
	<?>.wasm-function[leptos_dom::macro_helpers::into_attribute::attribute_helper::h96f8cc108bed728f]
	<?>.wasm-function[src_ui::components::dark_switch::DarkSwitch::__DarkSwitch::h3bdb6ceacb57fd62]
	<?>.wasm-function[src_ui::components::dark_switch::DarkSwitch::{{closure}}::h438a82faf4ec677b]
	<?>.wasm-function[<leptos_dom::components::Component<F,V> as leptos_dom::IntoView>::into_view::{{closure}}::{{closure}}::h2809f9860c8571e1]
	<?>.wasm-function[leptos_reactive::scope::Scope::untrack::{{closure}}::h4d62a7b5593e6e00]
	<?>.wasm-function[leptos_reactive::runtime::with_runtime::{{closure}}::h3f5f9405ae94d64f]
	<?>.wasm-function[std::thread::local::LocalKey<T>::try_with::h6cfecb9fd9e9f1f5]
	<?>.wasm-function[std::thread::local::LocalKey<T>::with::h05808a9e9981ef63]
	<?>.wasm-function[<leptos_dom::components::Component<F,V> as leptos_dom::IntoView>::into_view::{{closure}}::h3c57f11b5feb2987]
	<?>.wasm-function[<leptos_dom::components::Component<F,V> as leptos_dom::IntoView>::into_view::h0d59531f062fee4f]
	<?>.wasm-function[src_ui::components::app::App::__App::{{closure}}::h45ce92b7415a1377]
	<?>.wasm-function[src_ui::components::app::App::__App::hd951970156095976]
	<?>.wasm-function[src_ui::components::app::App::{{closure}}::he0234537e144635c]
	<?>.wasm-function[<leptos_dom::components::Component<F,V> as leptos_dom::IntoView>::into_view::{{closure}}::{{closure}}::h925dbd48d551d9e9]
	<?>.wasm-function[leptos_reactive::scope::Scope::untrack::{{closure}}::h6587b69267fb25e2]
	<?>.wasm-function[leptos_reactive::runtime::with_runtime::{{closure}}::hb7fdbe9a46284f7e]
	<?>.wasm-function[std::thread::local::LocalKey<T>::try_with::h6c9820deabf1a478]
	<?>.wasm-function[std::thread::local::LocalKey<T>::with::he5651ceecba8781f]
	<?>.wasm-function[<leptos_dom::components::Component<F,V> as leptos_dom::IntoView>::into_view::{{closure}}::h18357576f546240a]
	<?>.wasm-function[<leptos_dom::components::Component<F,V> as leptos_dom::IntoView>::into_view::h0cd38ed303bee402]
	<?>.wasm-function[leptos_dom::mount_to::{{closure}}::h9bc0382efa24fd90]
	<?>.wasm-function[leptos_reactive::scope::create_scope::hf754b564a6b1894c]
	<?>.wasm-function[leptos_dom::mount_to::h63f892a993ad2e28]
	<?>.wasm-function[leptos_dom::mount_to_body::ha9199a6d1093c6ec]
	<?>.wasm-function[src_ui::main::h8bcfc90c12012444]
	<?>.wasm-function[core::ops::function::FnOnce::call_once::h098bbe117ce50d01]
	<?>.wasm-function[std::sys_common::backtrace::__rust_begin_short_backtrace::hfb717d6722cd46f0]
	<?>.wasm-function[std::rt::lang_start::{{closure}}::h2704a9444998ee39]
	<?>.wasm-function[std::rt::lang_start_internal::h74fcf0f0f75355d6]
	<?>.wasm-function[std::rt::lang_start::h9e843949dd9b4016]
	<?>.wasm-function[main]
	<?>.wasm-function[]
	wasm-stub
	__wbg_finalize_init (src_ui-2f855d8bbc19ab92.js:1062)

We tried to find out if those crashes was caused by our code by commenting our App code but we're still having the crashes.

Leptos Dependencies

leptos = { version = "0.3", features = ["csr", "stable"] }
leptos_router = { version = "0.3", features = ["csr", "stable"] }
leptos_meta = { version = "0.3", features = ["csr", "stable"] }

To Reproduce
Steps to reproduce the behavior:

  1. Build the app using cargo tauri dev or cargo tauri build
  2. Run the app

Expected behavior
The application should not crash during startup and should load the front-end correctly.

Screenshots
image

Additional context
We would happily submit a PR to fix this issue, but we don't have any clue where we can start to debug this issue.

If you can share a minimal reproducible example that shows these crashes, I'd be happy to take a look at it. I haven't used Tauri myself and I've never seen something like this (out of bounds memory access) in a Leptos app, although maybe it's just an error I'm not familiar with from one of the browsers.

When you say "build the app" and "run the app" in the steps to reproduce, is this is your app you're talking about or some kind of template? I didn't see a link to anything.

Each of these panics is a completely different stack trace coming from a completely different part of the library, so without some kind of reproduction I'm not sure there's anything more I can say.

commented

Hello,

Thanks for your reply. I think I found the easiest way to reproduce this :

  1. Create a Tauri app using cargo create-tauri-app
  2. Select Rust as front-end language
  3. Select Leptos as UI template.

image

  1. Now you can cd into the project directory
  2. Run the app using cargo tauri dev

You can also runs this AppImage : https://file.io/bHydcO8Qogp1

In this gif you can see an example of what happens :
example_crash_1
(This time I had to Reload three times to trigger the crash, but sometimes it happens at first start)

Here is another example when using the AppImage generated by Tauri.
example_crash_2
(You can see the second time the application crashes directly)

Here the stacktrace for the AppImage crash showed in the second gif :

[Error] Unhandled Promise Rejection: RuntimeError: Out of bounds memory access (evaluating 'wasm.__wbindgen_start()')
	<?>.wasm-function[<core::ops::range::Range<T> as core::iter::range::RangeIteratorImpl>::spec_next::h3493bfa1c83689c0] (simple_tauri-ui-1ab3807f002cf035.js:612)
	<?>.wasm-function[hashbrown::raw::RawTable<T,A>::reserve_rehash::h0df02fc92d3732c6]
	<?>.wasm-function[hashbrown::raw::RawTable<T,A>::reserve::he78b09bc926dc5d6]
	<?>.wasm-function[hashbrown::raw::RawTable<T,A>::insert::he8c7050594e584cb]
	<?>.wasm-function[hashbrown::map::HashMap<K,V,S,A>::insert::h9ecaaed66e46521f]
	<?>.wasm-function[std::collections::hash::map::HashMap<K,V,S>::insert::h64033b5ce0031489]
	<?>.wasm-function[wasm_bindgen::cache::intern::intern_str::{{closure}}::hfc149233e98d0906]
	<?>.wasm-function[std::thread::local::LocalKey<T>::try_with::h9d4a9da45480ff98]
	<?>.wasm-function[std::thread::local::LocalKey<T>::with::ha9f8fe47bd6e2acc]
	<?>.wasm-function[wasm_bindgen::cache::intern::intern_str::h6be9c9dc760c4424]
	<?>.wasm-function[wasm_bindgen::cache::intern::intern::h7c54f19bec3b4022]
	<?>.wasm-function[leptos_dom::macro_helpers::into_attribute::attribute_expression::hc409944e2bb40b69]
	<?>.wasm-function[leptos_dom::macro_helpers::into_attribute::attribute_helper::hbb2a7bf719392218]
	<?>.wasm-function[leptos_dom::html::HtmlElement<El>::attr::hd54b2d67b56cbdff]
	<?>.wasm-function[simple_tauri_ui::app::App::__App::h96d468f593b2a0b1]
	<?>.wasm-function[simple_tauri_ui::app::App::{{closure}}::h8cdbfebf99b7a761]
	<?>.wasm-function[<leptos_dom::components::Component<F,V> as leptos_dom::IntoView>::into_view::{{closure}}::{{closure}}::h0524795692986efb]
	<?>.wasm-function[leptos_reactive::scope::Scope::untrack::{{closure}}::h0bbc56ad205189f0]
	<?>.wasm-function[leptos_reactive::runtime::with_runtime::{{closure}}::h679e36f7b2175a70]
	<?>.wasm-function[std::thread::local::LocalKey<T>::try_with::h6a71c4d50f3effdf]
	<?>.wasm-function[std::thread::local::LocalKey<T>::with::hba426d13c4746014]
	<?>.wasm-function[leptos_reactive::runtime::with_runtime::hf97cee0094fb9cac]
	<?>.wasm-function[leptos_reactive::scope::Scope::untrack::h960e84e71426c0b0]
	<?>.wasm-function[<leptos_dom::components::Component<F,V> as leptos_dom::IntoView>::into_view::{{closure}}::hdb7b5275bcf67ecc]
	<?>.wasm-function[leptos_reactive::runtime::RuntimeId::run_scope_undisposed::{{closure}}::hdf03b3c6372455aa]
	<?>.wasm-function[leptos_reactive::runtime::with_runtime::{{closure}}::h03245065c7bb56c9]
	<?>.wasm-function[std::thread::local::LocalKey<T>::try_with::h65f14408650f91a5]
	<?>.wasm-function[std::thread::local::LocalKey<T>::with::h73ee471d03d23c31]
	<?>.wasm-function[leptos_reactive::runtime::with_runtime::haf90368b74fb3ab9]
	<?>.wasm-function[leptos_reactive::runtime::RuntimeId::run_scope_undisposed::h93d6cb71d323cdb2]
	<?>.wasm-function[leptos_reactive::scope::Scope::run_child_scope::h20a2eef1723f37de]
	<?>.wasm-function[<leptos_dom::components::Component<F,V> as leptos_dom::IntoView>::into_view::h7fd459a69f0bb269]
	<?>.wasm-function[leptos_dom::mount_to::{{closure}}::h559a9aa829031d0f]
	<?>.wasm-function[leptos_reactive::runtime::RuntimeId::run_scope_undisposed::{{closure}}::hfdae2983c50351b3]
	<?>.wasm-function[leptos_reactive::runtime::with_runtime::{{closure}}::h050b555debb9e59e]
	<?>.wasm-function[std::thread::local::LocalKey<T>::try_with::hb04eac951b351d1c]
	<?>.wasm-function[std::thread::local::LocalKey<T>::with::h4818ac081e2bb340]
	<?>.wasm-function[leptos_reactive::runtime::with_runtime::h0dea0ae7a582c67e]
	<?>.wasm-function[leptos_reactive::runtime::RuntimeId::run_scope_undisposed::hd28c4182eb63da07]
	<?>.wasm-function[leptos_reactive::scope::create_scope::hafd1368a7c59fc50]
	<?>.wasm-function[leptos_dom::mount_to::h7864d28fe20dc3ff]
	<?>.wasm-function[leptos_dom::mount_to_body::hc76810f9ea603d70]
	<?>.wasm-function[simple_tauri_ui::main::h76301195363a9267]
	<?>.wasm-function[core::ops::function::FnOnce::call_once::h4bb26effe80ac674]
	<?>.wasm-function[std::sys_common::backtrace::__rust_begin_short_backtrace::h5be555db7414087c]
	<?>.wasm-function[std::rt::lang_start::{{closure}}::h146d3d9b2c566eef]
	<?>.wasm-function[std::rt::lang_start_internal::hbecc6ff7763fb2f1]
	<?>.wasm-function[std::rt::lang_start::h4beab990d7379f3a]
	<?>.wasm-function[main]
	<?>.wasm-function[]
	wasm-stub
	__wbg_finalize_init (simple_tauri-ui-1ab3807f002cf035.js:612)

For you question : "When you say "build the app" and "run the app" in the steps to reproduce, is this is your app you're talking about or some kind of template? I didn't see a link to anything."

  • I was referring to building my app with cargo tauri build and running the generated AppImage sorry if it was unclear.

Hopes it's more clear.

Thanks

Thanks. I can't reproduce with Tauri on macOS, which is the only thing I have access to to test it in, with either the default Leptos 0.2 template there, or Leptos 0.3. That seems reasonable to me as Tauri is using the native webview on various platforms, which means we're running in different browser contexts.

Do other Tauri Rust/WASM app templates work for you? I'm a little unsure of how best to proceed here.

commented

Hello,

Well after testing with some other Tauri/Rust templates, it seems that the crashes happens with them too.
So from my understanding this is more related to the WebView (webkit2gtk according to Tauri documentation).

I think we can close this issue as it is not related specifically to Leptos.

Thanks for your time

Bummer! But thanks for investigating further and glad it wasn't on our end.