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

  1. Give every floating window a unique name (WindowBuilder .with_name(...)) before the layout is serialized.
  2. Edit the saved layout file and set the empty 'name' field on the floating window descriptors.
  3. Re-save the layout after fixing window names so future loads resolve correctly.
  4. 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

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


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)