zed-industries/zed · error

Failed to create present interval histogram: {error}

Error message

Failed to create present interval histogram: {error}

What it means

In WindowProfiler::new (behind the `profiler` feature): constructing the present-interval hdrhistogram failed, aborting profiler creation for the window. This is an internal allocation/construction failure of the metrics histogram, not a rendering problem.

Source

Thrown at crates/gpui/src/profiler.rs:921

    mid_draw_events_dropped: u64,
    last_present_at: Option<Instant>,
    animating_at_last_present: bool,
    pending_frame: Option<FrameTiming>,
}

#[cfg(feature = "profiler")]
impl WindowProfiler {
    /// Creates a profiler for a window.
    pub fn new(window_id: WindowId) -> anyhow::Result<Self> {
        let profiler = Self {
            window_id,
            active_activities: SmallVec::new(),
            active_actions: SmallVec::new(),
            draw_duration_histogram: Histogram::new(3).map_err(|error| {
                anyhow::anyhow!("Failed to create draw duration histogram: {error}")
            })?,
            present_interval_histogram: Histogram::new(3).map_err(|error| {
                anyhow::anyhow!("Failed to create present interval histogram: {error}")
            })?,
            first_input_at: None,
            pending_input_count: 0,
            input_latency_histogram: Histogram::new(3).map_err(|error| {
                anyhow::anyhow!("Failed to create input latency histogram: {error}")
            })?,
            events_per_frame_histogram: Histogram::new(3).map_err(|error| {
                anyhow::anyhow!("Failed to create events per frame histogram: {error}")
            })?,
            mid_draw_events_dropped: 0,
            last_present_at: None,
            animating_at_last_present: false,
            pending_frame: None,
        };
        journal::record_frame_pending(window_id, Instant::now());
        Ok(profiler)
    }

View on GitHub (pinned to f4178619ac)

Solutions

  1. Retry opening the window; the failure is usually a transient allocation error
  2. Check system memory pressure if it recurs
  3. Build without the `profiler` feature when frame profiling is not required
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/gpui/src/profiler.rs:921 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20). Data as JSON: /api/errors/1ed669c48474d7be. Report an issue: GitHub.