trialuser02 / qt6ct

Qt6 Configuration Tool
BSD 2-Clause "Simplified" License
127 stars 10 forks source link

Got a seg fault mysteriously #16

Closed Crissium closed 1 year ago

Crissium commented 1 year ago

Version 0.5; Qt version 6.2.2

I don't use qt6-based applications often, and today I suddenly noticed that qt6ct did not work. Here's the full error message:

$ qt6ct
No protocol specified
No protocol specified
No protocol specified
Configuration path: "/home/ellis/.config/qt6ct"
Shared QSS paths: QList("/home/ellis/.local/share/qt6ct/qss", "/home/ellis/.local/share/flatpak/exports/share/qt6ct/qss", "/var/lib/flatpak/exports/share/qt6ct/qss", "/usr/local/share/qt6ct/qss", "/usr/share/qt6ct/qss")
Shared color scheme paths: QList("/home/ellis/.local/share/qt6ct/colors", "/home/ellis/.local/share/flatpak/exports/share/qt6ct/colors", "/var/lib/flatpak/exports/share/qt6ct/colors", "/usr/local/share/qt6ct/colors", "/usr/share/qt6ct/colors")

(qt6ct:666): GLib-GObject-WARNING **: 22:51:58.005: cannot register existing type 'GdkDisplayManager'

(qt6ct:666): GLib-CRITICAL **: 22:51:58.005: g_once_init_leave: assertion 'result != 0' failed

(qt6ct:666): GLib-GObject-CRITICAL **: 22:51:58.005: g_object_new_with_properties: assertion 'G_TYPE_IS_OBJECT (object_type)' failed

(qt6ct:666): GLib-GObject-WARNING **: 22:51:58.005: invalid (NULL) pointer instance

(qt6ct:666): GLib-GObject-CRITICAL **: 22:51:58.005: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(qt6ct:666): GLib-GObject-WARNING **: 22:51:58.005: invalid (NULL) pointer instance

(qt6ct:666): GLib-GObject-CRITICAL **: 22:51:58.005: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
No protocol specified

(qt6ct:666): GLib-GObject-WARNING **: 22:51:58.006: cannot register existing type 'GdkDisplay'

(qt6ct:666): GLib-CRITICAL **: 22:51:58.006: g_once_init_leave: assertion 'result != 0' failed

(qt6ct:666): GLib-GObject-CRITICAL **: 22:51:58.006: g_type_register_static: assertion 'parent_type > 0' failed

(qt6ct:666): GLib-CRITICAL **: 22:51:58.006: g_once_init_leave: assertion 'result != 0' failed

(qt6ct:666): GLib-GObject-CRITICAL **: 22:51:58.006: g_object_new_with_properties: assertion 'G_TYPE_IS_OBJECT (object_type)' failed
Segmentation fault (core dumped)

Here's my config:

[Appearance]
color_scheme_path=/usr/share/qt6ct/colors/darker.conf
custom_palette=false
icon_theme=Papirus-Dark
standard_dialogs=gtk2
style=gtk2

[Fonts]
fixed=@Variant(\0\0\0@\0\0\0\n\0S\0\x65\0r\0i\0\x66@$\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
general=@Variant(\0\0\0@\0\0\0\n\0S\0\x65\0r\0i\0\x66@$\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)

[Interface]
activate_item_on_single_click=1
buttonbox_layout=3
cursor_flash_time=1000
dialog_buttons_have_icons=1
double_click_interval=400
gui_effects=@Invalid()
keyboard_scheme=2
menus_have_icons=true
show_shortcuts_in_context_menus=true
stylesheets=@Invalid()
toolbutton_style=4
underline_shortcut=1
wheel_scroll_lines=3

[SettingsWindow]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x3\xd5\0\0\0\0\0\0\x6\xb9\0\0\x2\x83\0\0\x3\xd8\0\0\0\x18\0\0\x6\xb6\0\0\x2\x80\0\0\0\0\0\0\0\0\a\x80\0\0\x3\xd8\0\0\0\x18\0\0\x6\xb6\0\0\x2\x80)

[Troubleshooting]
force_raster_widgets=1
ignored_applications=@Invalid()

I'm sorry about this, but I am really uncertain as to the cause of this bug. And I cannot recall exactly what had happened since the last time it had run without a hitch.

A quick Google search told me that GTK cannot register existing type 'GdkDisplayManager' because there are multiple versions of GTK installed. It is true that I recently installed GTK 4 out of curiosity (my distro still uses GTK 2/3), but even if I have completely removed the packages, the problem still persists.

And if my memory serves me correctly, there has recently been a Qt 6 update. So I rebuilt qt6ct and qt6gtk2—well, it ain't work, either.

Crissium commented 1 year ago

Heck! This is really weird. I commented out QT_QPA_PLATFORMTHEME in my user .profile and instead set the variable in /etc/environment, and it works like a charm now!