Skip to content

test_playground_range_preserves_preview_focus_without_cancelling_native_drag[firefox_browser]: Firefox content process segfaults since #6040 #6044

Closed

Description

@leaf-agent

tests/browser/widgets/test_playgrounds.py::test_playground_range_preserves_preview_focus_without_cancelling_native_drag[firefox_browser] crashes Firefox's content process. The Chromium variant passes, and WebKit's showed no failure in the run.

playwright._impl._errors.TargetClosedError: Locator.dispatch_event: Page crashed
playwright._impl._errors.Error: Locator.click: Target crashed
playwright._impl._errors.Error: Frame.wait_for_function: Target crashed

The candidate="input" and candidate="sample" subtests pass. The crash comes in the ending="cancel" subtest, which presses on the slider and dispatches pointercancel, and the replace subtest then finds the target already gone. First seen in push run 43706688461 (0144d467a).

Diagnosis so far

  • It reproduces locally, 3 of 3 runs on current main (Playwright 1.65.0, firefox-1572). With DEBUG=pw:browser, the browser log shows WARNING: process … exited on signal 11, a segfault in a content process.
  • A git bisect run over 74008ae53..0144d467a with this test as the oracle lands on Name a playground's controls by the words beside them, so their preview doesn't repeat those words #6040 (c54c277a6), which names each playground control with aria-labelledby pointing at its visible label span instead of aria-label.
  • Restoring Name a playground's controls by the words beside them, so their preview doesn't repeat those words #6040's browser/runtime/preview.js (the ariaLabelledByElements read in labelsOf) still crashes. Restoring only the range input's aria-label=${label} in packages/playground/widgets/playground-view.js (keeping aria-labelledby on the select and choice group) passes. So the trigger is aria-labelledby on the <input type="range">.
  • A bare page (<span id="l">Max</span><input type="range" aria-labelledby="l">, mousedown prevented, mouse down, pointercancel) does not crash the same Firefox build. Something else the playground or the page does is needed too, probably the preview's focus handling or the sample iframe the test focuses first.

What remains: narrow the reproduction to that missing ingredient, then decide whether Leaf avoids the trigger (for example, naming the range by aria-label while keeping #6040's preview rule) or reports a Firefox bug with a minimal page. Reverting the range input to aria-label alone would bring back the repeated preview #6040 removed for ranges, unless the preview learns another way to see the label beside the control.

#6043 fixes #6040's other regression in the same run (the label span's id becoming a comment target). It doesn't touch this crash.

Cause of a failure tracked in #3985.

Activity

  1. added
    tend-ci-cause
    on Nov 15, 2026
  2. leaf-agent commented on Nov 15, 2026

    @leaf-agent
    CollaboratorAuthor

    The missing ingredient is Playwright itself, not the playground's focus handling. Playwright 1.65's role locator reads ariaLabelledByElements in its isolated world. Firefox segfaults once the page's world has read that property too, in either order. Upstream tracks this as microsoft/playwright#43967 and Mozilla bug 2090055. Playwright closed it as fixed by its next Firefox roll, but every Playwright release up to 1.65.2 still ships firefox-1572.

    The bare page didn't crash because nothing in the page's world read the property. The playground test gets that read from two places. Leaf's preview reads it on hover (labelsOf/markupName). A role locator's dispatch_event also resolves the name in the page's world. Each one alone is enough to crash Firefox.

    #6045 removes both reads and keeps #6040's preview rule. The preview resolves aria-labelledby by id, and the test cancels its press through an element handle. Before the change the Firefox variant crashed 3 of 3 times on main, and with both changes it passes 3 of 3 locally. CI and landing on #6045 are pending.

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

    tend-ci-cause

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions