Closed Bug 1794455 Opened 2 years ago Closed 2 years ago

KDE/X11: Sometimes one browser window becomes unusable because requestAnimationFrame, ResizeObserver and IntersectionObserver stop working

Categories

(Core :: Widget: Gtk, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1796960
Tracking Status
firefox-esr102 --- unaffected
firefox109 --- wontfix
firefox110 --- wontfix
firefox111 --- wontfix

People

(Reporter: Oriol, Unassigned)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files, 1 obsolete file)

Recently it has started happening that sometimes when I have 2 windows, one becomes unusable:

  • Can't seemingly open new tabs (they are created but remain invisible)
  • Switching tabs behaves quite erratically
  • Hamburguer menu has no text other than the keyboard shortcuts
  • Toolbar context menu is missing most entries

I think that's because these operations delay some work with requestAnimationFrame, which stops invoking the callbacks.

I have been trying some things in the browser console, and these work fine:

setTimeout(() => console.log('setTimeout'), 0);
Promise.resolve().then(() => console.log('Promise.resolve'));
queueMicrotask(() => console.log('queueMicrotask'));

but these don't work:

requestAnimationFrame(() => console.log('requestAnimationFrame'));
new ResizeObserver(() => console.log("ResizeObserver")).observe(document.documentElement);
new IntersectionObserver(() => console.log("IntersectionObserver")).observe(document.documentElement);

So something seems broken with the event loop.

This only happens in one window, the other works fine. And I can just adopt the tabs of the broken window into a new one, which will work well:

gBrowser.addTab("about:blank", {triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal()});
gBrowser.addRangeToMultiSelectedTabs(gBrowser.tabs[0], gBrowser.tabs[gBrowser.tabs.length - 2]);
gBrowser.replaceTabsWithWindow(gBrowser.selectedTab)
    .addEventListener("before-initial-tab-adopted", function() { this.gBrowser.clearMultiSelectedTabs() }, {once: true});

I'm using Firefox 105.0 on Kubuntu 20.04. The problem has happened on 2 different PCs.

When it happens, what is document.hidden? Can you attach about:support? (Are you using Wayland or X, etc...)

Flags: needinfo?(oriol-bugzilla)
Attached file about-support.json (deleted) —

document.hidden is false in the browser console for the broken window.
I'm using X.

Flags: needinfo?(oriol-bugzilla)
Component: DOM: Core & HTML → Layout

Now I have not just one but two different windows that are broken like this (they broke at different times).
BTW, now I'm using Firefox 106.0.2 installed via snap on Ubuntu 22.04 with the KDE plasma desktop.

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

For more information, please visit auto_nag documentation.

Flags: needinfo?(dholbert)

I was keeping around a broken private window. After some days, it has started working well again. Not sure if as a side-effect of something that I did, or if windows just break or get fixed randomly.

Attached video Screen recording (obsolete) (deleted) —

This happens when I start dragging a tab and click several times. See the video.
Sometimes it doesn't happen at the 1st attempt, but I can reproduce quite consistently in less than 5 attempts.
But I'm not sure how come tabs can break requestAnimationFrame...

Attached video Screen recording (deleted) —

Firefox was not rendering the previous video, probably because I used H.265.

Attachment #9315043 - Attachment is obsolete: true

Set release status flags based on info from the regressing bug 1782049

Status: NEW → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1796960
Flags: needinfo?(dholbert)
Resolution: --- → DUPLICATE
Summary: Sometimes one browser window becomes unusable because requestAnimationFrame, ResizeObserver and IntersectionObserver stop working → KDE/X11: Sometimes one browser window becomes unusable because requestAnimationFrame, ResizeObserver and IntersectionObserver stop working
Component: Layout → Widget: Gtk
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: