Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xdg-desktop-portal crashes at gdk_window_set_transient_for() when file dialog is clicked by right mouse button #315

Open
stransky opened this issue Jun 9, 2020 · 4 comments

Comments

@stransky
Copy link

stransky commented Jun 9, 2020

Original Firefox report is here:
https://bugzilla.mozilla.org/show_bug.cgi?id=1641124

When Firefox flatpak is used, open file dialog and click by right mouse button to any file, see
video at https://bugzilla.mozilla.org/show_bug.cgi?id=1641124#c2

backtrace is:
#0 0x00007f0a2a314bb4 gdk_window_set_transient_for (libgdk-3.so.0 + 0x56bb4)
#1 0x00007f0a2a78c4f4 popover_realize.part.0 (libgtk-3.so.0 + 0x3c64f4)
#2 0x00007f0a2a7991f3 _gtk_window_add_popover (libgtk-3.so.0 + 0x3d31f3)
#3 0x00007f0a2a67a9bc gtk_popover_update_relative_to (libgtk-3.so.0 + 0x2b49bc)
#4 0x00007f0a2a67ccdb gtk_popover_set_relative_to (libgtk-3.so.0 + 0x2b6cdb)
#5 0x00007f0a29f44ef6 object_set_property (libgobject-2.0.so.0 + 0x18ef6)
...

it's fully reproducible on Fedora 32 / Firefox flatpak from https://flathub.org/apps/details/org.mozilla.firefox

@YaLTeR
Copy link

YaLTeR commented Sep 21, 2020

I have the same issue, it can be reproduced on GNOME Wayland when running any GTK Flatpak with env WAYLAND_DISPLAY= (unset).

  • gtk3-3.24.23-1.fc32.x86_64
  • xdg-desktop-portal-gtk-1.7.1-1.fc32.x86_64
  • xdg-desktop-portal-1.7.2-2.fc32.x86_64
  • mutter-3.36.6-2.fc32.x86_64
  • xorg-x11-server-Xwayland-1.20.8-3.fc32.x86_64
#0  gdk_window_set_transient_for (window=0x0, parent=0x562a5c5f0c30) at gdkwindow.c:10545
10545	  window->transient_for = parent;
[Current thread is 1 (Thread 0x7f5ce4f0fa40 (LWP 32118))]
>>> bt
#0  gdk_window_set_transient_for (window=0x0, parent=0x562a5c5f0c30 [GdkX11Window]) at gdkwindow.c:10545
#1  0x00007f5ce690b984 in popover_realize (widget=widget@entry=0x7f5ccc0a1910 [GtkPopover], popover=popover@entry=0x562a5c6e2220, window=window@entry=0x562a5c55a380 [GtkFileChooserDialog]) at gtkwidgetprivate.h:406
#2  0x00007f5ce6918683 in popover_realize (window=0x562a5c55a380 [GtkFileChooserDialog], popover=0x562a5c6e2220, widget=0x7f5ccc0a1910 [GtkPopover]) at gtkwindow.c:12505
#3  _gtk_window_add_popover (window=0x562a5c55a380 [GtkFileChooserDialog], popover=popover@entry=0x7f5ccc0a1910 [GtkPopover], parent=parent@entry=0x562a5c6be3c0 [GtkTreeView], clamp_allocation=clamp_allocation@entry=1) at gtkwindow.c:12500
#4  0x00007f5ce67f9c1c in gtk_popover_update_relative_to (popover=0x7f5ccc0a1910 [GtkPopover], relative_to=<optimized out>) at gtkpopover.c:2168
#5  0x00007f5ce67fbf9b in gtk_popover_set_relative_to (popover=0x7f5ccc0a1910 [GtkPopover], relative_to=0x562a5c6be3c0 [GtkTreeView]) at gtkpopover.c:2263
#6  0x00007f5ce60c2ef6 in object_set_property (object=object@entry=0x7f5ccc0a1910 [GtkPopover], pspec=0x562a5c6670d0 [GParamObject], value=0x7ffedb2f1e30, nqueue=nqueue@entry=0x562a5c636280) at ../gobject/gobject.c:1565
#7  0x00007f5ce60c3328 in g_object_new_internal (class=class@entry=0x562a5c1bf1d0, params=params@entry=0x7ffedb2f1ed0, n_params=n_params@entry=1) at ../gobject/gobject.c:1991
#8  0x00007f5ce60c4fac in g_object_new_valist (object_type=<optimized out>, first_property_name=first_property_name@entry=0x7f5ce6957dcd "relative-to", var_args=var_args@entry=0x7ffedb2f2020) at ../gobject/gobject.c:2262
#9  0x00007f5ce60c530d in g_object_new (object_type=<optimized out>, first_property_name=first_property_name@entry=0x7f5ce6957dcd "relative-to") at ../gobject/gobject.c:1780
#10 0x00007f5ce67fa8dd in gtk_popover_new (relative_to=<optimized out>) at gtkpopover.c:2236
#11 0x00007f5ce6737ce5 in file_list_build_popover (impl=0x562a5c535880 [GtkFileChooserWidget]) at gtkfilechooserwidget.c:2323
#12 file_list_update_popover (impl=0x562a5c535880 [GtkFileChooserWidget]) at gtkfilechooserwidget.c:2354
#13 file_list_show_popover (impl=impl@entry=0x562a5c535880 [GtkFileChooserWidget], x=43, y=18) at gtkfilechooserwidget.c:2402
#14 0x00007f5ce6738274 in list_button_press_event_cb (widget=widget@entry=0x562a5c6be3c0 [GtkTreeView], event=0x7f5c98003b20, impl=0x562a5c535880 [GtkFileChooserWidget]) at gtkfilechooserwidget.c:2467
#19 0x00007f5ce60d6c63 in <emit signal ??? on instance 0x562a5c6be3c0 [GtkTreeView]> (instance=instance@entry=0x562a5c6be3c0, signal_id=<optimized out>, detail=detail@entry=0) at ../gobject/gsignal.c:3554
    #15 0x00007f5ce694829b in _gtk_marshal_BOOLEAN__BOXED (closure=0x562a5c75a630, return_value=0x7ffedb2f2320, n_param_values=<optimized out>, param_values=0x7ffedb2f2380, invocation_hint=<optimized out>, marshal_data=<optimized out>) at gtkmarshalers.c:83
    #16 0x00007f5ce60bd88a in g_closure_invoke (closure=<optimized out>, return_value=<optimized out>, n_param_values=<optimized out>, param_values=<optimized out>, invocation_hint=<optimized out>) at ../gobject/gclosure.c:810
    #17 0x00007f5ce60d0423 in signal_emit_unlocked_R (node=<optimized out>, detail=detail@entry=0, instance=instance@entry=0x562a5c6be3c0, emission_return=emission_return@entry=0x7ffedb2f2470, instance_and_params=instance_and_params@entry=0x7ffedb2f2380) at ../gobject/gsignal.c:3742
    #18 0x00007f5ce60d63be in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7ffedb2f2520) at ../gobject/gsignal.c:3508
#20 0x00007f5ce68f1474 in gtk_widget_event_internal (widget=0x562a5c6be3c0 [GtkTreeView], event=0x7f5c98003b20) at gtkwidget.c:7808
#21 0x00007f5ce68f36e2 in gtk_widget_event_internal (event=<optimized out>, widget=<optimized out>) at gtkwidget.c:7687
#22 gtk_widget_event (widget=<optimized out>, event=<optimized out>) at gtkwidget.c:7378
#23 0x0000562a5c55a380 in  ()
#24 0x0000562a5c0b41e0 in  ()
#25 0x00007f5c98003b20 in  ()
#26 0x0000562a5c6be3c0 in  ()
#27 0x0000562a5c55a380 in  ()
#28 0x0000562a5c30ada0 in  ()
#29 0x0000000000000000 in  ()

@asegarra
Copy link

asegarra commented Jan 30, 2022

I am getting this with xwayland application like chromium, so not restricted to flatpak applications.

@wjt
Copy link

wjt commented Mar 29, 2022

The crash is preceded by this:

Mar 29 14:07:06 camille xdg-desktop-por[34318]: ../../../../gdk/gdkwindow.c:1451Subsurface windows can only be used on Wayland
Mar 29 14:07:06 camille xdg-desktop-por[34318]: gtk_widget_register_window: assertion 'GDK_IS_WINDOW (window)' failed

I just mentioned this issue to @GeorgesStavracas. I had thought that this was caused by the file chooser being a Wayland window, parented to an X11 Chromium window. But I was wrong based on misunderstanding the GNOME Shell inspector/looking glass: both are X11 windows.

@mingww64
Copy link

mingww64 commented Oct 7, 2022

Getting this with VLC(XWayland) under Sway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants