Skip to content

Every page crashes Chrome's renderer at any page zoom other than 100% since #4480 #4536

Closed

Description

@max-sixty

What happens

Since #4480 (ec2280f92, "guard the chrome with one CSS rule"), every Leaf page I tried crashes Chrome's renderer on load whenever the page zoom isn't 100%, or the display's device scale factor isn't 1. The tab dies about a second after load. Before it dies, the page fetches /api/state but never posts its first /api/interaction. One user saw the whole browser go down, then crash again when it restarted and restored the tab.

I expected the page to render at any zoom, as it did before #4480.

Smallest repro

  1. Serve any page, even one heading and one paragraph, with Leaf 345ac731f090 or d0fb1f6adc32. Current main (fb71279dc) ships the same guard unchanged.
  2. Open it in desktop Chrome at 110% page zoom.
  3. The tab crashes. At 100% zoom it renders.

Under the same conditions Leaf 7c09289d1ccd, the commit before #4480, renders fine.

What I measured

All of this ran on Linux, with Google Chrome 153.0.8010.47 (headed and --headless=new) and 155.0.8059.79 (--headless=new).

  • Zoom and scale: every page zoom I tried crashes, from 0.5 to 3. So does a forced device scale factor of 1.25, 1.5 or 2 at 100% zoom. Zoom 100% at scale 1 renders.
  • macOS: untested. Because scale 2 crashes on Linux, a Retina display may crash too.
  • Headless shell: Chromium's headless shell (152 and 155) didn't crash at any device scale factor I tried, 0.67 to 2. A render check that draws with the headless shell, or only at 100% zoom and scale 1, can't see this crash.
  • One rule: deleting the guard rule in styles/chrome-guard.css stops the crash.
    • .lf-chrome ::after { all: revert-layer } alone is enough to crash.
    • The ::before, ::placeholder and element parts of the guard, each alone, don't crash.
  • Which pseudo-elements: restricting that rule to one control at a time, only the floating panel's buttons crash it: .lf-fp-leaf, .lf-fp-expand, .lf-fp-chip and .lf-fp-minimize. The reach ::after on .lf-icon-action, .lf-fp-send and .lf-compose-dictate doesn't.
  • Which longhands: within all, setting just zoom and view-timeline-inset to revert-layer on .lf-chrome ::after crashes. Either one alone doesn't.
  • Keyword: all: revert instead of all: revert-layer doesn't crash.
  • Standalone: a page outside Leaf with the same guard rules, a layered ::after reach, form fields, a modal dialog and anchor names didn't crash. So I don't have a Chromium-only reproducer yet. The renderer stops on a trap, as a failed CHECK does, during a main-frame update.

Fix candidates

  • Restate zoom after the reset in the guard. This stops the crash at 110% in Chrome 153 and 155:
    .lf-chrome, .lf-chrome *, .lf-chrome ::before, .lf-chrome ::after, .lf-chrome ::placeholder {
      all: revert-layer;
      zoom: normal;
    }
    Adding view-timeline-inset: initial instead also works. Adding zoom: unset still crashes.
  • As a stopgap from the page side, a page rule heavier than the guard works: :root .lf-chrome ::before, :root .lf-chrome ::after { zoom: normal; }. With it, the page renders in Chrome 153 and 155 at zooms 0.9, 1.1 and 1.25.
  • Users can reset the server host's page zoom to 100% with Ctrl+0. That stops every page on the host crashing.

A render check that also draws at a zoom other than 100% in full Chrome would have caught this.

Seen on leaf 345ac73.

This was written by Claude Code on behalf of max-sixty

Activity

  1. added
    bug
    on Oct 28, 2026
  2. leaf-agent commented on Oct 28, 2026

    @leaf-agent
    Collaborator

    Triage is blocked on running full Chrome in this CI sandbox; I haven't opened a fix PR or verified either proposed reset here.

    I attempted a served-page regression with installed Google Chrome 156.0.8078.73 through Playwright's chrome channel and --force-device-scale-factor=1.25. Chrome aborts before it opens the page:

    FATAL:chrome/browser/process_singleton_posix.cc:297
    Check failed: . socket() failed: Address family not supported by protocol (97)
    

    That is a browser-startup failure, not a reproduction of the reported renderer crash. The existing browser fixture launches Playwright's headless shell (_browser fixture), so its passing results would not settle the full-Chrome failure described here.

    The next verification needs a full-Chrome run outside this sandbox: a served-page startup and panel interaction at non-unit display scale, failing with the current guard and passing with the selected correction. Keeping that regression in CI would cover the rendering path the current shell checks miss. This remains unresolved; the immediate blocker is the verification environment, rather than missing reproduction details from the reporter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions