Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashed on browserbench.org/Speedometer2.1 #31142

Open
kdwk opened this issue Jan 20, 2024 · 2 comments
Open

Crashed on browserbench.org/Speedometer2.1 #31142

kdwk opened this issue Jan 20, 2024 · 2 comments
Labels
A-content/script Related to the script thread C-reproduced I-panic Servo encounters a panic.

Comments

@kdwk
Copy link

kdwk commented Jan 20, 2024

  1. Visit browserbench.org/Speedometer2.1
  2. Run the test
  3. """
    [2024-01-20T14:16:08Z ERROR script::dom::bindings::error] Error at https://browserbench.org/:22:9 "this" object does not implement interface HTMLImageElement.
    DEBUG: -------------------------------
    DEBUG: Ember : 2.6.2
    DEBUG: jQuery : 2.2.4
    DEBUG: -------------------------------
    assertion left == right failed: Attempt to use script or layout while DOM not in a stable state
    left: 1
    right: 0 (thread Script(1,4), at components/script/dom/document.rs:3264)
    [2024-01-20T14:16:28Z ERROR servo::main2] assertion left == right failed: Attempt to use script or layout while DOM not in a stable state
    left: 1
    right: 0
    """

Screenshot from 2024-01-20 22-18-37

@jdm jdm added A-content/script Related to the script thread I-panic Servo encounters a panic. labels Jan 20, 2024
@jdm
Copy link
Member

jdm commented Jan 20, 2024

From reading the stack trace and affected code, this looks like:

  • an element in the DOM tree has focus
  • the focused element is removed from the tree
  • the focus is fixed by marking the body element as focused
  • we attempt to dispatch a blur/focus event

The issue here appears to be that Node::remove adds a layout blocker, then invokes the element-specific removal logic, then removes the layout blocker. Any events dispatched by the element-specific logic will hit this problem. I'm not sure if the correct outcome here is removing the blocker sooner, or if the element-specific logic should be queued as a task instead.

@jdm
Copy link
Member

jdm commented Jan 20, 2024

There's a comment that suggests that naively moving everything to tasks may not be appropriate.

@jdm jdm self-assigned this Dec 5, 2024
@jdm jdm removed their assignment Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-content/script Related to the script thread C-reproduced I-panic Servo encounters a panic.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants