Selecting outside a combobox logs out the user and crashes desktop on Ubuntu 22.04
-
A user reported this in December and I have switch to Ubuntu 22.04 myself and also experiencing this.
With a fully up to date system and PySide6 (current 6.4.2) when you open a combo box, and then instead of selecting an item from the list you click outside that box, it crashes your system. Sometimes will take you back to login screen, sometimes not even that and have to restart.
It is not possible to catch the error in Python (wrapping with catch all except and logging to file doesn't list anything). Only info I have is this error in syslog
Feb 18 17:19:07 Y23 gdm-launch-environment]: GLib-GObject: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Sample app to test with:
if __name__ == '__main__': from PySide6.QtWidgets import QComboBox, QApplication, QWidget, QVBoxLayout class MyWidget(QWidget): def __init__(self): super().__init__() self.combo = QComboBox() self.combo.addItems(["Hallo Welt", "Hei maailma", "Hola Mundo", "Привет мир"]) self.layout = QVBoxLayout(self) self.layout.addWidget(self.combo) app = QApplication([]) widget = MyWidget() widget.show() widget.resize(800, 700) app.exec()
Honestly don't think there is anything I can do to fix it on Python side, but would love to know if there is a known bad package version or something I can change out to fix this?
-
This sounds like a wayland issue, can you try X11?
-
This sounds like a wayland issue, can you try X11?
-
@anikdv hi and welcome to devnet,
As @friedemannkleint requested, do you experience the same issue with X11 ?
-
This is a known Wayland issue,
See Qt bug Ubuntu 22.04 (Wayland) logs out after basic interaction with Qt Widgets UI and https://wiki.qt.io/Qt_6.4_Known_Issues#Wayland.I do not know what has happened to this since Qt6.4, if anything. It's closed as "Out of Scope".
The big report notesAccording to the upstream Mutter bug report, this is fixed in Mutter 42.6
-
I can confirm that this bug is caused by mutter <= 42.5. A workaround is to set
QT_QPA_PLATFORM=xcb
which uses X11 under Wayland. To properly resolve the issue, enable Ubuntu proposed which has mutter == 42.9 at the time of writing: https://wiki.ubuntu.com/Testing/EnableProposed