{"record":{"id":"c165bfcf7df3e372","repo":"zed-industries/zed","slug":"failed-to-create-input-latency-histogram-error","errorCode":null,"errorMessage":"Failed to create input latency histogram: {error}","messagePattern":"Failed to create input latency histogram: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/gpui/src/profiler.rs","lineNumber":926,"sourceCode":"\n#[cfg(feature = \"profiler\")]\nimpl WindowProfiler {\n    /// Creates a profiler for a window.\n    pub fn new(window_id: WindowId) -> anyhow::Result<Self> {\n        let profiler = Self {\n            window_id,\n            active_activities: SmallVec::new(),\n            active_actions: SmallVec::new(),\n            draw_duration_histogram: Histogram::new(3).map_err(|error| {\n                anyhow::anyhow!(\"Failed to create draw duration histogram: {error}\")\n            })?,\n            present_interval_histogram: Histogram::new(3).map_err(|error| {\n                anyhow::anyhow!(\"Failed to create present interval histogram: {error}\")\n            })?,\n            first_input_at: None,\n            pending_input_count: 0,\n            input_latency_histogram: Histogram::new(3).map_err(|error| {\n                anyhow::anyhow!(\"Failed to create input latency histogram: {error}\")\n            })?,\n            events_per_frame_histogram: Histogram::new(3).map_err(|error| {\n                anyhow::anyhow!(\"Failed to create events per frame histogram: {error}\")\n            })?,\n            mid_draw_events_dropped: 0,\n            last_present_at: None,\n            animating_at_last_present: false,\n            pending_frame: None,\n        };\n        journal::record_frame_pending(window_id, Instant::now());\n        Ok(profiler)\n    }\n\n    /// Records the beginning of an input dispatch. `kind` names the platform\n    /// input variant being dispatched (see [`crate::PlatformInput::kind_name`]).\n    pub fn begin_input(&mut self, kind: &'static str) {\n        journal::begin_foreground_turn();\n        self.active_activities.push(WindowActivity::Input {","sourceCodeStart":908,"sourceCodeEnd":944,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/gpui/src/profiler.rs#L908-L944","documentation":"In WindowProfiler::new (behind the `profiler` feature): constructing the input-latency hdrhistogram failed, so the profiler cannot be created for the window. An internal metrics-infrastructure failure, unrelated to input handling itself.","triggerScenarios":"Thrown at crates/gpui/src/profiler.rs:926 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry window creation — typically a transient allocation failure","Check system memory if the error repeats","Disable the `profiler` feature in builds that don't need input-latency metrics"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}