{"record":{"id":"a38be6ca0663afa9","repo":"zed-industries/zed","slug":"failed-to-create-events-per-frame-histogram-erro","errorCode":null,"errorMessage":"Failed to create events per frame histogram: {error}","messagePattern":"Failed to create events per frame histogram: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/gpui/src/profiler.rs","lineNumber":929,"sourceCode":"    /// 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 {\n            started_at: Instant::now(),\n            kind,\n        });","sourceCodeStart":911,"sourceCodeEnd":947,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/gpui/src/profiler.rs#L911-L947","documentation":"In WindowProfiler::new (behind the `profiler` feature): constructing the events-per-frame hdrhistogram failed, aborting profiler initialization. Internal histogram allocation failure within the frame-timing metrics setup.","triggerScenarios":"Thrown at crates/gpui/src/profiler.rs:929 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry; the error is usually a transient allocation failure in Histogram::new","Check system memory if it occurs repeatedly","Build without the `profiler` feature when frame metrics are unnecessary"],"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"}