Cannot start qt application with gtk2 theme

Bug #1874102 reported by fcole90
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qtstyleplugins-src (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Trying to run apps with qt gtk2 theme makes the app crash.

# Logs:
(python3.8:471377): GLib-GObject-WARNING **: 18:01:22.268: cannot register existing type 'GdkDisplayManager'

(python3.8:471377): GLib-CRITICAL **: 18:01:22.268: g_once_init_leave: assertion 'result != 0' failed

(python3.8:471377): GLib-GObject-CRITICAL **: 18:01:22.268: g_object_new_with_properties: assertion 'G_TYPE_IS_OBJECT (object_type)' failed

(python3.8:471377): GLib-GObject-WARNING **: 18:01:22.268: invalid (NULL) pointer instance

(python3.8:471377): GLib-GObject-CRITICAL **: 18:01:22.268: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(python3.8:471377): GLib-GObject-WARNING **: 18:01:22.268: invalid (NULL) pointer instance

(python3.8:471377): GLib-GObject-CRITICAL **: 18:01:22.268: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(python3.8:471377): GLib-GObject-WARNING **: 18:01:22.268: cannot register existing type 'GdkDisplay'

(python3.8:471377): GLib-CRITICAL **: 18:01:22.268: g_once_init_leave: assertion 'result != 0' failed

(python3.8:471377): GLib-GObject-CRITICAL **: 18:01:22.268: g_type_register_static: assertion 'parent_type > 0' failed

(python3.8:471377): GLib-CRITICAL **: 18:01:22.268: g_once_init_leave: assertion 'result != 0' failed

(python3.8:471377): GLib-GObject-CRITICAL **: 18:01:22.268: g_object_new_with_properties: assertion 'G_TYPE_IS_OBJECT (object_type)' failed

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

# Symple application failing
import sys
from PySide2.QtWidgets import QApplication, QDialog, QLineEdit, QPushButton

class Form(QDialog):

    def __init__(self, parent=None):
        super(Form, self).__init__(parent)
        self.setWindowTitle("My Form")

if __name__ == '__main__':
    # Create the Qt Application
    app = QApplication(sys.argv)
    app.setStyle('gtk2')
    # Create and show the form
    form = Form()
    form.show()
    # Run the main Qt loop
    sys.exit(app.exec_())

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: qt5-gtk2-platformtheme 5.0.0+git23.g335dbec-3ubuntu4
ProcVersionSignature: Ubuntu 5.4.0-24.28-generic 5.4.30
Uname: Linux 5.4.0-24-generic x86_64
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: GNOME
Date: Tue Apr 21 17:57:21 2020
InstallationDate: Installed on 2020-04-03 (17 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Beta amd64 (20200401)
SourcePackage: qtstyleplugins-src
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
fcole90 (fcole90) wrote :
Revision history for this message
fcole90 (fcole90) wrote :

Checking further logs I get the following:

python3.8[471723]: segfault at 114 ip 00007f0439c6caa5 sp 00007fff05b55770 error 6 in libgdk-x11-2.0.so.0.2400.32[7f0439c36000+5e000]

Code: 64 24 10 4c 8d 6c 24 40 e8 d8 fe ff ff 31 f6 48 8d 5c 24 38 48 89 c7 31 c0 e8 77 c9 fc ff 31 d2 48 8d 35 0e fe ff ff 48 89 ef <c7> 80 14 01 00 00 01 00 00 00 49 89 c7 48 89 a8 d8 00 00 00 e8 12

Revision history for this message
fcole90 (fcole90) wrote :

You need the following packages to run the script:
sudo apt install libpyside2-py3-5.14 python3-pyside2.qtcore python3-pyside2.qtuitools python3-pyside2.qtwidgets qt5-style-plugins qt5-gtk2-platformtheme

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Make sure you set QT_QPA_PLATFORMTHEME=gtk2 environment variable, like the package description says.

Revision history for this message
fcole90 (fcole90) wrote :

You are right, it works correctly doing so. It can be closed. Thanks for your quick reply.

Changed in qtstyleplugins-src (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.