{"record":{"id":"d8d3491742daa785","repo":"FyroxEngine/Fyrox","slug":"window-height-was","errorCode":null,"errorMessage":"Window height was {}","messagePattern":"Window height was (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"fyrox-ui/src/window.rs","lineNumber":588,"sourceCode":"            match msg {\n                &WindowMessage::Open {\n                    alignment,\n                    modal,\n                    focus_content,\n                } => {\n                    // Only manage this window's visibility if it is at the root.\n                    // Otherwise, it is part of something like a tile, and that parent should decide\n                    // whether the window is visible.\n                    if !self.visibility() && self.parent() == ui.root() {\n                        ui.send(self.handle(), WidgetMessage::Visibility(true));\n                        // If we are opening the window with non-finite width and height, something\n                        // has gone wrong, so correct it.\n                        if !self.width().is_finite() {\n                            Log::err(format!(\"Window width was {}\", self.width()));\n                            self.set_width(200.0);\n                        }\n                        if !self.height().is_finite() {\n                            Log::err(format!(\"Window height was {}\", self.height()));\n                            self.set_height(200.0);\n                        }\n                    }\n                    ui.send(self.handle(), WidgetMessage::Topmost);\n                    if focus_content {\n                        ui.send(self.content_to_focus(), WidgetMessage::Focus);\n                    }\n                    if modal && !ui.restricts_picking(self.handle()) {\n                        ui.push_picking_restriction(RestrictionEntry {\n                            handle: self.handle(),\n                            stop: true,\n                        });\n                    }\n                    match alignment {\n                        WindowAlignment::None => {}\n                        WindowAlignment::Center => {\n                            if self.parent() == ui.root() {\n                                ui.send(self.handle(), WidgetMessage::Center);","sourceCodeStart":570,"sourceCodeEnd":606,"githubUrl":"https://github.com/FyroxEngine/Fyrox/blob/76c91aad8eca488ce527b1af707be8b3b24ad72d/fyrox-ui/src/window.rs#L570-L606","documentation":"In Window::handle_routed_message (fyrox-ui/src/window.rs:588), this is a Log::warn (not a panic) emitted when a WindowMessage::Open arrives for a window whose height is zero or unset. It fires when the window is opened while its stored height is 0 (the default for a never-sized window) or when a non-positive height was supplied in the open/resize message, meaning the engine would render an invisible zero-height window. The logged message reports the offending height value; the widget is still opened, so the practical effect is that the caller should set a valid height via a WindowMessage or widget bounds before/while opening. It is a diagnostic validation warning on the height input, not a state-corruption error.","triggerScenarios":"Showing a root-level Window whose height is NaN/inf, from invalid builder values, bad computed layout math, or corrupted saved geometry.","commonSituations":"Restoring window sizes from config with NaN entries; divide-by-zero in proportional layouts; omitting height in WindowBuilder.","solutions":["Set a finite explicit height in WindowBuilder: `.with_height(300.0)`","Sanitize geometry loaded from saved settings (replace non-finite with defaults)","Trace the computation producing NaN/inf and fix it","Treat the automatic 200.0 clamp as a signal to fix the actual sizing logic"],"exampleFix":"// before\nWindowBuilder::new(...).with_height(config.height) // NaN from bad config\n// after\nlet h = if config.height.is_finite() { config.height } else { 300.0 };\nWindowBuilder::new(...).with_height(h)","handlingStrategy":"validation","validationCode":"fn finite_dim(v: f32, fallback: f32) -> f32 {\n    if v.is_finite() { v } else { fallback }\n}\nlet height = finite_dim(config.height, 300.0);","typeGuard":"fn is_finite_size(w: f32, h: f32) -> bool { w.is_finite() && h.is_finite() }","tryCatchPattern":null,"preventionTips":["Set explicit finite heights in WindowBuilder","Validate saved window geometry before applying","Fix NaN-producing computations upstream instead of relying on the 200.0 clamp"],"tags":["ui","window","layout","non-finite"],"backgroundTag":"invalid-argument-value","analyzedSha":"76c91aad8eca488ce527b1af707be8b3b24ad72d","analyzedAt":"2026-09-10T16:04:01.633Z","contentChangedAt":"2026-09-10T16:04:01.633Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}