Long Compose sequences prevent applications from launching
Steps to reproduce
- Have an
~/.XCompose
file with an expansion that's at least 20 characters long, for example:
<Multi_key> <Multi_key> <t> <m> <y> <k> : "the more you know 💫"
- Launch any application running with a recent GTK, for example https://flathub.org/apps/details/org.gnome.TextEditor:
flatpak run org.gnome.TextEditor
Current behavior
The application fails to launch and logs:
Gtk:ERROR:../gtk/gtkcomposetable.c:939:parser_get_compose_table: assertion failed: (strlen (value) < 20)
Bail out! Gtk:ERROR:../gtk/gtkcomposetable.c:939:parser_get_compose_table: assertion failed: (strlen (value) < 20)
Expected outcome
The application launches.
Version information
- Any version of GTK that includes the referenced code
- Fedora Workstation 34
Additional information
The applications installed with GNOME 40 run fine, for what it's worth.
I know I'm abusing XCompose as a simple snippet mechanism (and am open to suggestions for alternatives) but I'm probably not the only one, and if that's not going to be supported then it should probably be documented and the error message improved. (Of course I do hope that it'll be supported, I have a bunch of longer sequences like URLs, emails, and physical addresses.)
As a side note, it seemed a little weird that the MAX_COMPOSE_LEN
constant isn't used in this assertion.