DioxusLabs / dioxus

Fullstack app framework for web, desktop, mobile, and more.
https://dioxuslabs.com
Apache License 2.0
20.71k stars 799 forks source link

TodoMVC crash when switching workspace #925

Closed pickfire closed 1 year ago

pickfire commented 1 year ago

Problem

When I switch to a different workspace using a pre-configured key for todomvc, it crashed.

Steps To Reproduce

Steps to reproduce the behavior:

Expected behavior

It crash when I switch to a different workspace with a shortcut key, but when I manually click on the different workspace, it works. I believe some events are not handled correctly.

Backtrace

Backtrace ``` thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: UnknownVariant("OSLeft", ["Backquote", "Backslash", "BracketLeft", "BracketRight", "Comma", "Digit0", "Digit1", "Digit2", "Digit3", "Digit4", "Digit5", "Digit6", "Digit7", "Digit8", "Digit9", "Equal", "IntlBackslash", "IntlRo", "IntlYen", "KeyA", "KeyB", "KeyC", "KeyD", "KeyE", "KeyF", "KeyG", "KeyH", "KeyI", "KeyJ", "KeyK", "KeyL", "KeyM", "KeyN", "KeyO", "KeyP", "KeyQ", "KeyR", "KeyS", "KeyT", "KeyU", "KeyV", "KeyW", "KeyX", "KeyY", "KeyZ", "Minus", "Period", "Quote", "Semicolon", "Slash", "AltLeft", "AltRight", "Backspace", "CapsLock", "ContextMenu", "ControlLeft", "ControlRight", "Enter", "MetaLeft", "MetaRight", "ShiftLeft", "ShiftRight", "Space", "Tab", "Convert", "KanaMode", "Lang1", "Lang2", "Lang3", "Lang4", "Lang5", "NonConvert", "Delete", "End", "Help", "Home", "Insert", "PageDown", "PageUp", "ArrowDown", "ArrowLeft", "ArrowRight", "ArrowUp", "NumLock", "Numpad0", "Numpad1", "Numpad2", "Numpad3", "Numpad4", "Numpad5", "Numpad6", "Numpad7", "Numpad8", "Numpad9", "NumpadAdd", "NumpadBackspace", "NumpadClear", "NumpadClearEntry", "NumpadComma", "NumpadDecimal", "NumpadDivide", "NumpadEnter", "NumpadEqual", "NumpadHash", "NumpadMemoryAdd", "NumpadMemoryClear", "NumpadMemoryRecall", "NumpadMemoryStore", "NumpadMemorySubtract", "NumpadMultiply", "NumpadParenLeft", "NumpadParenRight", "NumpadStar", "NumpadSubtract", "Escape", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "Fn", "FnLock", "PrintScreen", "ScrollLock", "Pause", "BrowserBack", "BrowserFavorites", "BrowserForward", "BrowserHome", "BrowserRefresh", "BrowserSearch", "BrowserStop", "Eject", "LaunchApp1", "LaunchApp2", "LaunchMail", "MediaPlayPause", "MediaSelect", "MediaStop", "MediaTrackNext", "MediaTrackPrevious", "Power", "Sleep", "AudioVolumeDown", "AudioVolumeMute", "AudioVolumeUp", "WakeUp", "Hyper", "Super", "Turbo", "Abort", "Resume", "Suspend", "Again", "Copy", "Cut", "Find", "Open", "Paste", "Props", "Select", "Undo", "Hiragana", "Katakana", "Unidentified", "F13", "F14", "F15", "F16", "F17", "F18", "F19", "F20", "F21", "F22", "F23", "F24", "BrightnessDown", "BrightnessUp", "DisplayToggleIntExt", "KeyboardLayoutSelect", "LaunchAssistant", "LaunchControlPanel", "LaunchScreenSaver", "MailForward", "MailReply", "MailSend", "MediaFastForward", "MediaPause", "MediaPlay", "MediaRecord", "MediaRewind", "MicrophoneMuteToggle", "PrivacyScreenToggle", "SelectTask", "ShowAllWindows", "ZoomToggle"])', /home/ivan/src/pickfire/rs/dioxus/packages/html/src/transit.rs:36:41 stack backtrace: 0: rust_begin_unwind at /rustc/9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0/library/std/src/panicking.rs:575:5 1: core::panicking::panic_fmt at /rustc/9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0/library/core/src/panicking.rs:64:14 2: core::result::unwrap_failed at /rustc/9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0/library/core/src/result.rs:1790:5 3: core::result::Result::unwrap at /rustc/9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0/library/core/src/result.rs:1112:23 4: ::deserialize at ./packages/html/src/transit.rs:36:19 5: serde_json::value::from_value at /home/ivan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_json-1.0.95/src/value/mod.rs:986:5 6: dioxus_desktop::launch_with_props::{{closure}} at ./packages/desktop/src/lib.rs:223:37 7: tao::platform_impl::platform::event_loop::EventLoop::run_return::{{closure}} at /home/ivan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tao-0.15.8/src/platform_impl/linux/event_loop.rs:1023:24 8: glib::main_context::::with_thread_default at /home/ivan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/glib-0.15.12/src/main_context.rs:156:12 9: tao::platform_impl::platform::event_loop::EventLoop::run_return at /home/ivan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tao-0.15.8/src/platform_impl/linux/event_loop.rs:947:5 10: tao::platform_impl::platform::event_loop::EventLoop::run at /home/ivan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tao-0.15.8/src/platform_impl/linux/event_loop.rs:887:21 11: tao::event_loop::EventLoop::run at /home/ivan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tao-0.15.8/src/event_loop.rs:179:5 12: dioxus_desktop::launch_with_props at ./packages/desktop/src/lib.rs:158:5 13: dioxus_desktop::launch at ./packages/desktop/src/lib.rs:60:5 14: todomvc::main at ./examples/todomvc.rs:7:5 15: core::ops::function::FnOnce::call_once at /rustc/9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0/library/core/src/ops/function.rs:250:5 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. cant send close thread message sending on a disconnected channel ```

Environment:

Questionnaire

ealmloff commented 1 year ago

I believe this was fixed by #927, but if you still have issues feel free to reopen this issue.