Tk Source Code

View Ticket
Login
Ticket UUID: 2902214
Title: Crash in X11 input-method handling with chinese locale
Type: Bug Version: obsolete: 8.5.6
Submitter: orrydong Created on: 2009-11-22 23:45:06
Subsystem: 70. Event Loop Assigned To: georgeps
Priority: 8 Severity:
Status: Closed Last Modified: 2026-10-22 17:22:35
Resolution: Fixed Closed By: serhiy.storchaka
    Closed on: 2026-09-25 08:08:05
Description:
bug shows here: http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/43fca0b5fbce3398/785ae0ad16e3ca37?pli=1

I found only one line corrected, we can solve this problem. (maybe just skip, but anyway wish can run):
line 365  in tkEvent.c :
XGetICValues(winPtr->inputContext, XNFilterEvents, &im_event_mask, NULL);
=>    if (winPtr->inputContext != NULL)  XGetICValues(winPtr->inputContext, XNFilterEvents, &im_event_mask, NULL);
User Comments: serhiy.storchaka added on 2026-09-25 08:08:05:

Fixed in 8.5.7 by [d0b235e497] ([78d05cc9dd] on trunk): CreateXIC() returns if XCreateIC() fails, as suggested below, so a failing input method no longer crashes Tk. Closing.


orrydong added on 2009-11-29 23:31:47:
The XIM Server which I use is gcin.  I type Traditional/Simple Chinese by it.

I can't run scilab, xcircuit(tcl), wish...etc. until change line 365 in tkEvent.c.
At present, they work fine and can display Chinese, but I can't type any Chinese word in many packages depending tcl/tk.
However, I can type Chinese words in scilab, depending tcl/tk too.

Solving this problem completely maybe need to hack gcin & scilab, I guess.