{"record":{"id":"a745e100b7b88b3b","repo":"bevyengine/bevy","slug":"diagnosticsoverlay-has-been-tempered-with-diagnos","errorCode":null,"errorMessage":"DiagnosticsOverlay has been tempered with. DiagnosticsOverlay musthave a child with DiagnosticsList.","messagePattern":"DiagnosticsOverlay has been tempered with\\. DiagnosticsOverlay musthave a child with DiagnosticsList\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/bevy_dev_tools/src/diagnostics_overlay.rs","lineNumber":479,"sourceCode":"    diagnostics_overlay_header: Query<&ChildOf, With<DiagnosticsOverlayHeader>>,\n) {\n    if event.duration > Duration::from_millis(250) {\n        return;\n    }\n\n    let entity = event.entity;\n    if let Ok(child_of) = diagnostics_overlay_header.get(entity) {\n        event.propagate(false);\n\n        let Ok(children) = diagnostics_overlays.get_mut(child_of.get()) else {\n            unreachable!(\"DiagnosticsOverlay has been tempered with. Do not despawn its children.\");\n        };\n        let mut lists_iter = diagnostics_overlay_contents\n            .iter_many_mut(children.collection())\n            .matched();\n\n        let Some(mut node) = lists_iter.fetch_next() else {\n            panic!(\n                \"DiagnosticsOverlay has been tempered with. DiagnosticsOverlay must\\\n            have a child with DiagnosticsList.\"\n            );\n        };\n\n        let next_display_mode = match node.display {\n            Display::Grid => Display::None,\n            Display::None => Display::Grid,\n            _ => panic!(\n                \"The DiagnosticsList has be tempered with. Valid Displays for a\\\n            DiagnosticsList are Grid or None.\"\n            ),\n        };\n        node.display = next_display_mode;\n\n        if lists_iter.fetch_next().is_some() {\n            panic!(\n                \"DiagnosticsOverlay has been tempered with. DiagnosticsOverlay must\\","sourceCodeStart":461,"sourceCodeEnd":497,"githubUrl":"https://github.com/bevyengine/bevy/blob/396ca727080776bd313bb892423b7d94e03b81b4/crates/bevy_dev_tools/src/diagnostics_overlay.rs#L461-L497","documentation":"Panic in collapse_on_click_to_header: iterating the overlay's children found no node with a DiagnosticsList component, so the click-to-collapse toggle has nothing to act on. Indicates the overlay's contents were despawned or replaced by user code.","triggerScenarios":"Thrown at crates/bevy_dev_tools/src/diagnostics_overlay.rs:479 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Preserve the overlay's internal child entities","Rebuild the diagnostics overlay via the plugin rather than custom UI"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"396ca727080776bd313bb892423b7d94e03b81b4","analyzedAt":"2026-08-20T16:12:39.808Z","contentChangedAt":"2026-08-20T16:12:39.808Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}