Re: [dev] [dmenu] 4.9 segfault on input

From: Patrick Smith <>
Date: Sun, 10 Feb 2019 15:38:20 -0800

I'm experiencing a problem that appears very similar to this one, and
I can add a bit of information.

Summary: When I have scim+anthy installed as an input method, the call
to XOpenIM fails, returning a null pointer. But I don't know much
about the internals of X, so can't be 100% sure this is the root of
the problem. Nor do I know what to look at next.

My environment: up to date Arch Linux, dmenu 4.9. For X input methods,
using scim and anthy by setting environment variables:

export GTK_IM_MODULE=scim
export QT_IM_MODULE=scim

To reproduce the crash, I can do

printf 'foo\nbar' | dmenu

and then press return. With the Arch Linux 4.9, this produces a
segmentation fault. After I downgraded to the Arch version of dmenu
4.8, it works correctly.

So I downloaded the 4.9 source code and built it myself, with no
changes to or anything else. This version produces still
produces the segfault.

Then I added debugging code to print some information to stderr. From
this, I see that the crash seems to be inside XmbLookupString, as
reported previously; the xic pointer returned from XCreateIC and
passed to XmbLookupString is null, and the xim pointer returned from
XOpenIM and passed to XCreateIC is also null.

After this, I restarted X with scim disabled by commenting out the
exports mentioned above, and retried the printf into dmenu. Now it
works correctly, and reports that both XOpenIM and XCreateIC return
non-null pointers.

I'm not sure what to look at next, so I hope that helps someone else
to diagnose the problem...
Received on Mon Feb 11 2019 - 00:38:20 CET

This archive was generated by hypermail 2.3.0 : Mon Feb 11 2019 - 00:48:07 CET