[Fedora-i18n-bugs] [Bug 590612] [abrt] crash in ibus-anthy-1.2.0.20100115-1.fc12: engine.py:691:__update_anthy_convert_chars:IndexError: list index out of range
bugzilla at redhat.com
bugzilla at redhat.com
Tue May 11 02:09:42 UTC 2010
Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=590612
fujiwara <tfujiwar at redhat.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Flag| |needinfo?(tk01 at mbd.nifty.co
| |m)
--- Comment #2 from fujiwara <tfujiwar at redhat.com> 2010-05-10 22:09:40 EDT ---
How do you reproduce your problem?
I cannot reproduce it.
>From your stack, I created the following test case:
% cat test.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
def __update_anthy_convert_chars(__cursor_pos):
__convert_chars = u""
pos = 0
__segments = list()
__segments.append((0, u"\u5148\u751f\u3092"))
__segments.append((0, u"\u5148\u751f\u3092"))
for i, (seg_index, text) in enumerate(__segments):
__convert_chars += text
if i < __cursor_pos:
pos + len(text)
print "i =", i
print "text =", text
print "pos =", pos
print "seg_index =", seg_index
print "__cursor_pos =", __cursor_pos
print "len =", len(__segments)
print __segments[__cursor_pos]
def main():
print "#### possible situation"
__update_anthy_convert_chars(0)
#print "#### impossible situation"
#__update_anthy_convert_chars(2)
main()
% python test.py
If I commented out the two lines of impossible situation in the script, I could
see the same error.
But I think the '__cursor_pos' value is always within __segments[].
So I need to know how to reproduce your problem.
Maybe you typed something, something, "senseino", something..., moved the
cursor with a special way and typed space key.
I tested several ways but the cursor position is always within the preedit
segments and cannot reproduce your problem.
If I will add 'if self.__cursor_pos >= len(__segments):', the main problem will
be fixed but I think the root cause should be fixed instead.
--
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the i18n-bugs
mailing list