FyroxEngine/Fyrox · error
Node row out of bounds
Error message
Node row out of bounds: {} row:{}, column:{} What it means
Grid layout builds row/column measurement buckets from child nodes' row/column indices. If a child's row index is not a valid index into the grid's row definitions, this error names the node type and its row/column, and the child is skipped in layout.
Solutions
- Set the child's row to an index within 0..rows.len()
- Add enough row definitions to the Grid to cover all child row indices
- Reset the child's Grid::row to the default when adding it to a new grid
- Validate row/column indices programmatically when generating grid children
Example fix
// before child.set_row(5); // grid only defines 3 rows // after let row = child.row().min(grid.row_count().saturating_sub(1)); child.set_row(row);
Defensive patterns
Strategy: validation
Validate before calling
assert!(child.row() < grid.row_count(), "child row {} exceeds grid rows", child.row()); Type guard
fn row_in_grid(child: &UiNode, grid: &Grid) -> bool { child.row() < grid.row_count() } Prevention
- Define grid rows before (or when) assigning child row indices
- Reset Grid::row on nodes moved into a differently-sized grid
- Validate generated children's row/column against grid dimensions
When it happens
Trigger: A UI node inside a Grid whose Grid::row property is >= the number of defined rows (or negative/never set while rows are explicitly defined).
Common situations: Setting grid row in code or editor after the grid was configured with fewer rows; building grids programmatically and forgetting to add row definitions; copy-pasted nodes retaining stale row indices.
Related errors
- Node column out of bounds
- Window width was
- Window height was
- Cannot add window to split tile
- Cannot subtract window from split tile
AI-assisted analysis of FyroxEngine/Fyrox@76c91aad8e (2026-09-10).
Data as JSON: /api/errors/f0e1db06a302d19a.
Report an issue: GitHub.
Appendix: source
Thrown at fyrox-ui/src/grid.rs:457
}
}
fn calc_needed_measurements(&self, ui: &UserInterface) {
let mut rows = self.rows.borrow_mut();
let mut cols = self.columns.borrow_mut();
for dim in rows.iter_mut().chain(cols.iter_mut()) {
dim.unmeasured_node_count = 0;
match dim.size_mode {
SizeMode::Auto => dim.desired_size = 0.0,
SizeMode::Strict => dim.actual_size = dim.desired_size,
SizeMode::Stretch => (),
}
}
for handle in self.children() {
let Ok(node) = ui.try_get_node(*handle) else {
continue;
};
let Some(row) = rows.get_mut(node.row()) else {
Log::err(format!(
"Node row out of bounds: {} row:{}, column:{}",
node.type_info_ref().type_name,
node.row(),
node.column()
));
continue;
};
let Some(col) = cols.get_mut(node.column()) else {
Log::err(format!(
"Node column out of bounds: {} row:{}, column:{}",
node.type_info_ref().type_name,
node.row(),
node.column()
));
continue;
};
if col.size_mode == SizeMode::Auto {
col.unmeasured_node_count += 1View on GitHub (pinned to 76c91aad8e)