FyroxEngine/Fyrox · warning
Floating window name is empty, wrong widget will be used as…
Error message
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!
What it means
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.
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.
Example fix
// before (saved layout)
{"floating_windows":[{"name":"","offset":...}]}
// after
{"floating_windows":[{"name":"InspectorWindow","offset":...}]} Defensive patterns
Strategy: validation
Validate before calling
// Validate layout before set_layout
for fw in &layout.floating_windows {
assert!(!fw.name.is_empty(), "floating window descriptor missing name: {:?}", fw);
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- Window name is empty, wrong widget will be used as a tile…
- Animation pool must be empty on load!
- duplicate visiting names detected!
- Graph pool must be empty on load!
- Registering empty path.
AI-assisted analysis of FyroxEngine/Fyrox@76c91aad8e (2026-09-10).
Data as JSON: /api/errors/a1b281eaa6fd9849.
Report an issue: GitHub.
Appendix: source
Thrown at fyrox-ui/src/dock/mod.rs:295
TileContent::Empty => (),
}
}
}
// Destroy the root tile with all descendant tiles.
ui.send(root_tile_handle, WidgetMessage::Remove);
// Re-create the tiles according to the layout and attach it to the docking manager.
if let Some(root_tile_descriptor) = layout_descriptor.root_tile_descriptor.as_ref() {
let root_tile = root_tile_descriptor.create_tile(ui, &windows);
ui.send(root_tile, WidgetMessage::LinkWith(self.handle));
}
// Restore floating windows.
self.floating_windows.borrow_mut().clear();
for floating_window_desc in layout_descriptor.floating_windows.iter() {
if floating_window_desc.name.is_empty() {
Log::warn(
"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!",
);
}
let floating_window = ui
.find_handle(ui.root(), &mut |n| {
n.is_or_has_field::<Window>() && n.name == floating_window_desc.name
})
.to_variant();
if floating_window.is_some() {
self.floating_windows.borrow_mut().push(floating_window);
if floating_window_desc.is_open {
ui.send(
floating_window,
WindowMessage::Open {View on GitHub (pinned to 76c91aad8e)