[Solved] Qt apps segfaulting after a change in settings

Everything about X, Gnome, KDE, ... and everything running on it

[Solved] Qt apps segfaulting after a change in settings

Postby andoru » 2018-05-21 19:39

So I've been having some inconsistencies in the way the Qt apps that I use look, compared to their GTK2/3 counterparts, so I've searched around for a solution, the one offered being qt5ct. So after digging around, I've seen the suggestion of adding
Code: Select all
QT_QPA_PLATFORMTHEME=qt5ct

to /etc/environment.
After rebooting, I saw that none of the Qt apps that I use want to start (with the exception of one Qt program that I've self compiled). Starting the apps from a terminal, I get this in the stdout:

Code: Select all
$ keepassxc
qt5ct: using qt5ct plugin

(keepassxc:1644): GLib-GObject-WARNING **: 20:32:50.485: cannot register existing type 'GdkDisplayManager'

(keepassxc:1644): GLib-CRITICAL **: 20:32:50.485: g_once_init_leave: assertion 'result != 0' failed

(keepassxc:1644): GLib-GObject-CRITICAL **: 20:32:50.485: g_object_new_with_properties: assertion 'G_TYPE_IS_OBJECT (object_type)' failed

(keepassxc:1644): GLib-GObject-WARNING **: 20:32:50.485: invalid (NULL) pointer instance

(keepassxc:1644): GLib-GObject-CRITICAL **: 20:32:50.485: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(keepassxc:1644): GLib-GObject-WARNING **: 20:32:50.485: invalid (NULL) pointer instance

(keepassxc:1644): GLib-GObject-CRITICAL **: 20:32:50.485: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(keepassxc:1644): GLib-GObject-WARNING **: 20:32:50.485: cannot register existing type 'GdkDisplay'

(keepassxc:1644): GLib-CRITICAL **: 20:32:50.485: g_once_init_leave: assertion 'result != 0' failed

(keepassxc:1644): GLib-GObject-CRITICAL **: 20:32:50.485: g_type_register_static: assertion 'parent_type > 0' failed

(keepassxc:1644): GLib-CRITICAL **: 20:32:50.485: g_once_init_leave: assertion 'result != 0' failed

(keepassxc:1644): GLib-GObject-CRITICAL **: 20:32:50.485: g_object_new_with_properties: assertion 'G_TYPE_IS_OBJECT (object_type)' failed
Segmentation fault


The error messages above are identical (with the exception of a few changed parameters, obviously) for the other Qt apps that refuse to start.
I've since removed the line I added to /etc/environment, and rebooted again, but I still can't get those apps to work.
Searching around for the errors above didn't give me any conclusive answers, so does anyone know what to look into to fix this issue? And perhaps to solve the problem of inconsistent look between apps of differing GUI toolkits?
Last edited by andoru on 2018-05-23 18:47, edited 1 time in total.
andoru
 
Posts: 254
Joined: 2014-03-14 16:59

Re: Qt apps segfaulting after a change in settings

Postby stevepusser » 2018-05-21 21:52

What's your desktop environment? Do you want Qt apps to follow the GTK theme, or GTK apps to imitate a Qt theme?

The Arch wiki has a good writeup for this.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: GIMP 2.10.2, Pale Moon 27.9.3, wine-staging 3.10, QuiteRSS 0.18.11, Linux kernel 4.17, Krita 4.0.4
User avatar
stevepusser
 
Posts: 9637
Joined: 2009-10-06 05:53

Re: Qt apps segfaulting after a change in settings

Postby andoru » 2018-05-21 22:01

Sorry about that, forgot to mention the DE. I'm using Tint2+OpenBox, with some XFCE components. I'm trying to get Qt apps to have the same (or similar) look like the GTK 2/3 ones.
As I previously mentioned, currently all Qt apps I use segfault (except an app I built myself from sources -- namely qTox)
andoru
 
Posts: 254
Joined: 2014-03-14 16:59

Re: Qt apps segfaulting after a change in settings

Postby None1975 » 2018-05-22 12:58

Hello. Check this.
OS: Debian 9.4 / WM: Xmonad
Debian Wiki | DontBreakDebian, My config files in github
Linux User #607425
User avatar
None1975
 
Posts: 475
Joined: 2015-11-29 18:23
Location: Lithuania, Vilnius

Re: Qt apps segfaulting after a change in settings

Postby andoru » 2018-05-22 14:42

I did follow that wiki, and that didn't solve the problem with the inconsistent look between apps. Currently my problem is the segfaults, and the Qt apps refusing to run...
andoru
 
Posts: 254
Joined: 2014-03-14 16:59

Re: Qt apps segfaulting after a change in settings

Postby bw123 » 2018-05-22 15:56

It doesn't seem likely that the env variable is causing the problem? But I don't use testing/sid, can't say for sure. Is everything from testing or did you mix up some repos?

https://packages.debian.org/sid/qt5ct
https://bugs.debian.org/cgi-bin/pkgrepo ... t=unstable
User avatar
bw123
 
Posts: 3079
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Qt apps segfaulting after a change in settings

Postby andoru » 2018-05-22 21:03

I'm only using Sid/Unstable packages.
andoru
 
Posts: 254
Joined: 2014-03-14 16:59

Re: Qt apps segfaulting after a change in settings

Postby andoru » 2018-05-23 18:47

Okay, after removing the qt5ct package, I was able to run all the Qt apps once again, but I'm still back to square one with the inconsistent theming.
Will try to follow the wiki again, in case I missed something, but I very much doubt I did.
Will also mark this thread as solved, since the segfault has been fixed.
andoru
 
Posts: 254
Joined: 2014-03-14 16:59

Re: [Solved] Qt apps segfaulting after a change in settings

Postby stevepusser » 2018-05-24 03:31

With Qt 5 apps on a Stretch base and xfce in MX Linux, we add a /etc/X11/Xsession.d/98qtconfig file with the contents:

Code: Select all
export QT_QPA_PLATFORMTHEME=gtk2
export QT_PLATFORMTHEME=gtk2
export QT_PLATFORM_PLUGIN=gtk2


This makes them follow the xfce theme...and it can make KDE look really ugly if you want to switch back and forth to that!
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: GIMP 2.10.2, Pale Moon 27.9.3, wine-staging 3.10, QuiteRSS 0.18.11, Linux kernel 4.17, Krita 4.0.4
User avatar
stevepusser
 
Posts: 9637
Joined: 2009-10-06 05:53

Re: [Solved] Qt apps segfaulting after a change in settings

Postby andoru » 2018-05-27 16:10

Thanks, will see if that fixes my issues.
andoru
 
Posts: 254
Joined: 2014-03-14 16:59


Return to Desktop & Multimedia

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable