{"record":{"id":"a1b281eaa6fd9849","repo":"FyroxEngine/Fyrox","slug":"floating-window-name-is-empty-wrong-widget-will-b","errorCode":null,"errorMessage":"Floating window name is empty, wrong widget will be used as a floating window. Assign a unique name to the floating window used in a docking manager!","messagePattern":"Floating window name is empty, wrong widget will be used as a floating window\\. Assign a unique name to the floating window used in a docking manager!","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"fyrox-ui/src/dock/mod.rs","lineNumber":295,"sourceCode":"                        TileContent::Empty => (),\n                    }\n                }\n            }\n\n            // Destroy the root tile with all descendant tiles.\n            ui.send(root_tile_handle, WidgetMessage::Remove);\n\n            // Re-create the tiles according to the layout and attach it to the docking manager.\n            if let Some(root_tile_descriptor) = layout_descriptor.root_tile_descriptor.as_ref() {\n                let root_tile = root_tile_descriptor.create_tile(ui, &windows);\n                ui.send(root_tile, WidgetMessage::LinkWith(self.handle));\n            }\n\n            // Restore floating windows.\n            self.floating_windows.borrow_mut().clear();\n            for floating_window_desc in layout_descriptor.floating_windows.iter() {\n                if floating_window_desc.name.is_empty() {\n                    Log::warn(\n                        \"Floating window name is empty, wrong widget will be used as a \\\n                        floating window. Assign a unique name to the floating window used in a docking \\\n                        manager!\",\n                    );\n                }\n\n                let floating_window = ui\n                    .find_handle(ui.root(), &mut |n| {\n                        n.is_or_has_field::<Window>() && n.name == floating_window_desc.name\n                    })\n                    .to_variant();\n                if floating_window.is_some() {\n                    self.floating_windows.borrow_mut().push(floating_window);\n\n                    if floating_window_desc.is_open {\n                        ui.send(\n                            floating_window,\n                            WindowMessage::Open {","sourceCodeStart":277,"sourceCodeEnd":313,"githubUrl":"https://github.com/FyroxEngine/Fyrox/blob/76c91aad8eca488ce527b1af707be8b3b24ad72d/fyrox-ui/src/dock/mod.rs#L277-L313","documentation":"When the docking manager restores a saved layout (set_layout), each serialized floating window entry is looked up by name. An empty name means the correct floating Window widget cannot be identified, so this warning is logged and the wrong widget may be used as a floating window. It indicates the serialized DockingManagerLayout contains floating window descriptors without names.","triggerScenarios":"Calling DockingManager::set_layout (directly or via handle_routed_message, e.g. loading a saved layout) with a layout whose floating_windows list contains entries with an empty name field.","commonSituations":"Restoring UI state from a previously saved layout file where the floating window was never named; hand-editing the layout JSON; creating floating windows programmatically without setting .name before serialization.","solutions":["Give every floating window a unique name (WindowBuilder .with_name(...)) before the layout is serialized.","Edit the saved layout file and set the empty 'name' field on the floating window descriptors.","Re-save the layout after fixing window names so future loads resolve correctly.","Validate layout JSON on load and reject/repair entries with empty names before calling set_layout."],"exampleFix":"// before (saved layout)\n{\"floating_windows\":[{\"name\":\"\",\"offset\":...}]}\n// after\n{\"floating_windows\":[{\"name\":\"InspectorWindow\",\"offset\":...}]}","handlingStrategy":"validation","validationCode":"// Validate layout before set_layout\nfor fw in &layout.floating_windows {\n    assert!(!fw.name.is_empty(), \"floating window descriptor missing name: {:?}\", fw);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Name every floating window at creation time.","Validate serialized layouts before restoring them.","Keep layout serialization and window naming in one code path so names are never empty.","After loading UI from a file, verify each floating window name resolves to an existing Window handle."],"tags":["gui","docking","serialization"],"backgroundTag":"empty-required-field","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"}