Closed Bug 2066014 Opened 3 months ago Closed 2 months ago

[devtools-toolbox-crash] Error: Connection closed, pending request to server0.conn0.watcher2.process11//domwalker200, type querySelector failed

Categories

(DevTools :: Inspector, defect, P3)

defect

Tracking

(firefox157 fixed)

RESOLVED FIXED
157 Branch
Tracking Status
firefox157 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

(Blocks 1 open bug)

Details

Attachments

(3 external files)

Frequent markup view crash https://gist.github.com/juliandescottes/79d6ded7c2519bf5cc00bf2314d8dd94#2-error--frontjs-error-undefined---552-errors-118 + https://gist.github.com/juliandescottes/79d6ded7c2519bf5cc00bf2314d8dd94#4-error--frontjs-error-undefined---345-errors-74 (2 different stack traces).

Reproduced locally by slowing down local transport and spamming reload:

diff --git a/devtools/shared/DevToolsUtils.js b/devtools/shared/DevToolsUtils.js
index d22182dc65b3..27231fb79c3e 100644
--- a/devtools/shared/DevToolsUtils.js
+++ b/devtools/shared/DevToolsUtils.js
@@ -14,6 +14,10 @@ var {
   callFunctionWithAsyncStack,
 } = require("resource://devtools/shared/platform/stack.js");
 
+const { setTimeout } = ChromeUtils.importESModule(
+  "resource://gre/modules/Timer.sys.mjs"
+);
+
 const lazy = {};
 
 if (!isWorker) {
@@ -75,9 +79,11 @@ exports.executeSoon = function (fn) {
     } else {
       executor = fn;
     }
-    Services.tm.dispatchToMainThread({
-      run: exports.makeInfallible(executor),
-    });
+    setTimeout(() => {
+      Services.tm.dispatchToMainThread({
+        run: exports.makeInfallible(executor),
+      });
+    }, 100);
   }
 };
Error: Connection closed, pending request to server0.conn0.watcher2.process11//domwalker200, type querySelector failed 

Request stack: 
request@resource://devtools/shared/protocol/Front.js:335:14
generateRequestMethods/</frontProto[name]@resource://devtools/shared/protocol/Front/FrontClassWithSpec.js:94:19
querySelector@resource://devtools/client/fronts/walker.js:150:34
#getDefaultNodeForSelection/defaultNodeSelectors<@resource://devtools/client/inspector/inspector.js:729:20
#getDefaultNodeForSelection@resource://devtools/client/inspector/inspector.js:736:20
Depends on: 2066044
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Pushed by jdescottes@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/fb2fa0e69671 https://hg.mozilla.org/integration/autoland/rev/6389b44ff497 [devtools] Do not show inspector's AppErrorBoundary if rootNodeFront was destroyed r=ochameau,devtools-reviewers https://github.com/mozilla-firefox/firefox/commit/074de696c2cc https://hg.mozilla.org/integration/autoland/rev/3b56c7b85cf1 [devtools] Delay final inspector setup until first root node is ready r=devtools-reviewers,ochameau https://github.com/mozilla-firefox/firefox/commit/b7777d4bc594 https://hg.mozilla.org/integration/autoland/rev/9856faa787e2 [devtools] Bail in inspector onRootNodeAvailable if the target changed during mid-flight r=ochameau,devtools-reviewers
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 157 Branch
Regressions: 2069964
QA Whiteboard: [qa-triage-done-c158/b157]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: