Closed Bug 1411622 Opened 7 years ago Closed 5 years ago

Intermittent devtools/client/inspector/markup/test/browser_markup_image_tooltip_mutations.js | Test timed out -

Categories

(DevTools :: Inspector, defect, P5)

defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE
Firefox 59

People

(Reporter: intermittent-bug-filer, Assigned: pbro)

Details

(Keywords: intermittent-failure, Whiteboard: [stockwell unknown])

Attachments

(2 files)

I hit this on a try-push:

https://treeherder.mozilla.org/#/jobs?repo=try&revision=eeb437da0a4f71f24d66bdddd3c33b18487eca89&selectedJob=148883524

Shortly after the test timeout message, I got big huge stacktrace-spew about an uncaught rejection -- quads[0] is |undefined| in this code snippet from HTMLTooltip.js:

  let quads = node.getBoxQuads({relativeTo});
  let top = quads[0].bounds.top;
  let left = quads[0].bounds.left;

https://searchfox.org/mozilla-central/rev/7f45cb7cc0229398fc99849bdc150cb6462d6966/devtools/client/shared/widgets/tooltip/HTMLTooltip.js#189

This looks like a reasonably promising avenue for investigation and fixing of this intermittent!
I looked at several of the logs for this intermittent, and found this error coming back every time:

TypeError: parent is null
MarkupView.prototype._isImagePreviewTarget<@resource://devtools/shared/base-loader.js -> resource://devtools/client/inspector/markup/markup.js:524:1

Here's the code:
https://searchfox.org/mozilla-central/source/devtools/client/inspector/markup/markup.js#524

This is executed on mouse over. Every element we hover over is analyzed to see if an image tooltip needs to be displayed.
I can see a case where parent would be null here: if target is the <html> element for example, since we only check if we walked up to <body>, we will not bail out and continue to walk up, until parent is null.

I think we simply need a null check here.
I trigger a lot of re-runs on this try build and it seems to be working so far: https://treeherder.mozilla.org/#/jobs?repo=try&revision=291d6d5f969b7cc7a2f8baa34c6482f7e3bc2d1c&group_state=expanded
Attachment #8934121 - Flags: review?(mratcliffe)
Assignee: nobody → pbrosset
Status: NEW → ASSIGNED
Comment on attachment 8934121 [details]
Bug 1411622 - Check for null nodes when searching for image preview targets in the markupview

https://reviewboard.mozilla.org/r/205068/#review213074
Attachment #8934121 - Flags: review?(mratcliffe) → review+
Pushed by pbrosset@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5b64e167771a
Check for null nodes when searching for image preview targets in the markupview r=miker
https://hg.mozilla.org/mozilla-central/rev/5b64e167771a
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 59
Recent failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=151736985&repo=mozilla-inbound&lineNumber=19160
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
There have been 30 failures in the last 7 days.

Mostly happens on opt mochitests, OSX, Linux, Windows.

:gl could you, please, take a look?

Recent log: https://treeherder.mozilla.org/logviewer.html#?repo=autoland&job_id=154770209&lineNumber=11991
Flags: needinfo?(gl)
Whiteboard: [stockwell needswork]
Any chance you can look into this again?
Flags: needinfo?(gl) → needinfo?(pbrosset)
Product: Firefox → DevTools
I never got around to investigating this again unfortunately. It's not a super super frequent test failure, but still high enough that we should look into it properly at some stage.
The thing is, it only fails on try, and mostly on debug builds it seems.
I can't make it fail locally so far (artifact build, non-debug, windows 10, in verify mode).

Looking at the logs and code, I see that after the test has updated the src attribute of the element, it attempts to show the tooltip by hovering over it again, but the test now times out because the "show" event never comes.

So it's a timing issue, and I have a feeling this might not represent an actual problem users are likely to get into when using devtools.
So my suggestion would be, if this picks up too much, to disable it on debug builds.
Flags: needinfo?(pbrosset)
I'm seeing the error message from comment 6 again:

devtools/client/inspector/markup/test/browser_markup_image_tooltip_mutations.js | A promise chain failed to handle a rejection: node.getBoxQuads(...)[0] is undefined; can't access its "getBounds" property - stack: getRelativeRect@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/widgets/tooltip/HTMLTooltip.js:272:22
_updateContainerBounds@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/widgets/tooltip/HTMLTooltip.js:481:22
show@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/widgets/tooltip/HTMLTooltip.js:434:27
async*_onMouseMove/this.toggleTimer</<@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/widgets/tooltip/TooltipToggle.js:130:11

The test fails on debug and asan only it seems (I don't fully know what asan is, but the test seems to be running as slow on those platforms as on debug, so this is still a timing issue, but we should still investigate this error and fix the code).
Status: REOPENED → RESOLVED
Closed: 6 years ago5 years ago
Resolution: --- → INCOMPLETE
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → INCOMPLETE
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → INCOMPLETE
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → INCOMPLETE
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: