{"record":{"id":"4900b94375aa7083","repo":"bevyengine/bevy","slug":"diagnosticsoverlay-has-been-tempered-with-diagnos-4900b9","errorCode":null,"errorMessage":"DiagnosticsOverlay has been tempered with. DiagnosticsOverlay mustonly ever have one single child with DiagnosticsList.","messagePattern":"DiagnosticsOverlay has been tempered with\\. DiagnosticsOverlay mustonly ever have one single child with DiagnosticsList\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/bevy_dev_tools/src/diagnostics_overlay.rs","lineNumber":496,"sourceCode":"        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\\\n            only ever have one single child with DiagnosticsList.\"\n            );\n        }\n    }\n}\n\nfn bring_to_front(\n    mut event: On<PointerPress>,\n    mut commands: Commands,\n    diagnostics_overlays: Query<(), With<DiagnosticsOverlay>>,\n    diagnostics_overlay_plane: Single<Entity, With<DiagnosticsOverlayPlane>>,\n) {\n    let entity = event.entity;\n    if diagnostics_overlays.contains(entity) {\n        event.propagate(false);\n        commands\n            .entity(entity)","sourceCodeStart":478,"sourceCodeEnd":514,"githubUrl":"https://github.com/bevyengine/bevy/blob/396ca727080776bd313bb892423b7d94e03b81b4/crates/bevy_dev_tools/src/diagnostics_overlay.rs#L478-L514","documentation":"Guard in collapse_on_click_to_header: after toggling the first DiagnosticsList node, a second entity with DiagnosticsList was found under the same overlay, which the single-list invariant forbids. Indicates duplicated children were inserted into the overlay hierarchy.","triggerScenarios":"Thrown at crates/bevy_dev_tools/src/diagnostics_overlay.rs:496 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Do not spawn additional DiagnosticsList children under the overlay","Rebuild the overlay through the plugin if extra children were added"],"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-14T00:17:10.932Z"}