zed-industries/zed · error
Failed to create events per frame histogram: {error}
Error message
Failed to create events per frame histogram: {error} What it means
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.
Source
Thrown at crates/gpui/src/profiler.rs:929
/// 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)
}
/// Records the beginning of an input dispatch. `kind` names the platform
/// input variant being dispatched (see [`crate::PlatformInput::kind_name`]).
pub fn begin_input(&mut self, kind: &'static str) {
journal::begin_foreground_turn();
self.active_activities.push(WindowActivity::Input {
started_at: Instant::now(),
kind,
});View on GitHub (pinned to f4178619ac)
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
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/gpui/src/profiler.rs:929 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/a38be6ca0663afa9.
Report an issue: GitHub.