Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
infinite loop in gtk_im_context_reset()->preedit_changed->... #21
Originally the bug was reported at https://bugzilla.redhat.com/show_bug.cgi?id=879499
the backtrace is available here: https://bugzilla.redhat.com/attachment.cgi?id=650234
Yes. well, it's now always reproducible here but it worked initially unless I'm on crack. I don't know if there are anything information stored into the DB say that cause 'preedit_changed', even though all of relevant processes is restarted. that said, I tried to remove $HOME/.uim.d, I can still reproduce it.
Other than that I forgot to mention there is, I did test it without changing IM. i.e. I kept ibus running. plus, indeed it works without any problems if I change the input method on im-chooser say, to uim. and if I run with GTK_IM_MODULE=uim even as I mentioned there.
That may sounds relevant to ibus but that backtrace doesn't contain anything related to ibus at all.
Ah, I just realized that that backtrace isn't full. in fact the stack is more deeper than over 40000. let me quote where it was began:
Hope that helps
Hmm, well, the issue is obvious from the above backtrace. GTK+ has considered to switch the immodule because priv->context_id and the result of get_effective_context_id() is different and calling gtk_im_context_reset() before switching it off. in im-uim.so, once uim_reset_context() is done, it's sending a signal `preedit_changed'. then the context id is required to obtain the preedit string. so it's back to the above loop of sequence.
first, calling gtk_im_context_reset() prior to switch the slave immodule off makes sense to me to nullify the working spaces. but is it really always necessary to send 'preedit_changed' signal anyway? it looks to me like uim doesn't need to send it when no preedit is started at all:
Though I can't figure out about the side effects of this change, this issue is gone away at least.