Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic while releasing click #750

Open
jaredoconnell opened this issue Nov 16, 2024 · 1 comment
Open

Panic while releasing click #750

jaredoconnell opened this issue Nov 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jaredoconnell
Copy link
Contributor

jaredoconnell commented Nov 16, 2024

This happened while testing http_cats. This was on the vello-0.3 branch, but does not appear to be related. I wasn't paying attention to exactly what I was clicking on as I did not expect this to happen. I think I was clicking back into the window after selecting an HTTP code to display.

2024-11-15 21:19:16.753 http_cats[70767:6916910] +[IMKClient subclass]: chose IMKClient_Legacy
2024-11-15 21:19:16.753 http_cats[70767:6916910] +[IMKInputSession subclass]: chose IMKInputSession_Legacy
02:19:17.665Z DEBUG dispatch_pointer_event: Running ON_POINTER_EVENT pass with PointerEnter
02:19:17.665Z DEBUG dispatch_pointer_event: ON_POINTER_EVENT finished handled=false
02:19:18.111Z DEBUG dispatch_pointer_event: Running ON_POINTER_EVENT pass with PointerDown
02:19:18.112Z DEBUG dispatch_pointer_event: ON_POINTER_EVENT finished handled=false
02:19:18.401Z DEBUG dispatch_pointer_event: Running ON_POINTER_EVENT pass with PointerUp
02:19:18.401Z DEBUG dispatch_pointer_event: ON_POINTER_EVENT finished focused_widget=382 handled=false
02:19:18.775Z DEBUG dispatch_pointer_event: Running ON_POINTER_EVENT pass with PointerDown
02:19:18.775Z DEBUG dispatch_pointer_event: ON_POINTER_EVENT finished focused_widget=382 handled=false
02:19:18.867Z DEBUG dispatch_pointer_event: Running ON_POINTER_EVENT pass with PointerUp
02:19:18.867Z DEBUG dispatch_pointer_event: ON_POINTER_EVENT finished focused_widget=382 handled=false
02:19:19.201Z DEBUG dispatch_pointer_event: Running ON_POINTER_EVENT pass with PointerDown
02:19:19.202Z DEBUG dispatch_pointer_event: ON_POINTER_EVENT finished focused_widget=382 handled=false
02:19:19.295Z DEBUG dispatch_pointer_event: Running ON_POINTER_EVENT pass with PointerUp
02:19:19.295Z DEBUG dispatch_pointer_event: ON_POINTER_EVENT finished focused_widget=382 handled=false
02:19:19.634Z DEBUG dispatch_pointer_event: Running ON_POINTER_EVENT pass with PointerDown
02:19:19.635Z DEBUG dispatch_pointer_event: ON_POINTER_EVENT finished focused_widget=382 handled=false
02:19:19.762Z DEBUG dispatch_pointer_event: Running ON_POINTER_EVENT pass with PointerUp
02:19:19.762Z DEBUG dispatch_pointer_event: ON_POINTER_EVENT finished focused_widget=382 handled=false
02:19:20.434Z DEBUG dispatch_pointer_event: Running ON_POINTER_EVENT pass with PointerDown
02:19:20.435Z DEBUG dispatch_pointer_event: ON_POINTER_EVENT finished focused_widget=382 handled=false
02:19:20.530Z DEBUG dispatch_pointer_event: Running ON_POINTER_EVENT pass with PointerUp
02:19:20.531Z DEBUG dispatch_pointer_event: ON_POINTER_EVENT finished focused_widget=382 handled=false
02:19:23.622Z DEBUG dispatch_pointer_event: Running ON_POINTER_EVENT pass with PointerDown
02:19:23.623Z DEBUG dispatch_pointer_event: ON_POINTER_EVENT finished focused_widget=382 handled=false
02:19:23.744Z DEBUG dispatch_pointer_event: Running ON_POINTER_EVENT pass with PointerUp
02:19:23.745Z DEBUG dispatch_pointer_event: ON_POINTER_EVENT finished focused_widget=382 handled=false
02:19:23.745Z DEBUG mutate_widget{name="RootWidget"}: Action ButtonPressed(Primary) on widget WidgetId(5)
thread 'main' panicked at masonry/src/passes/update.rs:60:57:
get_pair_mut: widget not in widget tree
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at library/core/src/panicking.rs:221:5:
panic in a function that cannot unwind
stack backtrace:
02:19:23.753Z DEBUG connecting to 172.67.204.170:443
02:19:23.765Z DEBUG connected to 172.67.204.170:443
   0:        0x1037404e8 - std::backtrace_rs::backtrace::libunwind::trace::hbebc8679d47bdc2c
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
   1:        0x1037404e8 - std::backtrace_rs::backtrace::trace_unsynchronized::h3a2e9637943241aa
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:        0x1037404e8 - std::sys::backtrace::_print_fmt::he430849680584674
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/sys/backtrace.rs:65:5
   3:        0x1037404e8 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h243268f17d714c7f
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/sys/backtrace.rs:40:26
   4:        0x10375d4c0 - core::fmt::rt::Argument::fmt::h0d339881c25f3c31
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/fmt/rt.rs:173:76
   5:        0x10375d4c0 - core::fmt::write::hb3cfb8a30e72d7ff
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/fmt/mod.rs:1182:21
   6:        0x10373dbb4 - std::io::Write::write_fmt::hfb2314975de9ecf1
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/io/mod.rs:1827:15
   7:        0x1037415c4 - std::sys::backtrace::BacktraceLock::print::he14461129ccbfef5
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/sys/backtrace.rs:43:9
   8:        0x1037415c4 - std::panicking::default_hook::{{closure}}::h14c7718ccf39d316
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/panicking.rs:269:22
   9:        0x1037411e8 - std::panicking::default_hook::hc62e60da3be2f352
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/panicking.rs:296:9
  10:        0x103742088 - std::panicking::rust_panic_with_hook::h09e8a656f11e82b2
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/panicking.rs:800:13
  11:        0x1037419b0 - std::panicking::begin_panic_handler::{{closure}}::h1230eb3cc91b241c
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/panicking.rs:667:13
  12:        0x103740974 - std::sys::backtrace::__rust_end_short_backtrace::hc3491307aceda2c2
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/sys/backtrace.rs:168:18
  13:        0x1037416a0 - rust_begin_unwind
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/panicking.rs:665:5
  14:        0x1037b9c38 - core::panicking::panic_nounwind_fmt::runtime::h5290ab2b4897aadc
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/panicking.rs:112:18
  15:        0x1037b9c38 - core::panicking::panic_nounwind_fmt::h91ee161184879b56
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/panicking.rs:122:5
  16:        0x1037b9cb0 - core::panicking::panic_nounwind::heab7ebe7a6cd845c
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/panicking.rs:221:5
  17:        0x1037b9e28 - core::panicking::panic_cannot_unwind::hedc43d82620205bf
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/panicking.rs:309:5
  18:        0x102ddbb0c - winit::platform_impl::macos::view::WinitView::mouse_up::hc1d65a2417a5b41b
                               at /Users/jaredoconnell/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc2-0.5.2/src/macros/declare_class.rs:981:25
  19:        0x18ce5fb50 - <unknown>
  20:        0x18c450058 - <unknown>
  21:        0x18c44fcf4 - <unknown>
  22:        0x18cc4d59c - <unknown>
  23:        0x102e04478 - <(A,) as objc2::encode::EncodeArguments>::__invoke::h1c4103346934815c
                               at /Users/jaredoconnell/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc2-0.5.2/src/encode.rs:437:26
  24:        0x102da727c - objc2::runtime::message_receiver::msg_send_primitive::send_super::he94e26d7336ed1ae
                               at /Users/jaredoconnell/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc2-0.5.2/src/runtime/message_receiver.rs:193:18
  25:        0x102da6b08 - objc2::runtime::message_receiver::MessageReceiver::send_super_message::h699ae851f8e452ab
                               at /Users/jaredoconnell/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc2-0.5.2/src/runtime/message_receiver.rs:477:33
  26:        0x102dd4638 - objc2::__macro_helpers::msg_send::MsgSend::send_super_message::h850e8dce8558d320
                               at /Users/jaredoconnell/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc2-0.5.2/src/__macro_helpers/msg_send.rs:53:13
  27:        0x102dd4738 - objc2::__macro_helpers::msg_send::MsgSend::send_super_message_static::hfac1959fec30f438
                               at /Users/jaredoconnell/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc2-0.5.2/src/__macro_helpers/msg_send.rs:71:18
  28:        0x102dd77cc - winit::platform_impl::macos::app::WinitApplication::send_event::h27ea1dc3e3006221
                               at /Users/jaredoconnell/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.30.5/src/platform_impl/macos/app.rs:42:26
  29:        0x18c860984 - <unknown>
  30:        0x18c31bba4 - <unknown>
  31:        0x102e14824 - <() as objc2::encode::EncodeArguments>::__invoke::h6f5928d8aba6e4d0
                               at /Users/jaredoconnell/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc2-0.5.2/src/encode.rs:437:26
  32:        0x102e17a28 - objc2::runtime::message_receiver::msg_send_primitive::send::h99ea88247bbe12a0
                               at /Users/jaredoconnell/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc2-0.5.2/src/runtime/message_receiver.rs:173:18
  33:        0x102e105f4 - objc2::runtime::message_receiver::MessageReceiver::send_message::h5e88488115748189
                               at /Users/jaredoconnell/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc2-0.5.2/src/runtime/message_receiver.rs:433:38
  34:        0x102e01e48 - objc2::__macro_helpers::msg_send::MsgSend::send_message::heff409755db40683
                               at /Users/jaredoconnell/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc2-0.5.2/src/__macro_helpers/msg_send.rs:27:31
  35:        0x102e02580 - objc2_app_kit::generated::__NSApplication::NSApplication::run::h44af8435350eac88
                               at /Users/jaredoconnell/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc2-0.5.2/src/macros/extern_methods.rs:247:14
  36:        0x1024cb668 - winit::platform_impl::macos::event_loop::EventLoop<T>::run_on_demand::{{closure}}::{{closure}}::hc3bae5eecde0d389
                               at /Users/jaredoconnell/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.30.5/src/platform_impl/macos/event_loop.rs:306:26
  37:        0x102494654 - objc2::rc::autorelease::autoreleasepool::h1aadd6f68ffabbb9
                               at /Users/jaredoconnell/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc2-0.5.2/src/rc/autorelease.rs:438:15
  38:        0x1024cb5b4 - winit::platform_impl::macos::event_loop::EventLoop<T>::run_on_demand::{{closure}}::h122afc34e7a15215
                               at /Users/jaredoconnell/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.30.5/src/platform_impl/macos/event_loop.rs:292:13
  39:        0x10249ae3c - winit::platform_impl::macos::event_handler::EventHandler::set::he03df26084a4b86e
                               at /Users/jaredoconnell/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.30.5/src/platform_impl/macos/event_handler.rs:98:9
  40:        0x102494420 - winit::platform_impl::macos::app_state::ApplicationDelegate::set_event_handler::h1e52ec65bc927e89
                               at /Users/jaredoconnell/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.30.5/src/platform_impl/macos/app_state.rs:172:9
  41:        0x1024cb54c - winit::platform_impl::macos::event_loop::EventLoop<T>::run_on_demand::h72c4cc225b891300
                               at /Users/jaredoconnell/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.30.5/src/platform_impl/macos/event_loop.rs:291:9
  42:        0x1024cbb64 - winit::platform_impl::macos::event_loop::EventLoop<T>::run::hc40abbea63c601f7
                               at /Users/jaredoconnell/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.30.5/src/platform_impl/macos/event_loop.rs:278:9
  43:        0x1024f6700 - winit::event_loop::EventLoop<T>::run_app::h9778570aa6718aed
                               at /Users/jaredoconnell/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.30.5/src/event_loop.rs:265:9
  44:        0x10249e2f4 - masonry::event_loop_runner::run_with::hcee8626ae8916950
                               at /Users/jaredoconnell/Documents/repos/xilem_clean/masonry/src/event_loop_runner.rs:150:5
  45:        0x1024f1144 - xilem::Xilem<State,Logic>::run_windowed_in::h7101b380d510aa63
                               at /Users/jaredoconnell/Documents/repos/xilem_clean/xilem/src/lib.rs:145:9
  46:        0x1024e97d0 - http_cats::run::h7e4a27a85dae1f6e
                               at /Users/jaredoconnell/Documents/repos/xilem_clean/xilem/examples/http_cats.rs:224:5
  47:        0x1024e9aa4 - http_cats::main::h75bf79f717322fe8
                               at /Users/jaredoconnell/Documents/repos/xilem_clean/xilem/examples/http_cats.rs:262:5
  48:        0x1024d73b8 - core::ops::function::FnOnce::call_once::h0379d2c552bd49b1
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/ops/function.rs:250:5
  49:        0x10248c66c - std::sys::backtrace::__rust_begin_short_backtrace::h4debb1187639b6a1
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/sys/backtrace.rs:152:18
  50:        0x1024e26b8 - std::rt::lang_start::{{closure}}::h78691e8c674647ba
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/rt.rs:162:18
  51:        0x103739b84 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h4f74490c6170ea16
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/ops/function.rs:284:13
  52:        0x103739b84 - std::panicking::try::do_call::h2f36d2f1f1af8d28
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/panicking.rs:557:40
  53:        0x103739b84 - std::panicking::try::ha6af9029a7d93c94
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/panicking.rs:521:19
  54:        0x103739b84 - std::panic::catch_unwind::ha4f738ae2ba7c3a4
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/panic.rs:350:14
  55:        0x103739b84 - std::rt::lang_start_internal::{{closure}}::hf216622dc2c733e3
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/rt.rs:141:48
  56:        0x103739b84 - std::panicking::try::do_call::haa691957db1dd55f
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/panicking.rs:557:40
  57:        0x103739b84 - std::panicking::try::ha0c1a49b9fabc98e
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/panicking.rs:521:19
  58:        0x103739b84 - std::panic::catch_unwind::h68ad032c646bb0ab
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/panic.rs:350:14
  59:        0x103739b84 - std::rt::lang_start_internal::hdd117cb81a316264
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/rt.rs:141:20
  60:        0x1024e267c - std::rt::lang_start::h81d7ea7baa6cc5b8
                               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/rt.rs:161:17
  61:        0x1024e9ad4 - _main
thread caused non-unwinding panic. aborting.
@DJMcNab
Copy link
Member

DJMcNab commented Nov 18, 2024

It looks like this happens if the previously focused widget has been destroyed before update_focus runs, which is at least theoretically possible. We should be robust against this case.

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

No branches or pull requests

2 participants