Hi,
I've managed to track down the (hopefully it's the only one) crash that
occurs sometimes when applications exit. Turns out that it's a known,
but from what I can tell unfixed, bug in XFree86's XIM code. A
description can be found here:
http://www.xfree86.org/pipermail/xpert/2002-June/018370.html
I've attached a workaround. It would be cleaner if the bug was fixed and
everyone upgraded, but that's a pretty unreasonable thing to expect, so
in the interest of compatibility, I think it should be applied.