Closed Bug 2080839 Opened 1 month ago Closed 1 month ago

Investigate frequent toolbox crash node.isScrollable

Categories

(DevTools :: Inspector, task, P3)

task

Tracking

(firefox160 fixed)

RESOLVED FIXED
160 Branch
Tracking Status
firefox160 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 2 external files)

Top 2 for toolbox startup crashes since Firefox 157 was released.

  1. TypeError @ node.js: Error: (documentElement) - 956 errors (28.6%)

Error location:

  • get isScrollable@resource://devtools/server/actors/inspector/node.js:415:33

Affected:

  • Channels: release (943), aurora (11), nightly (2)
  • Platforms: Windows (908), Linux (31), Darwin (17)
  • Targets: server0.conn0.watcher2.process5//domwalker21 (445), server0.conn0.watcher2.process8//domwalker21 (199), server0.conn0.watcher2.process8//domwalker22 (16)

https://searchfox.org/firefox-main/rev/8e9ac3e12bbaf39d4c282dc8849221aa17d4f714/devtools/server/actors/inspector/node.js#413-418

get isScrollable() {
  return (
    this.rawNode.nodeType === Node.ELEMENT_NODE &&
    this.rawNode.hasVisibleScrollbars
  );
}

Stacktrace:

get isScrollable@resource://devtools/server/actors/inspector/node.js:415:33
NodeActor@resource://devtools/server/actors/inspector/node.js:100:27
_getOrCreateNodeActor@resource://devtools/server/actors/inspector/walker.js:515:13
documentElement@resource://devtools/server/actors/inspector/walker.js:723:17
handler@resource://devtools/shared/protocol/Actor.js:232:37
onPacket@resource://devtools/server/devtools-server-connection.js:371:58

We don't have any useful client side stack, but we can imagine this occurs when trying to get the node actor for the root node, during the inspector initialization? Although it means the guards to avoid showing the app error boundary added in Bug 2066014 are not effective in that case?

Not sure if adding a server side guard in the getter here would be useful. For now I can't reproduce the issue, trying to find a repro scenario would be a good first step.

The Bugbug bot thinks this bug should belong to the 'DevTools::Inspector' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: General → Inspector
Attached file test_server.py —

You can use the following test server to repro the issue.

STRs:

  • download and start the server
  • open localhost:8000
  • open inspector in less than 60s

The server starts sending the response immediately, but only sends the root element after a 60s delay.
(you can use smaller delays eg via http://127.0.0.1:8000/?delay=20)

Attachment #9657806 - Attachment description: WIP: Bug 2080839 - [devtools] Wait for mutation if getDefaultNodeForSelection returned null → Bug 2080839 - [devtools] Wait for mutation if getDefaultNodeForSelection returned null
Attachment #9657807 - Attachment description: WIP: Bug 2080839 - [devtools] Add test for inspector crash on document without root → Bug 2080839 - [devtools] Add test for inspector crash on document without root
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Priority: -- → P3
Pushed by jdescottes@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/41d75b3bf86d https://hg.mozilla.org/integration/autoland/rev/94fa19aa52b1 [devtools] Wait for mutation if getDefaultNodeForSelection returned null r=devtools-reviewers,devtools-backward-compat-reviewers,nchevobbe https://github.com/mozilla-firefox/firefox/commit/d1b255514841 https://hg.mozilla.org/integration/autoland/rev/c0a6b10c2812 [devtools] Add test for inspector crash on document without root r=devtools-reviewers,nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 160 Branch
QA Whiteboard: [qa-triage-done-c161/b160]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: