kaniel / scim-googlepinyin

Automatically exported from code.google.com/p/scim-googlepinyin
1 stars 0 forks source link

reproducable hangs when using scim-googlepinyin #17

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. input 'zhuashang'
2. 抓伤 should be the second choice. press 2

What is the expected output? What do you see instead?
抓伤 should be inputted but actually 2 was inputted.After that, I can only
input English.

What version of the product are you using? On what operating system?
ea955c9c52e9447808eab455ca870209961a8853
Gentoo

Original issue reported on code.google.com by cnye...@gmail.com on 5 Sep 2009 at 8:28

GoogleCodeExporter commented 9 years ago
hi yegle,

thanks for your time to report this bug. but i cannot reproduce this issue. 
here's my
steps:

1. scim-launcher -c simple -e googlepinyin -f x11
2. move $HOME/.scim/google-pinyin/user_dict.dat out of the way.
3. input 'zhuashang'
4. without user dict, i have "抓" as the 2nd candidate, while "伤" as the 
3rd. after
typing "2" and "3", "抓伤" is sent to the app.

could you move your ~/.scim/google-pinyin/user_dict.dat somewhere else, and try 
again?

if we can reproduce it, this bug should be an easy one to fix.

thanks,

Original comment by tchai...@gmail.com on 5 Sep 2009 at 11:28

GoogleCodeExporter commented 9 years ago
Yes after mv user_dict.dat somewhere else,this bug cannot reproduce anymore.
So does this mean my user_dict.dat file is corrupted?
My user_dict.dat file is uploaded here.

Original comment by cnye...@gmail.com on 5 Sep 2009 at 11:34

Attachments:

GoogleCodeExporter commented 9 years ago
doh! with your user dict, my scim-googlepinyin crashed:

scim-launcher: matrixsearch.cpp:851: size_t 
ime_pinyin::MatrixSearch::choose(size_t):
Assertion `step_to_dmi_fr != static_cast<PoolPosType>(-1)' failed.

i am looking at it.

Original comment by tchai...@gmail.com on 6 Sep 2009 at 3:26

GoogleCodeExporter commented 9 years ago
yegle,

> So does this mean my user_dict.dat file is corrupted?
maybe, but i am pretty sure that the crux is user_dict support. i dug into the 
user
dict implementation of google pinyin end up finding out that:

* it has nothing to do with the cache feature of user dict
* with the user dict provided by you, when i input the last character "a" in 
"zhua",
UserDict::locate_first_in_offsets() always returns "-1". which indicates that it
fails to find out the offset of user lemma by its spelling. this func uses 
binary
search to look for the searchable object.
* i trained an user dict with "抓上" as the 1st candidate, and "抓伤" as 
the second
one. with this user dict, the issue disappeared.

will get back to you when i have further result.

Original comment by tchai...@gmail.com on 6 Sep 2009 at 8:09

GoogleCodeExporter commented 9 years ago
Any further result on this?
I meet the same issue when I port it to Maemo platform. And it could always be
reproduced when second time to input "布达佩斯", even when I delete 
usr_dict.dat.
With this bug, it's nearly unusable. Well, I could only apply a workaround on 
that.
So far, the wordaround works well. You can get the patch here:
http://code.google.com/p/scim-for-maemo/source/detail?r=84

Original comment by firstfan on 21 Dec 2009 at 3:26

GoogleCodeExporter commented 9 years ago
hi firstfan,

sorry, no progress so far. =( 

the more weird thing is that i could reproduce this crash with your steps at 
beginning:
1. rm usr_dict.dat
2. input "布达佩斯"
2. input 'budapeisi'. and choose it with '1'

but after couple times, i cannot crash it anymore. anyway, i will try it again 
later on.

Original comment by tchai...@gmail.com on 21 Dec 2009 at 3:54

GoogleCodeExporter commented 9 years ago
Issue 29 has been merged into this issue.

Original comment by tchai...@gmail.com on 21 Dec 2009 at 4:24

GoogleCodeExporter commented 9 years ago
Issue 28 has been merged into this issue.

Original comment by tchai...@gmail.com on 21 Dec 2009 at 4:25

GoogleCodeExporter commented 9 years ago
as grace reported in issue#29. this bug happens when the user lemma is the 2nd
candidates:

建国大业出现第二个位置,尝试选择它,
          ~~~~~~~~

that's the key of fixing this issue. if the user lemma is the first one, 
everything
goes well.

Original comment by tchai...@gmail.com on 21 Dec 2009 at 4:26

GoogleCodeExporter commented 9 years ago
hi yegle and firstfan,

could you test the latest git version? i tried the user dict from yegle and the 
test
case from firstfan, neither of them crashes. seems this issue was squashed by
previous changes already. =)

will be closing this bug if no objection.

Original comment by tchai...@gmail.com on 28 Dec 2009 at 7:16

GoogleCodeExporter commented 9 years ago
@tchaikov
Sorry,I'm using ibus instead of scim now :-(

Original comment by cnye...@gmail.com on 28 Dec 2009 at 7:20

GoogleCodeExporter commented 9 years ago
@yegle
thank you after all! happy new year!! 8D

Original comment by tchai...@gmail.com on 28 Dec 2009 at 7:28

GoogleCodeExporter commented 9 years ago
@tchaikov
我这里还是有问题。我清过旧的usr_dict.dat文件了。再次输入��
�布达佩斯”后,这次布达佩斯不
会出现第二个选项了,至少说明升级代码后是有变化的。
但是我测试了上面有人反映的“建国大业”后,出现同样的��
�题。

Original comment by firstfan on 28 Dec 2009 at 8:10

GoogleCodeExporter commented 9 years ago
@tchaikov
 而且如果我还是用了我在comment 5里提到的补丁的话,会有更奇怪的反映,就是虽然不崩溃
了,但是这个词还是输入不了。不用的话,就和原来一样,��
�该处引起整个scim的crash

Original comment by firstfan on 28 Dec 2009 at 4:54

GoogleCodeExporter commented 9 years ago
的确,还是有问题。=(

Original comment by tchai...@gmail.com on 29 Dec 2009 at 6:55

GoogleCodeExporter commented 9 years ago
真是奇怪,无论是第一候选词,还是第二候选词,我现在都��
�以正常地输入“建国大业”。不管是
否删除 user dict 。

Original comment by tchai...@gmail.com on 30 Dec 2009 at 4:28

GoogleCodeExporter commented 9 years ago
@tchaikov
完全不重现了么?试过其它一些自造词么?

Original comment by firstfan on 31 Dec 2009 at 4:50

GoogleCodeExporter commented 9 years ago
不是完全,现在偶尔会崩溃。试过其它自造词。和 yegle 
一样,我现在也有一个肯定能用"建国
大业" crash 的 user 
dict,使用它时,第一个候选词是“见过大爷”。但是删除它�
��后,重新训
练就很难 crash 了。

我现在又回到了 UserDict::_get_lpis(), 
失败的情况就是在二分搜索之前 middle 和 max_off
都为零。自然就找不到了。

Original comment by tchai...@gmail.com on 31 Dec 2009 at 6:03

GoogleCodeExporter commented 9 years ago
I've met the same problem. :-(.

Original comment by simonxu...@gmail.com on 18 Jan 2010 at 10:23

GoogleCodeExporter commented 9 years ago
自己弄了个patch,貌似可以了。
主要问题是用户自定义的词典DictMatchInfo->dict_level好像都是1。
所以有些检查过不了。
详情见:
http://member.teesoft.info/blog/
It seems that there are issues or mis-matched standard for 
DictMatchInfo->dict_level. It seems seems the dict_level always be 1 for user 
lemma. So that some check will not pass.
You can find the patch at : http://member.teesoft.info/blog/

Original comment by wind.liy...@gmail.com on 3 Nov 2010 at 6:26

GoogleCodeExporter commented 9 years ago
换了改法,先使用原来的代码。如果失败在放宽条件再执行��
�便。
详情见:
http://member.teesoft.info/blog/

Original comment by wind.liy...@gmail.com on 18 Nov 2010 at 4:15