[D&D] GeckoMain[..]: Couldn't map window as subsurface because its parent is not mapped
Categories
(Core :: Widget: Gtk, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox101 | --- | fixed |
People
(Reporter: d8v1r3rhk, Assigned: stransky)
References
(Blocks 2 open bugs)
Details
Crash Data
Attachments
(7 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0
Steps to reproduce:
I'm running Firefox Developer Edition 95 on Arch Linux.
Actual results:
Non stop logging to journal:
nov 04 10:50:42 desktop GeckoMain[6631]: Couldn't map window 0x7fa816a0cda0 as subsurface because its parent is not mapped.
nov 04 10:50:42 desktop GeckoMain[6631]: Couldn't map window 0x7fa7fb3f37e0 as subsurface because its parent is not mapped.
nov 04 10:50:42 desktop GeckoMain[6631]: Couldn't map window 0x7fa7fb3f3640 as subsurface because its parent is not mapped.
nov 04 10:50:42 desktop GeckoMain[6631]: Couldn't map window 0x7fa81a956da0 as subsurface because its parent is not mapped.
nov 04 10:50:42 desktop GeckoMain[6631]: Couldn't map window 0x7fa8130f0120 as subsurface because its parent is not mapped.
nov 04 10:50:42 desktop GeckoMain[6631]: Couldn't map window 0x7fa815f215c0 as subsurface because its parent is not mapped.
nov 04 10:50:42 desktop GeckoMain[6631]: Couldn't map window 0x7fa816a0eae0 as subsurface because its parent is not mapped.
nov 04 10:50:42 desktop GeckoMain[6631]: Couldn't map window 0x7fa7fb3f3300 as subsurface because its parent is not mapped.
nov 04 10:50:42 desktop GeckoMain[6631]: Couldn't map window 0x7fa7f7ecdfc0 as subsurface because its parent is not mapped.
nov 04 10:50:42 desktop GeckoMain[6631]: Couldn't map window 0x7fa7f7eceb20 as subsurface because its parent is not mapped.
nov 04 10:50:42 desktop GeckoMain[6631]: Couldn't map window 0x7fa7f7ecb8c0 as subsurface because its parent is not mapped.
nov 04 10:50:42 desktop GeckoMain[6631]: Couldn't map window 0x7fa8130ee720 as subsurface because its parent is not mapped.
nov 04 10:50:42 desktop GeckoMain[6631]: Couldn't map window 0x7fa7f9f6c7e0 as subsurface because its parent is not mapped.
nov 04 10:50:42 desktop GeckoMain[6631]: Couldn't map window 0x7fa8003b60a0 as subsurface because its parent is not mapped.
nov 04 10:50:42 desktop GeckoMain[6631]: Couldn't map window 0x7fa816a0cda0 as subsurface because its parent is not mapped.
nov 04 10:50:42 desktop GeckoMain[6631]: Couldn't map window 0x7fa7fb3f37e0 as subsurface because its parent is not mapped.
nov 04 10:50:42 desktop GeckoMain[6631]: Couldn't map window 0x7fa7fb3f3640 as subsurface because its parent is not mapped.
nov 04 10:50:42 desktop GeckoMain[6631]: Couldn't map window 0x7fa81a956da0 as subsurface because its parent is not mapped.
nov 04 10:50:42 desktop GeckoMain[6631]: Couldn't map window 0x7fa8130f0120 as subsurface because its parent is not mapped.
nov 04 10:50:42 desktop GeckoMain[6631]: Couldn't map window 0x7fa815f215c0 as subsurface because its parent is not mapped.
nov 04 10:50:42 desktop GeckoMain[6631]: Couldn't map window 0x7fa816a0eae0 as subsurface because its parent is not mapped.
nov 04 10:50:42 desktop GeckoMain[6631]: Couldn't map window 0x7fa7fb3f3300 as subsurface because its parent is not mapped.
nov 04 10:50:42 desktop GeckoMain[6631]: Couldn't map window 0x7fa7f7ecdfc0 as subsurface because its parent is not mapped.
nov 04 10:50:42 desktop GeckoMain[6631]: Couldn't map window 0x7fa7f7eceb20 as subsurface because its parent is not mapped.
nov 04 10:50:42 desktop GeckoMain[6631]: Couldn't map window 0x7fa7f7ecb8c0 as subsurface because its parent is not mapped.
nov 04 10:50:42 desktop GeckoMain[6631]: Couldn't map window 0x7fa8130ee720 as subsurface because its parent is not mapped.
nov 04 10:50:42 desktop GeckoMain[6631]: Couldn't map window 0x7fa7f9f6c7e0 as subsurface because its parent is not mapped.
nov 04 10:50:42 desktop GeckoMain[6631]: Couldn't map window 0x7fa8003b60a0 as subsurface because its parent is not mapped.
..
Expected results:
No logging/correct mapping(?)
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Comment 2•3 years ago
|
||
Thanks for the report! Please open about:support, click on "Copy text to clipboard" and paste it here.
Updated•3 years ago
|
I see this in my logs on Fedora 35 with GNOME desktop as well. Firefox version: 94.0 (64-bit).
I see also a lot of this type of errors in the log:
GeckoMain[247686]: Couldn't map window 0x7f9986975b20 as subsurface because its parent is not mapped.
(Maybe it happens after resuming from suspend, which on GNOME sometimes moves windows to other displays. See also: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2092)
Assignee | ||
Comment 6•3 years ago
|
||
Can you run firefox on terminal and check if you see that during regular use?
Comment 7•3 years ago
|
||
I got many of these Gdk warnings in the terminal during a Firefox Nightly session today, but only during one session:
Gdk-WARNING **: 15:41:23.308: Couldn't map window 0x7fb0b7f1d300 as subsurface because its parent is not mapped.
I have been running Firefox Nightly under KDE Plasma with Wayland for a week, but I haven't seen these warnings under KDE before in the terminal. My OS is Arch Linux.
Maybe related (?): Just a few minutes before the warnings started to appear in the terminal, there were two other warnings (and no other output in between):
Gtk-WARNING **: 15:38:51.405: Attempting to add a widget with type GtkWindow to a container of type GtkWindow, but the widget is already inside a container of type GtkWindow, please remove the widget from its existing container first.
Gtk-CRITICAL **: 15:38:51.996: gtk_bin_remove: assertion 'priv->child == child' failed
I might have seen these two warnings before under Gnome, but I don't know for sure.
Assignee | ||
Comment 8•3 years ago
|
||
Do you mind to run nightly with --g-fatal-warnings argument, it will crash for all warnings. Please submit the crash and attach a crash ID here then.
Thanks.
Comment 9•3 years ago
|
||
Here is the report for
Gdk-WARNING **: 09:28:12.090: Couldn't map window 0x7f5c4b46c5c0 as subsurface because its parent is not mapped.
:
https://crash-stats.mozilla.org/report/index/8db6036d-23e1-4ce8-bf3b-0d1840211123
Before I got that one, I triggered two other crashes for
Gdk-CRITICAL **: (...): gdk_window_get_width: assertion 'GDK_IS_WINDOW (window)' failed
which were immediately followed by (but obviously not reported)
Gdk-CRITICAL **: (...): gdk_window_get_height: assertion 'GDK_IS_WINDOW (window)' failed
.
Here is the first one:
https://crash-stats.mozilla.org/report/index/0d71c371-1be3-4424-8cbc-f51a30211123
I will continue to run with --g-fatal-warnings and hope to catch the Gtk warnings mentioned in comment 7.
Comment 10•3 years ago
|
||
Finally the report for
Gtk-WARNING **: 19:15:46.942: Attempting to add a widget with type GtkWindow to a container of type GtkWindow, but the widget is already inside a container of type GtkWindow, please remove the widget from its existing container first.
:
https://crash-stats.mozilla.org/report/index/4c3747eb-eb92-4a48-bed8-d07370211124
Assignee | ||
Comment 11•3 years ago
|
||
Thanks, looks like we don't have valid mGdkWindow here.
Comment 12•3 years ago
|
||
Martin, is it helpful if I file separate bug reports for the other two warnings? Those warnings aren't flooding the journal, they only occur rarely as far as I can tell.
I am quite sure that the one with gdk_window_get_width
was triggered by clicking on an extension icon, but I don't know exactly what caused the other one. But maybe you (or someone else) can figure that out by looking at the crash report? I can also run with --g-fatal-warnings and pay attention to what I am doing.
Assignee | ||
Comment 13•3 years ago
|
||
No need to file extra bug, I'll do that when I need so.
Is there any particular reproduction steps for the:
Couldn't map window 0x7f5c4b46c5c0 as subsurface because its parent is not mapped
and
Attempting to add a widget with type GtkWindow to a container of type GtkWindow, but the widget is already inside a container of type GtkWindow, please remove the widget from its existing container first.
messages? Seems to be related to D&D operations so did you re-arrange tabs by D&D for instance?
I'd need to reproduce that locally to make sure the fix is correct.
Thanks.
Assignee | ||
Updated•3 years ago
|
Comment 14•3 years ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #13)
Is there any particular reproduction steps for the:
Couldn't map window 0x7f5c4b46c5c0 as subsurface because its parent is not mapped
and
Attempting to add a widget with type GtkWindow to a container of type GtkWindow, but the widget is already inside a container of type GtkWindow, please remove the widget from its existing container first.
messages? Seems to be related to D&D operations so did you re-arrange tabs by D&D for instance?
Unfortunately I don't know how to reproduce these two warnings. I have tried to click and drag and even ALT
+TAB
in several ways, but they seem to occur randomly. Maybe the tooltips are involved? I sometimes see the subsurface warnings even for Thunderbird (91 ESR) in the journal and I am pretty sure that I don't do any strange things there. I leave the needinfo open and will investigate more.
But I can reproduce the gdk_window_get_width
warning by repeated double-clicking on extension icons.
Comment 15•3 years ago
|
||
I am now running with --g-fatal-warnings and browser.chrome.toolbar_tips
disabled to see if the warnings still occur.
Comment 16•3 years ago
|
||
(Weird) steps to reproduce Gtk-WARNING **: Attempting to add a widget with type GtkWindow to a container of type GtkWindow, but the widget is already inside a container of type GtkWindow, please remove the widget from its existing container first.
:
- Run Firefox with two tabs
- Left-click on a tab and hold the mouse button
- Press
Ctrl
and hold it - Try to drag tab to the left/right -> doesn't work
- Release
Ctrl
and left mouse button (order doesn't matter)
(The first click on the inactive tab doesn't activate it, but that doesn't matter here.) - Drag the left/right tab to the right/left -> Gtk-WARNING appears
->Gtk-CRITICAL **: gtk_bin_remove: assertion 'priv->child == child' failed
appears when mouse button is released again
These steps work under KDE, I haven't tried under Gnome. Unfortunately no steps to reproduce the subsurface warning yet, so keeping my needinfo open.
Comment 17•3 years ago
|
||
I had a crash two days ago because of the subsurface warning, that happened after I had switched tabs (don't remember if via mouse click or via Ctrl+Tab).
For comparison: I have just started Thunderbird (91) from the command line and immediately got 20 of those warnings when the UI was displayed.
Martin, would it help if I launch Firefox Nightly (or Thunderbird) with some kind of logging? It might still take a few days until I get the warning with Firefox again. :-(
Assignee | ||
Comment 18•3 years ago
|
||
(In reply to Viktor Jägersküpper from comment #17)
I had a crash two days ago because of the subsurface warning, that happened after I had switched tabs (don't remember if via mouse click or via Ctrl+Tab).
For comparison: I have just started Thunderbird (91) from the command line and immediately got 20 of those warnings when the UI was displayed.
Martin, would it help if I launch Firefox Nightly (or Thunderbird) with some kind of logging? It might still take a few days until I get the warning with Firefox again. :-(
You, you can run Firefox with MOZ_LOG="Widget:5, WidgetPopup:5" env variable and store the log.
Thanks.
Comment 20•3 years ago
|
||
Here is a log file of a session which contains two of these subsurface warnings. Firefox didn't crash although I was running it with --g-fatal-warnings, so I can't say what I did at that particular moment. I will continue to run with logging to produce a crash, unless you say that you don't need further information.
Side note: Firefox didn't always crash when a warning appeared (despite of running with --g-fatal-warnings) even before I started logging. Maybe that's another bug somewhere?
Updated•3 years ago
|
Comment 21•3 years ago
|
||
The subsurface warning has started to appear again during my current browsing session, but I don't know why or when exactly because Firefox didn't crash. I can trigger it by opening a recently closed tab (either via the toolbar icon menu or via the hamburger menu). The window number is the same every time: Couldn't map window 0x7f5f608100e0 as subsurface because its parent is not mapped.
Comment 22•3 years ago
|
||
The warning appeared while the page was loading, and it was shown twice without anything else in between.
Comment 23•3 years ago
|
||
Same issue on Firefox 94.0.2 on wayland (NixOS 21.11).
I had an issue with my screen waking up randomly from gnome's lockscreen every 10 minutes or so.
I connected via SSH to this machine and tailed the logs, everytime the screen went on, I saw a few hundreds (thousands?) of those lines:
Dec 07 20:10:27 nixos-xps GeckoMain[5723]: Couldn't map window 0x5555a0084760 as subsurface because its parent is not mapped.
Dec 07 20:10:27 nixos-xps GeckoMain[5723]: Couldn't map window 0x5555a3ebbc10 as subsurface because its parent is not mapped.
Dec 07 20:10:27 nixos-xps GeckoMain[5723]: Couldn't map window 0x5555a0084420 as subsurface because its parent is not mapped.
Dec 07 20:10:27 nixos-xps GeckoMain[5723]: Couldn't map window 0x55559ffb7570 as subsurface because its parent is not mapped.
Dec 07 20:10:27 nixos-xps GeckoMain[5723]: Couldn't map window 0x55559e4ba440 as subsurface because its parent is not mapped.
Dec 07 20:10:27 nixos-xps GeckoMain[5723]: Couldn't map window 0x5555a00840e0 as subsurface because its parent is not mapped.
Dec 07 20:10:27 nixos-xps GeckoMain[5723]: Couldn't map window 0x55559e4baac0 as subsurface because its parent is not mapped.
Dec 07 20:10:27 nixos-xps GeckoMain[5723]: Couldn't map window 0x55559e4ba2a0 as subsurface because its parent is not mapped.
Dec 07 20:10:27 nixos-xps GeckoMain[5723]: Couldn't map window 0x55558f97c2a0 as subsurface because its parent is not mapped.
Dec 07 20:10:27 nixos-xps GeckoMain[5723]: Couldn't map window 0x55558be5b1e0 as subsurface because its parent is not mapped.
Dec 07 20:10:27 nixos-xps GeckoMain[5723]: Couldn't map window 0x5555a0084900 as subsurface because its parent is not mapped.
My firefox is has a few tabs open but nothing is playing or anything.
I'll try adding "--g-fatal-warnings" and post more.
Assignee | ||
Comment 24•3 years ago
|
||
I can reproduce the 'Couldn't map window 0x7ff7e8dd8300 as subsurface because its parent is not mapped.' message with latest KDE when running testsuite:
WAYLAND_DISPLAY=wayland-1 MOZ_ENABLE_WAYLAND=1 ./mach mochitest toolkit/components/extensions/test/mochitest/
Assignee | ||
Updated•3 years ago
|
Comment 25•3 years ago
|
||
I got a crash today because of the subsurface warning. I had tried to visit some sites (which failed because of the unrelated bug 1750188) and then closed the browser via the X button in the upper right corner, which resulted in the crash. The log file is attached.
Crash report:
https://crash-stats.mozilla.org/report/index/2ce7efd9-04dd-48bc-aef1-fa9310220114
Martin, is it still useful if I run Nightly with MOZ_LOG="Widget:5, WidgetPopup:5"? So far I only got two crashes because of the subsurface warning (I forgot to keep the log file for the other one).
Comment 26•3 years ago
|
||
To avoid a possible misunderstanding: I was running Nightly with --g-fatal-warnings.
Comment 27•3 years ago
|
||
Another crash:
https://crash-stats.mozilla.org/report/index/8a42ea46-3892-40bd-bb8a-e0ea10220115
I had closed a tab so that there was only one open tab in which a page was loading. I pressed Ctrl
and got the crash notification. Log file is attached.
Comment 28•3 years ago
|
||
Yet another crash:
https://crash-stats.mozilla.org/report/index/17fe2b60-1f71-4176-ada9-ee9ec0220123
I had opened a link from a Google search in a background tab (so that there were two open tabs), and then I got the crash notification while the page in the background tab was loading. Log is attached.
Assignee | ||
Comment 29•3 years ago
|
||
Thanks, I can reproduce that on KDE too, no need for more testing.
Comment 30•3 years ago
|
||
I am seeing the Attempting to add a widget with type GtkWindow to a container of type GtkWindow, but the widget is already inside a container of type GtkWindow, please remove the widget from its existing container first.
warning when testing bug 1760449: using the firefox snap in a Wayland session under GNOME shell 42, dragging tabs to re-order them doesn't work, and this warning gets printed everytime a tab is selected to initiate a drag.
Updated•3 years ago
|
Assignee | ||
Comment 31•3 years ago
|
||
(In reply to Olivier Tilloy from comment #30)
I am seeing the
Attempting to add a widget with type GtkWindow to a container of type GtkWindow, but the widget is already inside a container of type GtkWindow, please remove the widget from its existing container first.
warning when testing bug 1760449: using the firefox snap in a Wayland session under GNOME shell 42, dragging tabs to re-order them doesn't work, and this warning gets printed everytime a tab is selected to initiate a drag.
Olivier, is that with snap only or with Mozilla binaries too?
Comment 32•3 years ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #31)
Olivier, is that with snap only or with Mozilla binaries too?
snap only
Assignee | ||
Comment 33•3 years ago
|
||
Cool, I can reproduce that on Ubuntu 22.04 with Mozilla binaries too. Will look at it.
Assignee | ||
Updated•3 years ago
|
Comment 34•3 years ago
|
||
Martin, if that helps, I have bisected mutter and gnome-shell until I identified the revision in mutter that caused the drag and drop regression in the firefox snap, and it is https://gitlab.gnome.org/GNOME/mutter/-/commit/26676a829e74859488154cd8c45de1d0b629f3ca. More specifically the changes to src/core/events.c
, apparently (now testing to confirm this).
Comment 35•3 years ago
|
||
Confirmed, I rebuilt mutter in Ubuntu 22.04 with the following patch, and the problem in the firefox snap is gone:
--- a/src/core/events.c
+++ b/src/core/events.c
@@ -523,10 +523,6 @@ meta_display_handle_event (MetaDisplay
#ifdef HAVE_WAYLAND
if (wayland_compositor && !bypass_wayland)
{
- if (window && event->type == CLUTTER_MOTION &&
- event->any.time != CLUTTER_CURRENT_TIME)
- meta_window_check_alive_on_event (window, event->any.time);
-
if (meta_wayland_compositor_handle_event (wayland_compositor, event))
bypass_clutter = TRUE;
}
Assignee | ||
Comment 36•3 years ago
|
||
Great. There's also underlying problem in Firefox (the Couldn't map window as subsurface because its parent is not mapped) so I'll look at it.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 37•3 years ago
|
||
Assignee | ||
Comment 38•3 years ago
|
||
We use mDragPopup to visualize D&D operation. When previous D&D operation is not finished and new one is started, emulate what internal Gtk routine gtk_drag_remove_icon() does
and remove mDragPopup from the previous D&D context to avoid Gtk confusion.
Depends on D143594
Updated•3 years ago
|
Comment 40•3 years ago
|
||
Comment 41•3 years ago
|
||
Comment 42•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c874e82b0386
https://hg.mozilla.org/mozilla-central/rev/68abcf729df1
https://hg.mozilla.org/mozilla-central/rev/6f268eb3628a
Updated•3 years ago
|
Description
•