bevyengine/bevy · error
The DiagnosticsList has be tempered with. Valid Displays for
Error message
The DiagnosticsList has be tempered with. Valid Displays for aDiagnosticsList are Grid or None.
What it means
Panic in collapse_on_click_to_header: the DiagnosticsList node's Display is neither Grid nor None, so the collapse toggle cannot compute the next display mode. Only possible if user code set an incompatible display value on the internal list node.
Source
Thrown at crates/bevy_dev_tools/src/diagnostics_overlay.rs:488
let Ok(children) = diagnostics_overlays.get_mut(child_of.get()) else {
unreachable!("DiagnosticsOverlay has been tempered with. Do not despawn its children.");
};
let mut lists_iter = diagnostics_overlay_contents
.iter_many_mut(children.collection())
.matched();
let Some(mut node) = lists_iter.fetch_next() else {
panic!(
"DiagnosticsOverlay has been tempered with. DiagnosticsOverlay must\
have a child with DiagnosticsList."
);
};
let next_display_mode = match node.display {
Display::Grid => Display::None,
Display::None => Display::Grid,
_ => panic!(
"The DiagnosticsList has be tempered with. Valid Displays for a\
DiagnosticsList are Grid or None."
),
};
node.display = next_display_mode;
if lists_iter.fetch_next().is_some() {
panic!(
"DiagnosticsOverlay has been tempered with. DiagnosticsOverlay must\
only ever have one single child with DiagnosticsList."
);
}
}
}
fn bring_to_front(
mut event: On<PointerPress>,
mut commands: Commands,View on GitHub (pinned to 396ca72708)
Solutions
- Only use Display::Grid or Display::None on the diagnostics list
- Avoid restyling the overlay's internal DiagnosticsList node
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at crates/bevy_dev_tools/src/diagnostics_overlay.rs:488 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of bevyengine/bevy@396ca72708 (2026-08-20).
Data as JSON: /api/errors/a04d58bccc18ea66.
Report an issue: GitHub.