New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
infinite loop in gtk_im_context_reset()->preedit_changed->... #21
Comments
I tried to reproduce this bug following the procedure described in the comment 17 in the Red Hat Bugzilla, but failed to reproduce it. Did you use uim-anthy when you reproduced this bug? |
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 |
I can't still reproduce this bug in my Fedora 17 env. I hope someone reproduces it and sends a pull request to fix it. |
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. |
Thank you for the explanation and the patch. I've pushed your patch to both the 1.8 and the master branch. |
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
The text was updated successfully, but these errors were encountered: