Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved] Qt apps segfaulting after a change in settings

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
andoru
Posts: 272
Joined: 2014-03-14 16:59

[Solved] Qt apps segfaulting after a change in settings

#1 Post by andoru »

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.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Qt apps segfaulting after a change in settings

#2 Post by stevepusser »

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.
MX Linux packager and developer

andoru
Posts: 272
Joined: 2014-03-14 16:59

Re: Qt apps segfaulting after a change in settings

#3 Post by andoru »

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)

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1387
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 45 times
Been thanked: 64 times

Re: Qt apps segfaulting after a change in settings

#4 Post by None1975 »

Hello. Check this.
OS: Debian 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github

andoru
Posts: 272
Joined: 2014-03-14 16:59

Re: Qt apps segfaulting after a change in settings

#5 Post by andoru »

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...

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Qt apps segfaulting after a change in settings

#6 Post by bw123 »

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
resigned by AI ChatGPT

andoru
Posts: 272
Joined: 2014-03-14 16:59

Re: Qt apps segfaulting after a change in settings

#7 Post by andoru »

I'm only using Sid/Unstable packages.

andoru
Posts: 272
Joined: 2014-03-14 16:59

Re: Qt apps segfaulting after a change in settings

#8 Post by andoru »

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.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

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

#9 Post by stevepusser »

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!
MX Linux packager and developer

andoru
Posts: 272
Joined: 2014-03-14 16:59

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

#10 Post by andoru »

Thanks, will see if that fixes my issues.

Post Reply