cht電腦資訊gcin
adm Find login register

gcin 2.8.3

samuelololol
joined: 2009-04-07
posted: 5
promoted:
bookmarked: 0
1subject: gcin 2.8.3Promote 0 Bookmark 02015-06-11quote  

大家好我現在遇到一個小問題

首先就是我的空白鍵是選字鍵

在我「還未輸入任何中文前」,只要按下空白鍵 (似乎就會去試圖想要去選字,然後根本沒有字給他選)

就會使得畫面卡住

 

以下是我的一些設定

系統 Gentoo

安裝 package: =app-i18n/gcin-2.8.3 USE="filter-nobopomofo gtk3 qt4 -anthy -chewing -chinese-sound"

~/.xinitrc

======
export LC_CTYPE=zh_TW.utf-8
export XIM=gcin
export XMODIFIERS=@im=gcin
export GTK_IM_MODULE=gcin
export GTK_IM_MODULES=gcin
export QT_IM_MODULE=gcin
export GCIN_DUAL_XIM_OFF=
export GCIN_XIM=gcin
======

 

 

$ gtk-query-immodules-2.0

======
 

"/usr/lib64/gtk-2.0/2.10.0/immodules/im-multipress.so"
"multipress" "Multipress" "gtk20" "" ""

"/usr/lib64/gtk-2.0/2.10.0/immodules/im-ipa.so"
"ipa" "IPA" "gtk20" "/usr/share/locale" ""

"/usr/lib64/gtk-2.0/2.10.0/immodules/im-cyrillic-translit.so"
"cyrillic_translit" "Cyrillic (Transliterated)" "gtk20" "/usr/share/locale" ""

"/usr/lib64/gtk-2.0/2.10.0/immodules/im-ti-et.so"
"ti_et" "Tigrigna-Ethiopian (EZ+)" "gtk20" "/usr/share/locale" "ti"

"/usr/lib64/gtk-2.0/2.10.0/immodules/im-inuktitut.so"
"inuktitut" "Inuktitut (Transliterated)" "gtk20" "/usr/share/locale" "iu"

"/usr/lib64/gtk-2.0/2.10.0/immodules/im-cedilla.so"
"cedilla" "Cedilla" "gtk20" "/usr/share/locale" "az:ca:co:fr:gv:oc:pt:sq:tr:wa"

"/usr/lib64/gtk-2.0/2.10.0/immodules/im-viqr.so"
"viqr" "Vietnamese (VIQR)" "gtk20" "/usr/share/locale" "vi"

"/usr/lib64/gtk-2.0/2.10.0/immodules/im-ti-er.so"
"ti_er" "Tigrigna-Eritrean (EZ+)" "gtk20" "/usr/share/locale" "ti"

"/usr/lib64/gtk-2.0/2.10.0/immodules/im-thai.so"
"thai" "Thai-Lao" "gtk20" "/usr/share/locale" "lo:th"

"/usr/lib64/gtk-2.0/2.10.0/immodules/im-xim.so"
"xim" "X Input Method" "gtk20" "/usr/share/locale" "ko:ja:th:zh"

"/usr/lib64/gtk-2.0/2.10.0/immodules/im-am-et.so"
"am_et" "Amharic (EZ+)" "gtk20" "/usr/share/locale" "am"

"/usr/lib64/gtk-2.0/immodules/im-gcin.so"
"gcin" "gcin Input Method" "gcin" "/usr/share/locale" "zh:ja"

 

======

 

 

$ gtk-query-immodules-3.0

======

"/usr/lib64/gtk-3.0/3.0.0/immodules/im-multipress.so"
"multipress" "Multipress" "gtk30" "" ""

"/usr/lib64/gtk-3.0/3.0.0/immodules/im-ipa.so"
"ipa" "IPA" "gtk30" "/usr/share/locale" ""

"/usr/lib64/gtk-3.0/3.0.0/immodules/im-cyrillic-translit.so"
"cyrillic_translit" "Cyrillic (Transliterated)" "gtk30" "/usr/share/locale" ""

"/usr/lib64/gtk-3.0/3.0.0/immodules/im-ti-et.so"
"ti_et" "Tigrigna-Ethiopian (EZ+)" "gtk30" "/usr/share/locale" "ti"

"/usr/lib64/gtk-3.0/3.0.0/immodules/im-inuktitut.so"
"inuktitut" "Inuktitut (Transliterated)" "gtk30" "/usr/share/locale" "iu"

"/usr/lib64/gtk-3.0/3.0.0/immodules/im-cedilla.so"
"cedilla" "Cedilla" "gtk30" "/usr/share/locale" "az:ca:co:fr:gv:oc:pt:sq:tr:wa"

"/usr/lib64/gtk-3.0/3.0.0/immodules/im-viqr.so"
"viqr" "Vietnamese (VIQR)" "gtk30" "/usr/share/locale" "vi"

"/usr/lib64/gtk-3.0/3.0.0/immodules/im-ti-er.so"
"ti_er" "Tigrigna-Eritrean (EZ+)" "gtk30" "/usr/share/locale" "ti"

"/usr/lib64/gtk-3.0/3.0.0/immodules/im-thai.so"
"thai" "Thai-Lao" "gtk30" "/usr/share/locale" "lo:th"

"/usr/lib64/gtk-3.0/3.0.0/immodules/im-xim.so"
"xim" "X Input Method" "gtk30" "/usr/share/locale" "ko:ja:th:zh"

"/usr/lib64/gtk-3.0/3.0.0/immodules/im-am-et.so"
"am_et" "Amharic (EZ+)" "gtk30" "/usr/share/locale" "am"

"/usr/lib64/gtk-3.0/immodules/im-gcin.so"
"gcin" "gcin Input Method" "gcin" "/usr/share/locale" "zh:ja"

 ======

 

這兩個檔案確實存在

======

$ ls -l /usr/lib64/gtk-2.0/immodules
total 16
-rwxr-xr-x 1 root root 14552 Jun 7 13:12 im-gcin.so

$ ls -l /usr/lib64/gtk-3.0/immodules
total 16
-rwxr-xr-x 1 root root 14544 Jun 7 13:12 im-gcin.so

======

 

還有相關設定

外觀設定

詞音設定

 

eliu

joined: 2007-08-09
posted: 11478
promoted: 617
bookmarked: 187
新竹, 台灣
2subject: gcin 2.8.3Promote 0 Bookmark 02015-06-11quote  

samuelololol
安裝 package: =app-i18n/gcin-2.8.3 USE="filter-nobopomofo gtk3 qt4 -anthy -chewing -chinese-sound"

這個先移除看看。

samuelololol
joined: 2009-04-07
posted: 5
promoted:
bookmarked: 0
3subject: Promote 0 Bookmark 02015-06-11quote  

移掉 gtk3 qt4 之後還是一樣會卡住
[ebuild R ~] app-i18n/gcin-2.8.3::gentoo-zh USE="filter-nobopomofo -anthy -chewing -chinese-sound -gtk3 -qt4"

eliu

joined: 2007-08-09
posted: 11478
promoted: 617
bookmarked: 187
新竹, 台灣
4subject: Promote 0 Bookmark 02015-06-11quote  

可能先只 install gcin 最基本的,create 新的 user account. 從頭開始測才知道問題在哪裡。

Hydonsingore
joined: 2007-12-16
posted: 20
promoted: 0
bookmarked: 2
Taiwan
5subject: Promote 0 Bookmark 02015-06-19quote  

這是gentoo在安裝gcin-2.8.3時的設定檔

https://github.com/microcai/gentoo-zh/blob/master/app-i18n/gcin/gcin-2.8.3.ebuild

預設部份只有

--use_i18n=Y --use_tsin=Y  --use_qt3=N

沒有太多複雜的設定

Hydonsingore
joined: 2007-12-16
posted: 20
promoted: 0
bookmarked: 2
Taiwan
6subject: Promote 0 Bookmark 02015-06-20quote  

剛剛測試了一下 2.8.0~2.8.3 各個版本

都是用 gentoo portage ebuild 的安裝方式,預設條件都相同(見上篇)

2.8.0 和 2.8.1 不會按空白鍵就卡住

看來是從 2.8.1 → 2.8.2 這次改版引發的問題

eliu

joined: 2007-08-09
posted: 11478
promoted: 617
bookmarked: 187
新竹, 台灣
7subject: Promote 0 Bookmark 02015-06-20quote  

是用什麼輸入法?有 diff gcin 2.8.1 2.8.2,看不出問題出在哪裡。

Hydonsingore
joined: 2007-12-16
posted: 20
promoted: 0
bookmarked: 2
Taiwan
8subject: Promote 0 Bookmark 02015-06-21quote  

只有詞音輸入法會出現這個問題

samuelololol
joined: 2009-04-07
posted: 5
promoted:
bookmarked: 0
9subject: Promote 0 Bookmark 02017-02-07quote  

我來考古一下,和很不專業的 trace

 

reproduce steps

  1. 環境和上面一樣,gcin 改成用 2.8.5
  2. 在 firefox 網址列打「中文字」後,按下 Enter。此時工作列是「詞」詞音狀態,尚未輸入任何字
  3. 準備輸入空白,所以按了一下空白鍵,然後就 hang 住
 
 
此時我用 gdb 去 attach 看一下 bt

#0 0x00007fc135b4c580 in read () from /lib64/libc.so.6
#1 0x0000000000409d23 in send_text ()
#2 0x00000000004223ff in ?? ()
#3 0x000000000040b711 in ?? ()
#4 0x0000000000433482 in ?? ()
#5 0x000000000043380e in ?? ()
#6 0x00007fc13669ec9d in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#7 0x00007fc13669f070 in ?? () from /usr/lib64/libglib-2.0.so.0
#8 0x00007fc13669f392 in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0
#9 0x00007fc137409aa7 in gtk_main () from /usr/lib64/libgtk-x11-2.0.so.0
#10 0x000000000040999d in ?? ()
#11 0x00007fc135a92790 in __libc_start_main () from /lib64/libc.so.6
#12 0x0000000000408fc9 in ?? ()

卡在 read(),我猜測這段 code 是在 eve.cpp 裡 248 行,在等 pipe 的值

242      if (pid) {

243        close(pfdw[0]);

244        close(pfdr[1]);

245        if (write(pfdw[1], text, len) < 0) {

246        }

247        close(pfdw[1]);

248        int rn = read(pfdr[0], filter_text, sizeof(filter_text) - 1);

249        filter_text[rn] = 0;

250  //      puts(filter_text);

251        close(pfdr[0]);

252        text = filter_text;

253        len = rn;

254      } else { 

 

我對 gcin source code 不熟,不知道該怎麼再追下去

eliu

joined: 2007-08-09
posted: 11478
promoted: 617
bookmarked: 187
新竹, 台灣
10subject: Promote 0 Bookmark 02017-02-07quote  

這邊是有用 GCIN_OUTPUT_FILTER 才會進入這段 code,這個 filter 只能用在 filter process 執行然後馬上結束,如果 filter process 一直不結束,就會產生卡住這種情形。我自己沒在用。

這個 filter 有可能造成安全漏洞,未來的版本有可能會內定不開啟,需要使用者自行 compile 打開。

edited: 4
samuelololol
joined: 2009-04-07
posted: 5
promoted:
bookmarked: 0
11subject: Promote 0 Bookmark 02017-02-07quote  

感謝解惑。我現在把注音文的 filter 拿掉,就不會卡住了。
接下來我再來看看,是不是 script file 有權限問題造成卡住,或是其他原因

cht電腦資訊gcin
adm Find login register
views:30730