qreator fails to start because of incorrect gtk import

Bug #1989630 reported by Jeremy Bícha
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qreator (Ubuntu)
Fix Released
High
Unassigned
Jammy
Fix Released
High
Unassigned

Bug Description

Impact
------
The qreator app won't run in a default Ubuntu 22.04 LTS install

Test Case
---------
From Ubuntu 22.04 LTS, install qreator
Run qreator

What Could Go Wrong
-------------------
This just adds a patch to add the require_version lines to the gobject-introspection imports. Without this patch, the app tries to load the latest gir bindings for GTK installed which is GTK4 but the app only works with GTK3.

More Info
-------------------
$ qreator
/usr/share/qreator/qreator_lib/Builder.py:21: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '4.0') before import to ensure that the right version gets loaded.
  from gi.repository import GObject, Gtk # pylint: disable=E0611
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/gi/importer.py", line 142, in load_module
    introspection_module = get_introspection_module(namespace)
  File "/usr/lib/python3/dist-packages/gi/module.py", line 257, in get_introspection_module
    module = IntrospectionModule(namespace, version)
  File "/usr/lib/python3/dist-packages/gi/module.py", line 109, in __init__
    repository.require(namespace, version)
gi.RepositoryError: Requiring namespace 'Gtk' version '3.0', but '4.0' is already loaded

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/qreator", line 45, in <module>
    import qreator
  File "/usr/share/qreator/qreator/__init__.py", line 38, in <module>
    __import__(name, fromlist=[])
  File "/usr/share/qreator/qreator/qrcodes/QRCodeLocation.py", line 19, in <module>
    from .QRCodeLocationGtk import QRCodeLocationGtk
  File "/usr/share/qreator/qreator/qrcodes/QRCodeLocationGtk.py", line 20, in <module>
    from gi.repository import (
  File "/usr/lib/python3/dist-packages/gi/importer.py", line 144, in load_module
    raise ImportError(e)
ImportError: Requiring namespace 'Gtk' version '3.0', but '4.0' is already loaded

Jeremy Bícha (jbicha)
Changed in qreator (Ubuntu Jammy):
importance: Undecided → High
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qreator - 16.06.1-7.1

---------------
qreator (16.06.1-7.1) unstable; urgency=medium

  * Non-maintainer upload
  * Add patch to add versions to gobject-introspection imports
    (Closes: #994695) (LP: #1989630)
  * Add minimal debian/gbp.conf
  * Restore changes reverted because of Debian 11 Freeze:
    - Reexport patches using gbp-pq
    - Port to debhelper compat 13
    - Update Standards-Version to 4.5.0

 -- Jeremy Bicha <email address hidden> Wed, 14 Sep 2022 12:06:03 -0400

Changed in qreator (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Jeremy, or anyone else affected,

Accepted qreator into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/qreator/16.06.1-7ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in qreator (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Jeremy Bícha (jbicha) wrote :

I installed qreator 16.06.1-7ubuntu1 and qreator now starts successfully.

tags: added: verification-done verification-done-jammy
removed: verification-needed verification-needed-jammy
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qreator - 16.06.1-7ubuntu1

---------------
qreator (16.06.1-7ubuntu1) jammy; urgency=medium

  * Add patch to add versions to gobject-introspection imports
    (Closes: #994695) (LP: #1989630)

 -- Jeremy Bicha <email address hidden> Thu, 15 Sep 2022 06:34:02 -0400

Changed in qreator (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for qreator has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.