{"record":{"id":"a1b19f8dc2e0fe74","repo":"iced-rs/iced","slug":"wait-for-compositor","errorCode":null,"errorMessage":"Wait for compositor","messagePattern":"Wait for compositor","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"winit/src/lib.rs","lineNumber":603,"sourceCode":"                            // a runtime re-poll\n                            // TODO: Send compositor through proxy (?)\n                            {\n                                let (sender, _receiver) = oneshot::channel();\n\n                                proxy.send_action(Action::Window(\n                                    runtime::window::Action::GetLatest(sender),\n                                ));\n                            }\n                        }\n                    };\n\n                    #[cfg(target_arch = \"wasm32\")]\n                    wasm_bindgen_futures::spawn_local(create_compositor);\n\n                    #[cfg(not(target_arch = \"wasm32\"))]\n                    runtime.block_on(create_compositor);\n\n                    match compositor_receiver.await.expect(\"Wait for compositor\") {\n                        Ok(new_compositor) => {\n                            compositor = Some(new_compositor);\n                        }\n                        Err(error) => {\n                            let _ = control_sender.start_send(Control::Crash(error.into()));\n                            continue;\n                        }\n                    }\n                }\n\n                let window_theme = window\n                    .theme()\n                    .map(conversion::theme_mode)\n                    .unwrap_or_default();\n\n                if system_theme != window_theme {\n                    system_theme = window_theme;\n","sourceCodeStart":585,"sourceCodeEnd":621,"githubUrl":"https://github.com/iced-rs/iced/blob/d146509d893945de5c304cfaf4301335eee278bd/winit/src/lib.rs#L585-L621","documentation":"Panic from `compositor_receiver.await.expect(\"Wait for compositor\")` in run_instance. The oneshot sender is moved into the create_compositor future, so a None result means that future was dropped before sending — e.g. the spawned local task was cancelled — an internal invariant violation.","triggerScenarios":"The create_compositor future is dropped before calling sender.send (spawn_local task cancelled on wasm32, or runtime.block_on future aborted), leaving compositor_receiver to yield None.","commonSituations":"wasm32 event loop shutdown cancelling the spawned task; panics inside Compositor::new propagating as task cancellation; runtime teardown during first-window creation.","solutions":["Update iced/winit to a version with a robust compositor handshake","Ensure Compositor::new does not panic (check GPU/driver support, backend settings)","Test on the target platform; on wasm32 keep the event loop alive until the first window opens"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Ensure the GPU backend works before launching: test Compositor::new in a smoke test on the target platform","typeGuard":null,"tryCatchPattern":"// Rust panics are not catchable; validate backend/GPU support before running the app","preventionTips":["Verify GPU/driver support for the chosen renderer backend before deploying","Keep the event loop alive until the first window opens","Update iced/winit regularly"],"tags":["panic","async","compositor","channel"],"backgroundTag":"internal-invariant-violation","analyzedSha":"d146509d893945de5c304cfaf4301335eee278bd","analyzedAt":"2026-09-11T16:54:14.229Z","contentChangedAt":"2026-09-11T16:54:14.229Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}