zed-industries/zed · error

popup parent window not found

Error message

popup parent window not found

What it means

Guard in WaylandClient::open_window: an AnchoredPopup was requested whose explicit parent window handle does not match any live window in the client's window table, so no parent surface exists to anchor the popup to. Usually means the parent view was closed or the handle is stale by the time the popup opens.

Source

Thrown at crates/gpui_linux/src/linux/wayland/client.rs:1003

impl LinuxClient for WaylandClient {
    fn keyboard_layout(&self) -> Box<dyn PlatformKeyboardLayout> {
        Box::new(self.0.borrow().keyboard_layout.clone())
    }

    fn displays(&self) -> Vec<Rc<dyn PlatformDisplay>> {
        self.0
            .borrow()
            .outputs
            .iter()
            .map(|(id, output)| {
                Rc::new(WaylandDisplay {
                    id: id.clone(),
                    name: output.name.clone(),
                    bounds: output.bounds.to_pixels(output.scale as f32),
                }) as Rc<dyn PlatformDisplay>
            })
            .collect()
    }

    fn display(&self, id: DisplayId) -> Option<Rc<dyn PlatformDisplay>> {
        self.0
            .borrow()
            .outputs
            .iter()
            .find_map(|(object_id, output)| {
                (object_id.protocol_id() as u64 == u64::from(id)).then(|| {
                    Rc::new(WaylandDisplay {
                        id: object_id.clone(),
                        name: output.name.clone(),
                        bounds: output.bounds.to_pixels(output.scale as f32),
                    }) as Rc<dyn PlatformDisplay>
                })
            })
    }

View on GitHub (pinned to 9d272b0363)

Solutions

  1. Check the parent AnyWindowHandle is still open (window exists in state.windows) before opening the popup
  2. Delay opening the popup until the parent window is fully created and tracked
  3. Ensure popups are torn down when their parent window closes so no orphaned requests remain
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/gpui_linux/src/linux/wayland/client.rs:997 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@9d272b0363 (2026-08-20). Data as JSON: /api/errors/62c2980847c9759a. Report an issue: GitHub.