Bug 191957

Summary: LTC23919-Chinese SCIM was down intermittently when input mode was switched
Product: [Fedora] Fedora Reporter: IBM Bug Proxy <bugproxy>
Component: scim-chewingAssignee: Caius Chance <K9>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: eng-i18n-bugs, petersen
Target Milestone: ---Keywords: i18n, Reopened
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-08-22 02:14:19 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:    
Bug Blocks: 167798    
Attachments:
Description Flags
OK.PNG
none
NG.PNG
none
LTC23919.patch
none
zh_CN-screenshot
none
zh_TW-Screenshot-1
none
zh_TW-Screenshot-2
none
zh_TW-Screenshot-3
none
zh_TW-Screenshot-4
none
zh_TW-Screenshot-5
none
zh_TW-Screenshot-6
none
patch which applies, 0.3.1-2.3
none
spec file of above patch
none
source rpm with patch
none
i386 rpm patched none

Description IBM Bug Proxy 2006-05-16 16:03:54 UTC
LTC Owner is: dmosby.com
LTC Originator is: toshiona.com


Problem description:
Chinese SCIM InputMethod was down intermittently when input mode was switched.
At that time, any key press inputs ASCII character directly, not to Chinese 
conversion method.

We cannot resolve the situation except restarting SCIM.

The problem occurs on both Traditional Chinese and Simplified Chinese
The problem occurs on the system installed in Chinese as default, and the 
system added Chinese support after install.

When the problem happens, SCIM menu doesn't display some icons;
"Switch between English and Chinese", "Switch between Wide and Half-width 
char", "Switch comma and period style".


Hardware Environment
    Machine type (p650, x235, SF2, etc.): IA32 PC
    Cpu type (Power4, Power5, IA-64, etc.): Xeon 2.4GHz x2


Is this reproducible? Yes
    If so, how long does it (did it) take to reproduce it? About 3 minutes.
    Describe the steps:

1. Install FedoraCore 5 with Traditional Chinese or Add Chinese support.
2. Login X-Window in Traditional Chinese Locale.
3. Open gnome-terminal.
4. Press Ctrl+Space key to activate SCIM.
5. Press Ctrl+Shift to switch to "CangJie" input mode.
6. Input some characters.
   For example, "aaa" and space
7. Press Ctrl+Shift key several times to switch input mode.

=> Sometimes, Chinese cannot be input.
    SCIM is running, but any input was entered as ASCII characters.

If the problem didn't occur, please repeat step 5 to 7.


Is the system (not just the application) hung? No
Did the system produce an OOPS message on the console? No
Is the system sitting in a debugger right now? No
    We can set up the victim system. Please contact me if you need.

Created an attachment (id=16912)
Screen Shot of OK case


Created an attachment (id=16913)
Screen Shot of NG case

Comment 1 IBM Bug Proxy 2006-05-16 16:06:48 UTC
Created attachment 129216 [details]
OK.PNG

Comment 2 IBM Bug Proxy 2006-05-16 16:07:38 UTC
Created attachment 129218 [details]
NG.PNG

Comment 3 Jens Petersen 2006-05-17 01:50:11 UTC
So this only happens with scim-tables IMEs (factories)?

Comment 4 IBM Bug Proxy 2006-05-17 07:04:30 UTC
----- Additional Comments From toshiona.com  2006-05-17 02:56 EDT -------
I found that the problem occurred when both "scim-talbes-chinese" and "scim-
chewing" were installed. (This is the default configuration of Fedora Core 5 
for Chinese.)
If scim-chewing was uninstalled, I didn't seen the problem.

It seems the problem happens when the input mode is switched between scim-
tables-chinese's one and scim-chewing's one.

But, I'm not sure which component has cause. 

Comment 5 IBM Bug Proxy 2006-06-21 01:41:56 UTC
----- Additional Comments From shoji.com  2006-06-20 21:45 EDT -------
I could reproduce the problem. If you switch IMs rapidly, the problem seems to 
be occured easier.

According to "SCIM" related process status, one scim backend process (IM-
Engine <--> socket frontend) is killed.

<Before problem>
[shoji@localhost ~]$ ps ax | fgrep sci
 3380 ?        Ss     0:00 /usr/lib/scim-1.0/scim-helper-manager
 3381 ?        Ssl    0:37 /usr/lib/scim-1.0/scim-panel-gtk --display :0.0 -c 
socket -d --no-stay
 3383 ?        Ss     0:00 /usr/lib/scim-1.0/scim-launcher -d -c socket -e 
socket -f x11
 3446 ?        Ss     0:00 /usr/lib/scim-1.0/scim-helper-launcher --daemon --
config socket --display :0.0 anthy-imengine-helper 24a65e2b-10a8-4d4c-adc9-
266678cb1a38
 3839 ?        Ss     0:00 /usr/lib/scim-1.0/scim-launcher -d -c simple -e 
all -f socket --no-stay
 3863 pts/3    S+     0:00 fgrep sci

<After Problem occured>
[shoji@localhost ~]$ ps ax | fgrep sci
 3380 ?        Ss     0:00 /usr/lib/scim-1.0/scim-helper-manager
 3381 ?        Ssl    0:40 /usr/lib/scim-1.0/scim-panel-gtk --display :0.0 -c 
socket -d --no-stay
 3383 ?        Ss     0:00 /usr/lib/scim-1.0/scim-launcher -d -c socket -e 
socket -f x11
 3446 ?        Ss     0:00 /usr/lib/scim-1.0/scim-helper-launcher --daemon --
config socket --display :0.0 anthy-imengine-helper 24a65e2b-10a8-4d4c-adc9-
266678cb1a38
 3889 pts/3    S+     0:00 fgrep sci 

Comment 6 IBM Bug Proxy 2006-06-21 01:47:00 UTC
----- Additional Comments From shoji.com  2006-06-20 21:51 EDT -------
Backtrace information of "scim-launcher" process.

rogram received signal SIGSEGV, Segmentation fault.
0x00c85fd3 in strlen () from /lib/libc.so.6
(gdb) where
#0  0x00c85fd3 in strlen () from /lib/libc.so.6
#1  0x006f6f18 in ChewingIMEngineInstance::commit () from /usr/lib/scim-
1.0/1.4.0/IMEngine/chewing.so
#2  0x006f927f in ChewingIMEngineInstance::process_key_event () 
from /usr/lib/scim-1.0/1.4.0/IMEngine/chewing.so
#3  0x00b3f86b in scim::FrontEndBase::process_key_event () 
from /usr/lib/libscim-1.0.so.8
#4  0x001ca441 in SocketFrontEnd::socket_process_key_event () 
from /usr/lib/scim-1.0/1.4.0/FrontEnd/socket.so
#5  0x001cb648 in SocketFrontEnd::socket_receive_callback () 
from /usr/lib/scim-1.0/1.4.0/FrontEnd/socket.so
#6  0x001cbc75 in scim::MethodSlot2<SocketFrontEnd, void, scim::SocketServer*, 
scim::Socket const&>::call ()
   from /usr/lib/scim-1.0/1.4.0/FrontEnd/socket.so
#7  0x00b74c9b in scim::SocketServer::run () from /usr/lib/libscim-1.0.so.8
#8  0x001c3a11 in SocketFrontEnd::run () from /usr/lib/scim-
1.0/1.4.0/FrontEnd/socket.so
#9  0x001c4161 in socket_LTX_scim_frontend_module_run () from /usr/lib/scim-
1.0/1.4.0/FrontEnd/socket.so
#10 0x00b42fd9 in scim::FrontEndModule::run () from /usr/lib/libscim-1.0.so.8
#11 0x0804a78a in ?? ()
#12 0x00c31724 in __libc_start_main () from /lib/libc.so.6
#13 0x08049841 in ?? () 

Comment 7 IBM Bug Proxy 2006-06-21 08:41:56 UTC
Created attachment 131260 [details]
LTC23919.patch

Comment 8 IBM Bug Proxy 2006-06-21 08:42:11 UTC
changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #17032|0                           |1
        is obsolete|                            |




------- Additional Comments From shoji.com  2006-06-21 04:47 EDT -------
 
Patch.

According to valgrind log files, some uninitialized values were used in if
statements of the scim-chewing code.
Please find the attached patch to initialize private members of
ChewingIMEngineInstance class. 

Comment 9 IBM Bug Proxy 2006-06-21 09:41:38 UTC
changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|FIXEDAWAITINGTEST           |TESTED




------- Additional Comments From toshiona.com  2006-06-21 05:43 EDT -------
Sugiyama-san,

I tried the recreate scenario more than 20 times with your patch, and wasn't 
able to recreate this problem. It can say your fix is working.
Thank you! 

Comment 10 Jens Petersen 2006-06-22 02:04:03 UTC
The function is ChewingIMEngineInstance::ChewingIMEngineInstance.

Comment 11 Darshan Santani 2006-06-27 06:11:25 UTC
Patch has been added and build in devel for RAWHIDE.

Comment 12 Satyabrata Maitra 2006-06-30 12:36:20 UTC
Tested the bug on Simplified and Traditional Chinese with Cangjie method.

Result : 1. Pressing a three times, without giving space (aaa) showing 3 char 
            different chinese char for each key press. Chiness characters are 
            appearing each time. No ASCII char showing.
         2. If type "as" then a candidate window appearing with 2 chars 1 & 2.
If then press 1, the corresponding char is not entering. it is looking like
"as1" Want to mention that, the candidate window appearing after pressing 'a'
and still present on the screen after pressing "s" also. Is it the right
behavior? please see the attachment.

Tested on environments and package versions :

scim-pinyin-0.5.91-5
scim-chewing-0.3.1-1
scim-devel-1.4.4-21
scim-tables-chinese-0.5.6-5
scim-hangul-0.2.2-4.fc6
scim-tables-0.5.6-5
scim-1.4.4-21
scim-anthy-1.0.0-2.fc6
scim-libs-1.4.4-21
scim-qtimm-0.9.4-4
scim-libs-1.4.4-17
scim-m17n-0.2.0-3 

And O.S. version in which tested is Fedora Core release 5.89 (Rawhide) - i386.

Comment 13 Satyabrata Maitra 2006-06-30 12:37:23 UTC
Created attachment 131799 [details]
zh_CN-screenshot

Comment 14 Satyabrata Maitra 2006-06-30 12:38:14 UTC
Created attachment 131800 [details]
zh_TW-Screenshot-1

Comment 15 Satyabrata Maitra 2006-06-30 12:39:57 UTC
Created attachment 131801 [details]
zh_TW-Screenshot-2

Tested changing the input mode with CTRL + SHIFT.

Comment 16 Satyabrata Maitra 2006-06-30 12:41:01 UTC
Created attachment 131802 [details]
zh_TW-Screenshot-3

Comment 17 Satyabrata Maitra 2006-06-30 12:41:34 UTC
Created attachment 131803 [details]
zh_TW-Screenshot-4

Comment 18 Satyabrata Maitra 2006-06-30 12:42:12 UTC
Created attachment 131804 [details]
zh_TW-Screenshot-5

Comment 19 Satyabrata Maitra 2006-06-30 12:43:24 UTC
Created attachment 131805 [details]
zh_TW-Screenshot-6

See if any more screenshot needed. please inform.

Comment 20 Jens Petersen 2006-06-30 12:57:43 UTC
Fix is in scim-chewing-0.3.1-2!

(Darshan, please mention the package ver-rel next time.)

Comment 21 IBM Bug Proxy 2006-07-03 01:51:40 UTC
----- Additional Comments From toshiona.com  2006-07-02 21:56 EDT -------
The behaviors you attached are correct. If this problem occurs, no Chinese 
character nor alphabet with underline is shown.

As we found, the problem intermittently occurs when input mode switched between
"scim-talbes-chinese" and "scim-chewing". 

Comment 22 Satyabrata Maitra 2006-07-27 13:19:38 UTC
result is  same as the result written in the comment no. - 12. 

Version tested for the component :

scim-chewing-0.3.1-2.1
scim-qtimm-0.9.4-5
scim-pinyin-0.5.91-11.3.fc6
scim-bridge-gtkimm-0.2.6-1.fc6
scim-fcitx-3.1.1-5.fc6
scim-chinese-standard-0.0.2-3.fc6
scim-bridge-0.2.6-1.fc6
scim-input-pad-0.1.1-4.fc6
scim-libs-1.4.4-25.fc6
scim-devel-1.4.4-25.fc6
scim-fcitx-tools-3.1.1-5.fc6
scim-m17n-0.2.0-5.fc6
scim-doc-1.4.4-25.fc6
scim-tables-0.5.6-7
scim-tables-chinese-0.5.6-7
scim-skk-0.5.2-7.fc6
scim-tables-additional-0.5.6-7





Comment 24 Jens Petersen 2006-08-15 08:31:37 UTC
Patch was included in -2 but not applied...

Comment 25 Caius Chance 2006-08-17 01:25:49 UTC
Created attachment 134361 [details]
patch which applies, 0.3.1-2.3

Comment 26 Caius Chance 2006-08-17 01:27:17 UTC
Created attachment 134362 [details]
spec file of above patch

Comment 27 Caius Chance 2006-08-17 06:54:41 UTC
The patch is not applicable anymore. The expressions and variables in the patch
are not used in recent version of scim & scim-chewing.

-----

After I tried to reproduce the bug with the latest devel versions:

scim-chewing-0.3.1-2.1
scim-devel-1.4.4-31.fc6
scim-debuginfo-1.4.4-31.fc6
scim-1.4.4-31.fc6
scim-tables-chinese-0.5.6-7
scim-tables-0.5.6-7
scim-chewing-debuginfo-0.3.1-2.1
scim-libs-1.4.4-31.fc6

The bug is either does not exist, or it is even not a bug.

-----

The steps I reproduce the bug:

1. Alt-F2 -> input "gedit" -> gedit started, click on gedit window to focus.
2. Ctrl-space to turn on scim.
3. Ctrl-shifts to change to changjie.
4. input "aaa" and press Space, a character appears on gedit.
5. a character "æ¶" appears on gedit.
6. Ctrl-shift 3 times and scim changes to Canton-HK input method.
7. input "aa" and candidates come up, press "1" to let "å" appears on gedit.
8. Ctrl-shift 2 times and scim changes to chewing input method.
9. input "ma" and candidates come up, press "1" then enter to let "å" appears
on gedit.
10. Ctrl-space to change scim back to english input mode.

Repeated above steps but personally I reckon there is no problems found
regarding the mentioned behavior problems of scim.

-----

FYI, there are differences among the chinese imput methods, some of them uses
space key to select a candidates, some of them uses enter key or number keys
instead. Also, inputing "aaa" will not guarantee to match a candidate in certain
 chinese input methods.

If eventually such behavior is defined as a bug, it might be considered as
another bug when similar symptoms exists in the recent version.

Comment 28 Jens Petersen 2006-08-17 07:50:50 UTC
So to summarize: apparently the scim-chewing issue is fixed in
scim-chewing-0.3.1 which is in FC development.

Presumably the problem still exists in fc5: we should probably consider
doing an update to fix that.

Comment 29 Caius Chance 2006-08-18 00:37:28 UTC
The original patch by dsantani was supposed to put into FC-5 branch but it was
in fact put into devel branch.

The patch is only applicable to FC-5 (scim-chewing-0.2.1), which
scim-chewing-0.3.1 does not need and also not applicable such patch.

Patch has now been relocated properly and in progress of rebuild and test.

Comment 30 Caius Chance 2006-08-18 02:28:47 UTC
Created attachment 134420 [details]
source rpm with patch

Comment 31 Caius Chance 2006-08-18 02:30:09 UTC
Created attachment 134421 [details]
i386 rpm patched

Comment 32 Caius Chance 2006-08-18 02:31:42 UTC
I rebuilt and did a basic test.

Comment 33 IBM Bug Proxy 2006-08-21 10:26:49 UTC
----- Additional Comments From shoji.com  2006-08-21 06:34 EDT -------
Nakamura-san,

Could you kindly double check it with the latest scim RPM packages as 
attached ?

Regards, 

Comment 34 Fedora Update System 2006-08-21 13:11:46 UTC
scim-chewing-0.2.1-5.4.fc5 has been pushed for fc5, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.

Comment 35 IBM Bug Proxy 2006-08-22 03:07:10 UTC
----- Additional Comments From toshiona.com  2006-08-21 23:12 EDT -------
I verified the problem was fixed on scim-chewing-0.2.1-5.4.fc5.i386.rpm in
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/i386/
Thank you.