Bug 137396

Summary: LTC20105-kinput2 cannot work after specific function calls
Product: [openSUSE] openSUSE 10.3 Reporter: LTC BugProxy <bugproxy>
Component: X11 ApplicationsAssignee: Mike Fabian <mfabian>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: coolo
Version: Alpha 1plus   
Target Milestone: ---   
Hardware: i386   
OS: Linux   
See Also: https://bugzilla.linux.ibm.com/show_bug.cgi?id=20105
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: xim5b-mod3.c
LTC20105.patch

Description LTC BugProxy 2005-12-07 16:07:50 UTC
LTC Owner is: shoji@jp.ibm.com
LTC Originator is: toshiona@jp.ibm.com


Hardware Environment
PC (Celeron 2.4GHz, Memory 512MB)

Software Environment:
Operating System: SLES9 SP2, SLES9 SP3RC2

Problem Description:
kinput2 cannot work after specific function calls.
  XUnsetICFocus()
  XmbResetIC()
  XSetICFocus()

Steps to Reproduce:
1. Install SLES9 SP2, or "kinput2-v3.1-351.9".

2. Compile and run the test code.
   $ gcc -o xim5b-mod3 xim5b-mod3.c -lX11 -L/usr/X11R6/lib -I/usr/X11R6/include
   $ xim5b-mod3

3. Turn on kinput2 by pressing Shift+space.

4. Click right button of mouse over the window.
   Then, the following functions are called.
    XUnsetICFocus()
    XmbResetIC()
    XSetICFocus()

5. After that, no input passes to kinput2. <= Problem.
   All input characters appears as alphabet directly.

   If the problem didn't occur, please repeat step 4.

Additional Information:
- If only XmbResetIC() was called, the problem didn't occur.
- IBM Java5 uses these functions with the same sequence, so IBM Java5 has the 
problem.
- "kinput2-v3.1-315.4" of SLES9GM and SLES9 SP1 didn't have the problem.

Created an attachment (id=13573)
Sample code - xim5b-mod3.c


Created an attachment (id=13634)
1st sample fix.

Xtransport layer seems to have strange behavior to send multiple requests. I
added IMFlush() just after IM_RESET_IC_REPLY packet was ready to send.


The reported problem didn't occur with your fix. Thank you.
But, please give us some days for more tests.
Comment 1 LTC BugProxy 2005-12-07 16:08:35 UTC
Created attachment 60015 [details]
xim5b-mod3.c
Comment 2 LTC BugProxy 2005-12-07 16:08:58 UTC
Created attachment 60016 [details]
LTC20105.patch
Comment 3 LTC BugProxy 2005-12-12 08:00:08 UTC
changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|FIXEDAWAITINGTEST           |TESTED
   Target Milestone|---                         |SLES9_SP4




------- Additional Comments From toshiona@jp.ibm.com  2005-12-12 02:55 EDT -------
Moved the status to TESTED.
The reported problem was fixed by Sugiyama-san\'s fix, and I cannot find any 
side effect so far. Thank you.

I understood it\'s too late for SP3. I want the fix in SP4 at least.
Because the problem is a kind of regression, and IBM Java5 easily hits the 
problem in Japanese. 
Comment 4 Mike Fabian 2007-03-05 17:13:56 UTC
I can reproduce the problem and verify that the patch attached
to comment #2 helps.
Comment 5 Mike Fabian 2007-03-05 17:35:32 UTC
Fixed package submitted to STABLE and the openSUSE build service.
Comment 6 Mike Fabian 2007-03-05 17:39:16 UTC
Moved "Product" from "SUSE LINUX Enterprise Server 9 SP2"
to "openSUSE 10.3" because the bug still existed in openSUSE 10.3
as well (and to make the bug publicly readable).
Comment 8 Mike Fabian 2007-03-06 15:31:26 UTC
→ NEEDINFO Anja Stock <ast@novell.com>

Anja, is this OK for SLES9-SP4? Do we need a SWAMPID?
Comment 9 Mike Fabian 2007-03-06 15:34:11 UTC
Package submitted for SLES9-SP4:

-------------------------------------------------------------------
Tue Mar 06 15:39:49 CET 2007 - mfabian@suse.de

- Bugzilla #137396: "LTC20105-kinput2 cannot work after specific
  function calls": fixed by patch received from Shoji SUGIYAMA
  from IBM.

-------------------------------------------------------------------
mfabian@magellan:/work/src/done/SLES9-SP4/kinput2$ ls
Kinput2.conf.patch
bugzilla-137396-cannot-work-after-specific-function-calls.patch
bugzilla-47203-keep-auxiliary-windows-on-top.patch
bugzilla-62553-spotlocation.patch
bugzilla-63978-hoge.patch
kinput2-v3.1-beta3-java.dif
kinput2-v3.1-beta3.dif
kinput2-v3.1-rootwindow-1.patch
kinput2-v3.1.tar.bz2
kinput2.app-defaults.patch
kinput2.changes
kinput2.man-page.patch
kinput2.spec
reset_state.patch
mfabian@magellan:/work/src/done/SLES9-SP4/kinput2$
Comment 10 Mike Fabian 2007-03-06 15:48:59 UTC
Patch submitted upstream to the author of kinput2, Makoto Ishisone <ishisone@sra.co.jp>.
Comment 11 Anja Stock 2007-03-07 12:05:36 UTC
SWAMPID for SP4 is 3489
Comment 12 Mike Fabian 2007-03-07 16:26:56 UTC
Thank you for the SWAMPID.

Closing bug as FIXED.
Comment 13 LTC BugProxy 2007-03-08 04:35:14 UTC
changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ACCEPTED                    |CLOSED




------- Additional Comments From toshiona@jp.ibm.com  2007-03-07 23:31 EDT -------
I verified the problem was fixed with
ftp://ftp.suse.com/pub/projects/m17n/sles9/RPMS/i586/kinput2-v3.1-
315.11.i586.rpm

Closing. Thank you.