You are not logged in.

#1 2023-10-01 14:32:03

mvrozanti
Member
Registered: 2023-10-01
Posts: 13

[SOLVED]GTK file dialog on X11 segfaults and crashes every application

I'm looking for more people with this problem all over the place, but I'm having trouble finding much. Some posts seem related, others do not, this is one that seems very suspicious: https://forum.manjaro.org/t/gnome-crash … a/148403/5. This is another one, even though they don't mention file dialogs: https://github.com/storaged-project/udisks/issues/1193. GTK seems to have been given quite a big update recently too: https://gitlab.gnome.org/GNOME/gtk/-/blob/main/NEWS.

I was able to reproduce the issue with a small python script with PyGObject:

import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk

def file_chooser_dialog():
    dialog = Gtk.FileChooserDialog("Select a File", None, Gtk.FileChooserAction.OPEN,
                                   ("Cancel", Gtk.ResponseType.CANCEL, "Open", Gtk.ResponseType.OK))

    response = dialog.run()
    if response == Gtk.ResponseType.OK:
        selected_file = dialog.get_filename()
        print("Selected file:", selected_file)
    elif response == Gtk.ResponseType.CANCEL:
        print("File selection canceled")

    dialog.destroy()

if __name__ == "__main__":
    file_chooser_dialog()

When run, this script segfaults and this is the coredump generated: http://ix.io/4HUg

WM: bspwm 0.9.10
uname -r: 6.5.5-arch1-1
inxi --admin --verbosity=7 --filter --no-host --width: http://ix.io/4HUq
lspci: http://ix.io/4HUt

This is really ticking me off because all applications that use the GTK file dialog crash when there's an attempt to use it, including Firefox, Thunderbird, some electron apps such as telegram and discord, and god knows what else. It's been happening for at least 3 weeks and I have no idea what to do. My system is fully updated. This is my first post so I'm not sure if I'm giving enough information here, or if this is the right subforum to post on, so please tell me if I need provide something else or move this post.  I tried reinstalling all gtk versions, gsettings-desktop-schemas, running `sudo glib-compile-schemas /usr/share/glib-2.0/schemas/ `, because I read that it might help somewhere, but nothing worked.

What are my options here? I'm still not sure what is happening. Is it a nvidia driver issue? Or is it a libc issue? Or is it a glib issue? How can I diagnose this further? If anything else fails, can I just *not* use GTK file dialogs system-wide anymore and use something else, like Qt? What you would do in my situation?

Last edited by mvrozanti (2023-10-01 16:40:05)

Offline

#2 2023-10-01 14:46:52

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,314

Re: [SOLVED]GTK file dialog on X11 segfaults and crashes every application

pacman -Qikk libcloudproviders

And since it's a DBUS API and you're using bspwm (and likely xinit)

loginctl session-status
echo $DBUS_SESSION_BUS_ADDRESS

and see the last link below.

Offline

#3 2023-10-01 14:57:00

mvrozanti
Member
Registered: 2023-10-01
Posts: 13

Re: [SOLVED]GTK file dialog on X11 segfaults and crashes every application

Thank you for the quick reply!

This is the output of pacman -Qikk libcloudproviders: http://ix.io/4HUv

Output of loginctl session-status: http://ix.io/4HUx

Output of echo $DBUS_SESSION_BUS_ADDRESS: unix:path=/run/user/1000/bus

And yes, I am using xinit. I'm going to read the xinitrc broken wiki section thoroughly and then reread mine (http://ix.io/4HUz)

Last edited by mvrozanti (2023-10-01 15:05:00)

Offline

#4 2023-10-01 15:04:28

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,314

Re: [SOLVED]GTK file dialog on X11 segfaults and crashes every application

libcloudproviders looks intact, your DBUS_SESSION_BUS_ADDRESS is ok, the xinitrc has source /etc/X11/xinit/xinitrc.d/50-systemd-user.sh and the session is active.
That's not it.
Do all coredumps end in libcloudproviders.so.0?

Offline

#5 2023-10-01 15:08:49

mvrozanti
Member
Registered: 2023-10-01
Posts: 13

Re: [SOLVED]GTK file dialog on X11 segfaults and crashes every application

>Do all coredumps end in libcloudproviders.so.0?

This is thunderbird's coredump when I try to open a file dialog through it: http://ix.io/4HUG

This is discord's: http://ix.io/4HUH

Both also mention libcloudproviders.so.0.

Offline

#6 2023-10-01 15:18:16

mvrozanti
Member
Registered: 2023-10-01
Posts: 13

Re: [SOLVED]GTK file dialog on X11 segfaults and crashes every application

I didn't find anything particularly suspicious on my .xinitrc after reading the wiki section.

Offline

#7 2023-10-01 15:20:41

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,314

Re: [SOLVED]GTK file dialog on X11 segfaults and crashes every application

Apparently one cannot skip that thing…
https://gitlab.gnome.org/World/libcloud … /issues/17

Do you have any cloud services (dropbox, next/owncloud, etc) installed?

Edit: as mentioned before, your xinitrc is ok. It's just suc a frequent problem that it's in my signature…

Last edited by seth (2023-10-01 15:21:26)

Offline

#8 2023-10-01 15:27:36

mvrozanti
Member
Registered: 2023-10-01
Posts: 13

Re: [SOLVED]GTK file dialog on X11 segfaults and crashes every application

>Edit: as mentioned before, your xinitrc is ok. It's just suc a frequent problem that it's in my signature…

I see, lol

Oh man, I just remembered I had owncloud installed a long time ago and I uninstalled it a year or so ago but it left files on my system (how dare they?) and veeery recently like around the time this segfaults started happening I deleted a owncloud binary file, a owncloud.xml file, and a /usr/share/applications/owncloud.desktop file.

I have a strong feeling that's it! You sir are House MD

What should I take for that, doc? My first reaction is to `find / -iname '*owncloud*'` and try to nuke everything but I'm worried that may cause more problems lol

Offline

#9 2023-10-01 15:30:00

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,314

Re: [SOLVED]GTK file dialog on X11 segfaults and crashes every application

I'd start in

ls /{etc,usr/share}/dbus-1/services
grep -ri cloud /{etc,usr/share}/dbus-1/services

Offline

#10 2023-10-01 15:36:46

mvrozanti
Member
Registered: 2023-10-01
Posts: 13

Re: [SOLVED]GTK file dialog on X11 segfaults and crashes every application

I don't have /etc/dbus-1, and grep -ri cloud /usr/share/dbus-1 didn't return anything.

Offline

#11 2023-10-01 16:02:41

mvrozanti
Member
Registered: 2023-10-01
Posts: 13

Re: [SOLVED]GTK file dialog on X11 segfaults and crashes every application

This is every owncloud occurence I found under /usr/share: http://ix.io/4HUX

Those locale matches seem really suspicious.

Offline

#12 2023-10-01 16:04:20

mvrozanti
Member
Registered: 2023-10-01
Posts: 13

Re: [SOLVED]GTK file dialog on X11 segfaults and crashes every application

Can't I just remove this whole cloud thing? libcloudproviders appears to be a gtk3 and gtk4 dependency though.

Offline

#13 2023-10-01 16:04:28

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,314

Re: [SOLVED]GTK file dialog on X11 segfaults and crashes every application

Do

dbus-monitor --session

or

dbus-monitor --system

indicate anything before the crash?

Otherwise how did you un/install owncloud?
https://archlinux.org/packages/extra/x8 … ud-client/

Did the systemwide find trace residuals?

Finally
https://wiki.archlinux.org/title/Debugg … g_packages
might help, there's also a very suspicious https://gitlab.gnome.org/World/libcloud … 7f0a15d745

Offline

#14 2023-10-01 16:10:52

mvrozanti
Member
Registered: 2023-10-01
Posts: 13

Re: [SOLVED]GTK file dialog on X11 segfaults and crashes every application

dbus-monitor --session adds this http://ix.io/4HUY when I run that python script I mentioned earlier

>Otherwise how did you un/install owncloud?
I cannot remember exactly, but it was indeed a bit hackish if I recall correctly.

What are debugging packages? If it's exactly what the names implies, which one is best suited for me to diagnose the problem?

And why is https://gitlab.gnome.org/World/libcloud … 7f0a15d745 suspicious?

Offline

#15 2023-10-01 16:14:49

mvrozanti
Member
Registered: 2023-10-01
Posts: 13

Re: [SOLVED]GTK file dialog on X11 segfaults and crashes every application

This is the output of dbus-monitor --system: http://ix.io/4HUZ

Offline

#16 2023-10-01 16:24:42

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,314

Re: [SOLVED]GTK file dialog on X11 segfaults and crashes every application

You need the debug paackage for libcloudservices and it adds debugs symbols to the strace (ie. you can see the code area where it fails)
The patch there is suspicious because it fixes a use-after-free and I doubt that's it's in the latest release yet, so you might also be running into that.

dbus-monitor hints at file-chooser from xdg-portal, but nothing further.

Offline

#17 2023-10-01 16:25:22

mvrozanti
Member
Registered: 2023-10-01
Posts: 13

Re: [SOLVED]GTK file dialog on X11 segfaults and crashes every application

MY GOD I JUST REINSTALLED owncloud-client and uninstalled it and i have file dialogs again!!!!!!!!!!!

Thanks a ton dude you are the real MVP @Seth

Offline

#18 2023-10-01 16:25:55

mvrozanti
Member
Registered: 2023-10-01
Posts: 13

Re: [SOLVED]GTK file dialog on X11 segfaults and crashes every application

How can I properly close this thread

Offline

#19 2023-10-01 16:33:01

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,314

Re: [SOLVED]GTK file dialog on X11 segfaults and crashes every application

You can mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

ooc, can you uninstall owncloud again w/o breaking the dialog?

Offline

#20 2023-10-01 16:39:10

mvrozanti
Member
Registered: 2023-10-01
Posts: 13

Re: [SOLVED]GTK file dialog on X11 segfaults and crashes every application

I did uninstall it without breaking the dialog. At least for now, I'm yet to restart the system, but I think the solution will persist.

One thing I didn't mention: I believe my first attempt at uninstalling owncloud-client caused this, and I had to install it back with pacman -Syu owncloud-client --overwrite "*", because of existing file conflicts. But that's about it, I uninstalled it normally after, and I can finally use file dialogs again, thanks to you!

Offline

Board footer

Powered by FluxBB