Public bug reported:

ibus-cangjie 2.5 fails to start on any system where the GSound typelib
(gir1.2-gsound-1.0) is not installed. The package does not depend on it,
so this is the default state: after installing ibus-cangjie, IBus never
gets a Cangjie/Quick engine and the input method cannot be used at all.

Crash reports:
https://errors.ubuntu.com/problem/a5ae0ca1d16d00fe016431e571d9c5696fb9cfe1
117 crashes/week, 21/month, 4/day in the 26.04 bucket. That is a floor:
58 of the 200 sampled incidents carry no DistroRelease and are dropped
from the release-scoped counter. All 200 sampled instances are
2.5-1build1 (141 on 26.04, 1 on 26.10, 58 unknown); amd64 = 142.

Signature:
/usr/libexec/ibus-engine-cangjie:ValueError:...:sounds.py@20:require_version

Root cause: upstream 2.5 (a966029, "Move to GSound") replaced
src/canberra.py - whose pycanberra import was guarded by try/except
ImportError with no-op stubs - with src/sounds.py, which calls
gi.require_version("GSound", "1.0") at module import. engine.py imports
sounds unconditionally, and ibus_cangjie/__init__.py imports engine, so
the whole engine (and ibus-setup-cangjie) dies before it can start.
debian/control lists gir1.2-gsound-1.0 only as a <!nocheck>
Build-Depends; Depends: does not include it.

Upstream: issue #140 and MR !159 ("sounds: make GSound an optional
runtime dependency"), ACKed by the maintainer on 2026-11-24 but not yet
merged. The same patch is carried here.

[ Impact ]

The Cangjie/Quick input method is completely unusable in the default
install state: the engine exits with "ValueError: Namespace GSound not
available" on every start, IBus never registers it, and each attempt
files another crash report. Affects 26.04 (2.5-1build1), 26.10
(2.5-1build1) and 27.04 (2.5-1build1); 24.04 (2.4-7) is not affected
(it still uses the guarded canberra.py).

[ Test Plan ]

On a system without gir1.2-gsound-1.0:

  ibus-engine-cangjie --engines-info cangjie

Before the fix: exit 1 with the traceback ending at sounds.py:20.
After the fix: exit 0 and the engine XML is printed. The patched engine
was also checked with the typelib installed: ErrorSound() still
constructs a real GSound.Context, so the sound behaviour is unchanged.

[ Where problems could occur ]

Only the optional event-sound path changes. With the typelib absent,
ErrorSound()/play_error() become no-ops instead of raising; with it
present the behaviour is identical. The patch is the upstream MR
content (~20 lines in src/sounds.py) and does not touch packaging
dependencies.

[ Other Info ]

Debian trixie/testing (2.5-1) have the same bug; a Debian BTS report
with the patch will be filed separately.

Attachments: the patch, the tenacious source debdiff (2.5-1ubuntu1) and
the 26.04/26.10 SRU debdiffs (2.5-1ubuntu0.1).

** Affects: ibus-cangjie (Ubuntu)
     Importance: Medium
         Status: In Progress

** Affects: ibus-cangjie (Ubuntu Resolute)
     Importance: Medium
         Status: Confirmed

** Affects: ibus-cangjie (Ubuntu Stonking)
     Importance: Medium
         Status: Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2190899

Title:
  ibus-cangjie: engine dies at startup without gir1.2-gsound-1.0

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ibus-cangjie/+bug/2190899/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to