cht電腦資訊gcin已解決問題
adm Find login register

[patch] fix segfault with anthy and GTK+ 2.91.7

caleb
joined: 2007-09-22
posted: 630
promoted: 134
bookmarked: 90
1subject: [patch] fix segfault with anthy and GTK+ 2.91.7Promote 0 Bookmark 02010-12-24quote  

如附件。

1. 不知為啥 set_label_font_size(label, gcin_font_size); 那行在 GTK+ 2.91.7 會導致 segfault

1. dbg 錯誤訊息為:

1. Program received signal SIGSEGV, Segmentation fault.
1. 0xb74db313 in strlen () from /lib/libc.so.6

1. 除此之外 GCIN_DEBUG=1 、strace 等等均無特別訊息,就只有一句 Segmentation fault...

1. 亂試了幾種方法均無效,只能在 GTK+ 2.91.7 把那行拿掉。至少拿掉後 anthy 就能正常使用了…orz

2. 新版 GTK+ 2.x 拿掉了 GDK_DISPLAY(), 但 GTK+ 2.9x 又新增了 GDK_DISPLAY(object)

2. patch 裡多放一行 #undef GDK_DISPLAY 以免無用的 warning 太多

caleb
joined: 2007-09-22
posted: 630
promoted: 134
bookmarked: 90
2subject: Promote 0 Bookmark 02010-12-24quote  

若不用 anthy 就遇不到 segfault.

GTK+ <= 2.91.6 及 GTK+ 2.x 用 anthy 都很正常。

eliu

joined: 2007-08-09
posted: 11468
promoted: 617
bookmarked: 187
新竹, 台灣
3subject: [patch] fix segfault with anthy and GTK+ 2.91.7Promote 0 Bookmark 02010-12-25quote  

caleb
1. 不知為啥 set_label_font_size(label, gcin_font_size); 那行在 GTK+ 2.91.7 會導致 segfault

這個我也碰過。

建議全部 clean rm *.o *.so 試試看,因為 anthy 是放在 gcin*.so, call 外部的 function set_label_font_size,有可能address 變了,就會導致這種情形。

edited: 1

cht電腦資訊gcin已解決問題
adm Find login register
views:7578