Bug 1762455 - IBUS input methods don't work in QT5-based applications
Summary: IBUS input methods don't work in QT5-based applications
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: glib2
Version: 31
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1777213 1777221
TreeView+ depends on / blocked
 
Reported: 2019-10-16 19:01 UTC by Stefan Haan
Modified: 2020-05-06 04:53 UTC (History)
22 users (show)

Fixed In Version: glib2-2.60.7-2.fc30 glib2-2.62.3-1.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1777213 (view as bug list)
Environment:
Last Closed: 2020-05-06 04:07:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Stefan Haan 2019-10-16 19:01:33 UTC
Description of problem:
Not able to type Japanese in "Add Card" Dialog or search bar in "Browse" window.

Version-Release number of selected component (if applicable):
Name        : anki
Version     : 2.1.15
Release     : 1.fc30

How reproducible:


Steps to Reproduce:
1. Open Anki > "Add"
2. Type "aaa" with Anthy input

Actual results:
aaa


Expected results:
あああ

Additional info:
Input method works in GNOME applications like gedit, gnome-terminal.
telegram-desktop has the same problem.

Comment 1 Stefan Haan 2019-10-16 19:05:10 UTC
For some time I was able to fix this by exporting `QT_IM_MODULE=ibus`. This workaround does not work anymore.

Comment 2 Christian Krause 2019-10-23 18:58:54 UTC
I can reproduce the problem in Fedora 30.

So far, it looks like that it affects all QT applications:
- QT5 examples like https://doc.qt.io/qt-5/qtwidgets-widgets-lineedits-example.html
- PyQT5 examples like https://pythonspot.com/pyqt5-textbox-example/
- kwrite, konsole

- affects the ibus input methods (like Anthy or Pinyin) work in QT-based applications (gedit, ...)
- switching between basic keyboard layouts (German, US, ...) works fine
- I'm using the Cinnamon Desktop Environment
- ibus-specific environment variables are set:
QT_IM_MODULE=ibus
XMODIFIERS=@im=ibus

So far I'm pretty sure that's not an Anki issue. However, I don't know which exact components is causing the problem. Candidates are
- qt5
- qt5-base
- ibus-qt
- ...

I'm setting the component to qt5-base, because this source package builds qt5-qtbase-gui which includes /usr/lib64/qt5/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so ...

Comment 3 Christian Krause 2019-10-25 20:59:10 UTC
After some more research it turned out that the problem was already reported:

ibus: https://github.com/ibus/ibus/issues/2137

it turned out to be an glib2 issue:

https://gitlab.gnome.org/GNOME/glib/issues/1831

there is a merge request for glib2 available:

https://gitlab.gnome.org/GNOME/glib/merge_requests/1176


I tested the proposed changes https://gitlab.gnome.org/GNOME/glib/merge_requests/1176/diffs with glib2-2.60.7-1.fc30.x86_64 and applying them solves the issue.


Please consider to integrate this patch to Fedora's glib2 package. Until that's fixed, there won't be any ibus-based input methods (e.g. for Japanese, Chinese, ...) available in QT5-based apps.


Setting the component now to glib2...

Comment 4 Christian Krause 2019-10-31 11:03:37 UTC
The mentioned merge request was now merged into glib2-master upstream:
https://gitlab.gnome.org/GNOME/glib/merge_requests/1176/commits

The changes were backported upstream at least to glib-2-62 branch: https://gitlab.gnome.org/GNOME/glib/merge_requests/1194

The issue is quite generic. From upstream bug report https://gitlab.gnome.org/GNOME/glib/issues/1831 : "Short summary: From time to time a GDBusServer responds with REJECTED EXTERNAL to new connections on a private socket."

Please consider to cherry-pick the commits to fix the issue in F30, too.

Comment 5 A S Alam 2019-11-01 04:43:50 UTC
I have same issue with Fedora 31 with KDE desktop.

Comment 6 A S Alam 2019-11-01 04:49:12 UTC
glib2-2.62.1-1.fc31.x86_64
ibus-1.5.21-3.fc31.x86_64

Comment 7 Jens Petersen 2019-11-01 06:45:38 UTC
Just to note I believe the regression is due to recent CVE fixes that went into ibus.

Comment 8 fujiwara 2019-11-05 04:40:42 UTC
Since this is a CVE issue, I'd request to back-port the fix to Fedora 31, Fedora 30 and Fedora 29.

Comment 9 Christian Krause 2019-11-12 21:23:18 UTC
@glib2 maintainers:

Please can you have a look at this issue?

Are you interested in a merge request to backport the mentioned upstream bug fix?

It looks like that other distributions backported the changes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=941018

Comment 10 Fedora Update System 2019-11-14 00:41:42 UTC
FEDORA-2019-9ff4e37cb3 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-9ff4e37cb3

Comment 11 Michael Catanzaro 2019-11-14 00:44:11 UTC
Due to scheduling, we decided to wait a few days for glib 2.62.3 before preparing a F31 update. Please make sure to reopen this bug if bodhi closes it if the F30 update lands before the F31 update is ready.

Comment 12 Fedora Update System 2019-11-15 03:45:17 UTC
glib2-2.60.7-2.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-9ff4e37cb3

Comment 13 fujiwara 2019-11-15 07:42:00 UTC
(In reply to Michael Catanzaro from comment #11)
> Due to scheduling, we decided to wait a few days for glib 2.62.3 before
> preparing a F31 update. Please make sure to reopen this bug if bodhi closes
> it if the F30 update lands before the F31 update is ready.

OK, I understood what you meant. Thank you for fixing F30 too.

Comment 14 Stefan Haan 2019-11-16 05:25:59 UTC
Updating to glib2-2.60.7-2.fc30.x86_64 fixed my input problems with anki and telegram-desktop :)

Comment 15 Fedora Update System 2019-11-17 01:13:39 UTC
glib2-2.60.7-2.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 fujiwara 2019-11-18 02:43:56 UTC
Reopening the bug to follow the maintainer's suggestion since F31 glib2 is not avalable yet.

Comment 17 Fedora Update System 2019-11-20 08:56:30 UTC
FEDORA-2019-9127055772 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-9127055772

Comment 18 Stefan Haan 2019-11-21 00:16:10 UTC
Upgrading to Fedora 31 re-introduced this problem.
Here are my package versions:
glib2-2.62.2-1.fc31
anki-2.1.15-1.fc31
ibus-1.5.21-3.fc31

Comment 19 Fedora Update System 2019-11-21 02:27:17 UTC
glib2-2.62.3-1.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-9127055772

Comment 20 Fedora Update System 2019-11-27 00:23:49 UTC
glib2-2.62.3-1.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 21 Stefan Haan 2020-05-01 20:40:44 UTC
After upgrading to Fedora 32 the same problem (as described in my original comment https://bugzilla.redhat.com/show_bug.cgi?id=1762455#c0) reappears.
Affected versions are:
* anki-2.1.15-2.fc32
* telegram-desktop-2.0.1-1.fc32

Comment 22 Jens Petersen 2020-05-04 10:39:50 UTC
I think it would be better actually to open a new bug.

Comment 23 Jens Petersen 2020-05-04 12:16:38 UTC
(This seems to have already affected Beta AFAICT.
Also I can't seem to get XIM working either under Qt.)

Comment 24 fujiwara 2020-05-06 04:07:25 UTC
(In reply to Stefan Haan from comment #21)
> After upgrading to Fedora 32 the same problem (as described in my original
> comment https://bugzilla.redhat.com/show_bug.cgi?id=1762455#c0) reappears.
> Affected versions are:
> * anki-2.1.15-2.fc32
> * telegram-desktop-2.0.1-1.fc32

It's a different issue completely.

Comment 25 Jens Petersen 2020-05-06 04:53:05 UTC
I filed a qt5-qtbase bug 1832086 for this now for F32.


Note You need to log in before you can comment on or make changes to this bug.