Closed Bug 1743898 Opened 4 years ago Closed 4 years ago

Context menu on tab that was just opened often immediately disappears

Categories

(Firefox :: Menus, defect)

defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: jesup, Unassigned)

Details

Attachments

(3 files)

Sometime in the last month or two context(RMB) menus opened for a newly opened-and-loading tab just show up and disappear. Re-clicking to open them sometimes works, and sometimes closes immediately. After a short while, they will open without problems.

Linux, nightly builds. Currently running 2021/11/04 build (haven't restarted this browser in a while)

How reproducible is this for you? Could you test this with mozregression?

Flags: needinfo?(rjesup)

It happens constantly. It is on my "big" profile, so mozregression may be tricky if it doesn't repo outside of my profile. I'll see

Flags: needinfo?(rjesup)

I've noticed another factor: even after it's loaded, sometimes when I right-click the tab the menu flashes and disappears -- and the tab reloads

Flags: needinfo?(jaws)

Do you have any extensions installed? Could you try disabling them for a few days and see if it comes back?

Flags: needinfo?(jaws) → needinfo?(rjesup)

Turning all extensions off without restarting didn't change anything.

Disabling all extensions and restarting, I still see it. It's less universal right after a restart, and is never 100%, but it happens >50% of the time after I've opened a few tabs.

I normally see it on opening links from a pinned tab, they make a new tab, and I frequent right-click immediately to select Move To End.

Flags: needinfo?(rjesup)

The severity field is not set for this bug.
:jaws, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jaws)

If you can see this in a local build, maybe get C++ (MozWalkTheStack(stderr)) and JS stacks (xpc_DumpJSStack or w/e) for what's hiding the popup (e.g. from https://searchfox.org/mozilla-central/rev/07c3bd159f79f81f86050d5e002a14ed741f34f7/layout/xul/nsXULPopupManager.cpp#1093 )? That's ultimately the question here. Without that, other folks being able to reproduce, or a regression window, it's going to be difficult to do something about this. I'll add Emilio as we made some changes to popups recently (but much more recently than 4th of Nov I think, so...) in case he has other ideas.

Flags: needinfo?(rjesup)
Flags: needinfo?(emilio)

Oh, also, is this the same profile that has hwaccel / layer accel disabled? Maybe about:support info would be useful.

Is this on Wayland or on X11? There's been a bunch of Wayland popup management changes that landed these last few months.

Flags: needinfo?(emilio)

X11. I can try with a local build, but how do I put a breakpoint on that such that it will catch this? ^c in gdb, set break, then open link and rmb? (I assume) with a breakpoint on the line you cited (shouldn't that work in nightlys if I have the symbols?)

Flags: needinfo?(rjesup)

(In reply to Randell Jesup [:jesup] (needinfo me) from comment #10)

X11. I can try with a local build, but how do I put a breakpoint on that such that it will catch this? ^c in gdb, set break, then open link and rmb? (I assume) with a breakpoint on the line you cited (shouldn't that work in nightlys if I have the symbols?)

I don't know gdb, but yeah a breakpoint should work. However, a bunch of stuff relating to popups cares about focus and/or user input, and so for stuff like this I often find that trace-logging is more effective than actually breaking into a debugger, because event delivery etc. gets confused otherwise - ymmv of course.

Yes, I've seen similar bug lately - it was related to wrong focus handling from WM. Please attach your about:support and run firefox with popup log. Run firefox on terminal with evn variable:

MOZ_LOG="WidgetPopup:5"

try to reproduce the issue. Try to keep the log as small as possible so just run Firefox, open the popup and when disappears quit firefox and attach the log here.

Thanks.

Flags: needinfo?(rjesup)
Attached file support
Flags: needinfo?(rjesup)
Attached file huge.tgz

Here they are. Several attempts, then a hit. I opened the File menu and selected quit

Flags: needinfo?(stransky)

Thanks. From the log it looks like we create lot of zero-sized popups which are not shown (the "store position of hidden popup window" line).
Please run the FF with MOZ_LOG="Widget:5, WidgetPopup:5" and attach the log here.
Thanks.

Flags: needinfo?(stransky) → needinfo?(rjesup)
Attached file popup.tgz
Flags: needinfo?(rjesup)

Started browser, opening link twice without hitting the problem, hit it on the 3rd (IIRC) attempt. Grabbed the current log at that point. Link was just a bugzilla link

Flags: needinfo?(stransky)

Thanks, will look at it.

Moving over to Widget::Gtk while stransky checks it out.

Component: Menus → Widget: Gtk
Product: Firefox → Core

I'm looking to the log but I don't see anything from widget POV what can cause the popup close:

[Parent 290177: Main Thread]: D/WidgetPopup [7f79e7bf3c00]: OnEnterNotify
[Parent 290177: Main Thread]: D/WidgetPopup [7f79e7bf3c00]: received expose event 7f7a23847f80 0x2a002e6 (rects follow):
.... -> why is nsWindow::Show() called?
[Parent 290177: Main Thread]: D/WidgetPopup [7f79e7bf3c00]: nsWindow::Show state 0 frame Frame(7f7b1db146f0) menupopup
[Parent 290177: Main Thread]: D/WidgetPopup [7f79e7bf3c00]: nsWindow::NativeShow hide

may it be cause some extension or so? There isn't any rollup event, mouse click, focus change from compositor....
previous popups seems to be closed by mouse clicks.

Flags: needinfo?(stransky)

I have very limited extensions: facebook container, multiaccount containers, phab-test-policy, searchfox in phabricator, tab stats (by glandium), and Web Archives (Recommended (by Mozilla))

Sometimes (more rarely) when I right-click a tab it closes the menu immediately and reloads the tab, instead of just cancelling.

Who should get this next? I can still repro

Moving back to Menus for now

Component: Widget: Gtk → Menus
Product: Core → Firefox

You can try to put some debug code/breakpoint to nsWindow::Show(false) when sWindow::IsPopup() is true and see why it's called - what's on JS stack for instance.

(In reply to Martin Stránský [:stransky] (ni? me) from comment #22)

You can try to put some debug code/breakpoint to nsWindow::Show(false) when sWindow::IsPopup() is true and see why it's called - what's on JS stack for instance.

Passing this back to jesup so we can figure this out. Randall, if it's easy to repro I'm happy to jump on a call and attempt to do some debugging with you if that's any good - feel free to drop something on my calendar.

Flags: needinfo?(rjesup)

Hey jesup, we're going to close this bug out as INCOMPLETE because we haven't heard from you in over 2 weeks on it. If you're able to provide the information requested in comment 22 / 23, we can reopen the bug.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
Flags: needinfo?(jaws)
Flags: needinfo?(rjesup)

This bug seems to have gone away a while ago

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: