{"record":{"id":"92a558a8b774f5ef","repo":"zed-industries/zed","slug":"failed-to-create-draw-duration-histogram-error","errorCode":null,"errorMessage":"Failed to create draw duration histogram: {error}","messagePattern":"Failed to create draw duration histogram: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/gpui/src/profiler.rs","lineNumber":918,"sourceCode":"    pending_input_count: u64,\n    input_latency_histogram: Histogram<u64>,\n    events_per_frame_histogram: Histogram<u64>,\n    mid_draw_events_dropped: u64,\n    last_present_at: Option<Instant>,\n    animating_at_last_present: bool,\n    pending_frame: Option<FrameTiming>,\n}\n\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());","sourceCodeStart":900,"sourceCodeEnd":936,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/gpui/src/profiler.rs#L900-L936","documentation":"Error from WindowProfiler::new when hdrhistogram's Histogram::new(3) fails while creating the draw-duration histogram; the profiler cannot be constructed, so window profiling for this window is aborted.","triggerScenarios":"Thrown at crates/gpui/src/profiler.rs:918 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry window creation; the failure is typically an allocation error in Histogram::new","Check available system memory if failures repeat","Disable the `profiler` feature if histograms are not needed for the build"],"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"}