{"record":{"id":"5a04ec771c178059","repo":"emilk/egui","slug":"failed-to-find-current-viewport-in-egui-rawinput","errorCode":null,"errorMessage":"Failed to find current viewport in egui RawInput. This is the fault of the egui backend","messagePattern":"Failed to find current viewport in egui RawInput\\. This is the fault of the egui backend","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/egui/src/data/input/raw_input.rs","lineNumber":117,"sourceCode":"            screen_rect: None,\n            max_texture_side: None,\n            time: None,\n            predicted_dt: 1.0 / 60.0,\n            events: vec![],\n            hovered_files: Default::default(),\n            dropped_files: Default::default(),\n            focused: true, // integrations opt into global focus tracking\n            system_theme: None,\n            safe_area_insets: Default::default(),\n        }\n    }\n}\n\nimpl RawInput {\n    /// Info about the active viewport\n    #[inline]\n    pub fn viewport(&self) -> &ViewportInfo {\n        self.viewports.get(&self.viewport_id).expect(\"Failed to find current viewport in egui RawInput. This is the fault of the egui backend\")\n    }\n\n    /// Helper: move volatile (deltas and events), clone the rest.\n    ///\n    /// * [`Self::hovered_files`] is cloned.\n    /// * [`Self::dropped_files`] is moved.\n    pub fn take(&mut self) -> Self {\n        Self {\n            viewport_id: self.viewport_id,\n            viewports: self\n                .viewports\n                .iter_mut()\n                .map(|(id, info)| (*id, info.take()))\n                .collect(),\n            screen_rect: self.screen_rect.take(),\n            safe_area_insets: self.safe_area_insets.take(),\n            max_texture_side: self.max_texture_side.take(),\n            time: self.time,","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/emilk/egui/blob/d802a982ce959839d92f4f6718fdffa41143110e/crates/egui/src/data/input/raw_input.rs#L99-L135","documentation":"Error \"Failed to find current viewport in egui RawInput. This is the fault of the egui backend\" thrown in emilk/egui.","triggerScenarios":"Thrown at crates/egui/src/data/input/raw_input.rs:117 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d802a982ce959839d92f4f6718fdffa41143110e","analyzedAt":"2026-08-16T20:07:53.954Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}