Bug 213796
| Summary: | crashes when clicking during scim gtkimm preedit | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Jens Petersen <petersen> | ||||||||||||
| Component: | scim | Assignee: | Peng Huang <phuang> | ||||||||||||
| Status: | CLOSED RAWHIDE | QA Contact: | |||||||||||||
| Severity: | medium | Docs Contact: | |||||||||||||
| Priority: | medium | ||||||||||||||
| Version: | rawhide | CC: | eng-i18n-bugs, james.su, K9, mclasen | ||||||||||||
| Target Milestone: | --- | Keywords: | i18n | ||||||||||||
| Target Release: | --- | ||||||||||||||
| Hardware: | All | ||||||||||||||
| OS: | Linux | ||||||||||||||
| Whiteboard: | |||||||||||||||
| Fixed In Version: | scim-1.4.5-7.fc7 | Doc Type: | Bug Fix | ||||||||||||
| Doc Text: | Story Points: | --- | |||||||||||||
| Clone Of: | Environment: | ||||||||||||||
| Last Closed: | 2007-01-18 12:49:22 UTC | Type: | --- | ||||||||||||
| Regression: | --- | Mount Type: | --- | ||||||||||||
| Documentation: | --- | CRM: | |||||||||||||
| Verified Versions: | Category: | --- | |||||||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||||||
| Embargoed: | |||||||||||||||
| Bug Depends On: | 217827 | ||||||||||||||
| Bug Blocks: | 214128 | ||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
Jens Petersen
2006-11-03 00:11:26 UTC
Both multiple clicking with either scim-pinyin or scim-chewing preedit on a line in a gtktextview can cause crashes. *** Bug 214943 has been marked as a duplicate of this bug. *** also happens with scim-anthy and Chinese scim-tables Reported in upstream tracker as https://sourceforge.net/tracker/index.php?func=detail&aid=1600910&group_id=108454&atid=650539 Created attachment 141874 [details]
gtk2.backtrace
Here is another backtrace using a gtktextview from gtk-demo.
Created attachment 141887 [details]
add hide preedit string in IMEngine reset method.
When user clicks the gtktextview, it will reset immodule (scim-bridge), and it
will cause IMEngine reseted. But scim-chewing does not hide preedit_string when
IMEngine reset is called. I think it's the root reason.
Bug #209575 has the same behavior which: `GTK_IM_MODULE=scim-bridge gedit` which uses scim-bridge as IMMODULE. It was also be called reset and crashes because chewing didn't follow the command. After the fix which add focus_out() and focus_in() in reset function within chewing, it works for scim-bridge. ===== However, when IME is started by: `GTK_IM_MODULE=scim gedit` which uses scim built-in IMMODULE. It still crashes though SCIM's reset function has called chewing's reset function, but it just doesn't clear the preedit even same focus_in() and focus_out() modifications are in chewing reset function. ===== Just my exp hope that helps. Please kindly point out if I got any info inaccurate. Shawn, this problem is not specific to scim-chewing. Just to clarify: there were two problems - one was scim-chewing not resetting preedit (bug 206120) which affects both scim-bridge and the scim gtkimm. It is already fixed in devel (rawhide). This remaining bug is only related to the scim gtkimm and occurs for scim-anthy, scim-hangul, scim-pinyin, scim-chewing, and scim-tables (and probably scim-m17n too). However attachment 141887 [details] might be a more correct way of fixing the scim-chewing crash? Perhaps you could attach it to the other bug? im-scim has two modes to filter keys. One is snooper, another is overriding gtkimcontext filter_keypress method. when im-scim uses snooper, gtktextview will not get any key events, and then it will not reset imcontext when mouse clicked. It will make gtktextview and scim in a wrong state. There are two ways to fix it. 1. turn off snooper. (I am not sure if it has some impact) 2. snooper mouse event, reset im when mouse clicked. (I am not sure if can snooper mouse events). Created attachment 141979 [details]
Turn off snooper mode to avoid this bug.
The patch is for scim component. It will turn off snooper in im-scim, It can
avoid this bug.
I tried setting /FrontEnd/GtkIMModule/UseKeySnooper = false but I still seem able to reproduce the crash. It seems the config key does not work. :-( But the patch to turn off the snooper does. :) fixed in scim-1_4_5-4_fc7 Created attachment 142262 [details] Appatch from james.su Hi, On 11/28/06, Shawn Huang <phuang> wrote: > > Yusuke TABATA wrote: >> > > Jens Petersen wrote: >> > > >>> > >> It seems the key snooper of the scim gtk immodule can lead to crashes >>> > >> during preedit when clicking in a gtk text buffer. (See >>> > >> https://sourceforge.net/tracker/?func=detail&atid=650539&aid=1600910&group_id=108454 >>> > >> for more details.) >>> > >> >>> > >> Can someone remind me what the key snooper function is useful for? >>> > >> >> > > Use of key snooper is work around for this issue. >> > > http://bugzilla.gnome.org/show_bug.cgi?id=111438 >> > > FYI: Latest uim uses other method to avoid it. >> > > >> > > Anyway, I wonder if the crash really caused by snooper. >> > > > > I found when snooper is enabled, gtktextview will not get any key > > events. If user clicks mouse button, > > gtktextview will not reset IMContext, because he think IMContext did not > > receive any key events. Then > > gtktextview will calculate and show text selection, but the preedit > > string was not cleaned. It will cause chaos > > in gtktextview, and then crash. > > I think we should enable snooper for hot keys, but skip other keys in > > snooper callback. Does It make sense? This way can't fix the issue mentioned in http://bugzilla.gnome.org/show_bug.cgi?id=111438 IMHO, gtktextview should be fixed to avoid such crash even if the preedit string was not cleaned. And im context should be reset no matter whether it received any key events or not, when clicking mouse. hi mclasen,
Could you review this patch for gtk from James Su (attachment 142262 [details])? Thanks.
file a bug on gnome bugzilla http://bugzilla.gnome.org/show_bug.cgi?id=380753 Turn off snooper can work now very well. I close it temporarily. fixed in scim-1_4_5-4_fc7 . Thanks - it may be better to clone a separate gtk2 bug for the gtktextview patch. Created attachment 145909 [details]
Screenshot of the gedit
Version tested against ::
1. scim-1.4.5-7.fc7
Steps to reproduce ::
1. Activate scim-chewing
2. Launch gedit
3. Input the following keysequence ji3+Enter+ji3 (我我)
3. Double-click several times after the second word 我
Observation ::
Gedit didnt not crash, resolving it for this version scim-1.4.5-7.fc7,
attaching the screen shot.
|