[Wayland] Opening a local file using the GTK file picker causes a crash without crash report (wl_display@1: error 1: invalid arguments for xdg_activation_token_v1@110.set_surface )
Categories
(Core :: Widget: Gtk, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr91 | --- | unaffected |
firefox95 | --- | unaffected |
firefox96 | --- | unaffected |
firefox97 | + | fixed |
People
(Reporter: tgnff242, Assigned: stransky)
References
(Regression)
Details
(Keywords: crash, nightly-community, regression)
Crash Data
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:97.0) Gecko/20100101 Firefox/97.0
Steps to reproduce:
- Start Firefox in native Wayland.
- Use
Ctrl + O
and select a local file to open.
Actual results:
Firefox "crashes" at step two. The crash reporter doesn't detect any crash. Nothing is logged in systemd's coredump, and using gdb ends up to an empty backtrace file.
When I enable the xdg portals, Firefox will use the KDE file picker and it doesn't crash.
Expected results:
This is a regression.
Updated•3 years ago
|
Comment 1•3 years ago
|
||
I can repro on Gnome: https://crash-stats.mozilla.org/report/index/26155d5f-fcf7-4bf6-b98e-9b0520211211
Updated•3 years ago
|
Comment 2•3 years ago
|
||
(Not sure why the tracking flags were set automatically)
Assignee | ||
Comment 3•3 years ago
|
||
Yes, I see that too. it's https://gitlab.gnome.org/GNOME/gtk/-/issues/4510 but I wonder how it's related to xdg-activation here. Will look at it after weekend.
Assignee | ||
Comment 4•3 years ago
|
||
Hm, you may see a different crash as it's reported as xdg_activation_token_v1@110.set_surface. I wonder if we use wl_surface from the filedialog or so.
Comment 6•3 years ago
•
|
||
Duplicate at bug 1745623. I stumbled upon this as it also crashes when closing a detached devtools window via the mouse.
Updated•3 years ago
|
Assignee | ||
Comment 7•3 years ago
|
||
This is very interesting bug. It happens because we use already deleted wl_surface in xdg_activation_token_v1@110.set_surface. When a file dialog is opened we get wl_keyboard_enter for it (which is expected) but when it's closed, Firefox calls focus in for main Firefox window.
But we send the focus in request in timeframe between wl_surface destroy and wl_keyboard_leave(nullptr) so we think we still have a valid surface.
Robert, I wonder if that's a compositor bug? Shall we get wl_keyboard_leave(nullptr) first and then the wl_surface may be destroyed by compositor?
Assignee | ||
Comment 8•3 years ago
|
||
Hm, I see the same behavior in KWin.
Assignee | ||
Comment 9•3 years ago
|
||
We get wl_keyboard_enter event for all wl_surfaces which includes file dialogs owned by Gtk.
We can't use such wl_surface as focus source as it's not owned/managed by Firefox.
When we request focus on Wayland, check that we should have the focus (by gFocusWindow)
and also check if we really have it (by comparing wl_surface owned by gFocusWindow and
wl_surface obtained from wl_keyboard_enter).
Updated•3 years ago
|
Comment 10•3 years ago
|
||
Updated•3 years ago
|
Comment 11•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Description
•