Bug 8984 - infinite loop caused by toggling mode in word registration
Summary: infinite loop caused by toggling mode in word registration
Status: RESOLVED FIXED
Alias: None
Product: UIM
Classification: Unclassified
Component: IM: Other IMs (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: uim-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-11 07:53 UTC by mft
Modified: 2006-11-13 03:50 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description mft 2006-11-11 07:53:20 UTC
In a textarea on Firefox, if I toggling Japanese/English mode with hitting the
hankaku/zenkaku key in a word registration bracket, uim stops responding,
while the following lines are output on console infinitely:

>>(symbol-value command)
>>((symbol-value command) context key key-state)
>>((symbol-value command) context key key-state)
>>(prime-proc-call-command keymap context key key-state)
>>(if (control-char? key) (im-commit-raw context) (let-internal (keymap)
((prime-keymap-get-keymap context key key-state)) (begin
(prime-proc-call-command keymap context key key-state) (prime-update-key-press
context))))
>>(and handler (apply handler handler-args))
>>(key-press-handler 1 (quote return) 0)

I must kill Firefox to stop the output.

I'm using uim 1.2.1.
Comment 1 Etsushi Kato 2006-11-12 20:35:44 UTC
I cannot reproduce it.  Could you tell me how to reproduce the problem?
And is the problem firefox specific? or applicable to other GTK+ application?
Comment 2 mft 2006-11-13 01:15:09 UTC
(In reply to comment #1)
> I cannot reproduce it.  Could you tell me how to reproduce the problem?

I'm trying ...
OK, let's register "潜るとは". It doesn't appear in the candidates, so moving to
the end of candidates list starts the registration process. First, enter "潜る",
then "とは". Just after that without any red underlines, press hankaku/zenkaku
to toggle off Japanese. Then I see on console from which I launched firefox:

ERROR: unbound variable (errobj prime-command-child-commit)

*backtrace*
>>(symbol-value command)
>>((symbol-value command) context key key-state)
>>((symbol-value command) context key key-state)
>>(prime-proc-call-command keymap context key key-state)
>>(if (control-char? key) (im-commit-raw context) (let-internal (keymap)
((prime-keymap-get-keymap context key key-state)) (begin
(prime-proc-call-command keymap context key key-state) (prime-update-key-press
context))))
>>(and handler (apply handler handler-args))
>>(key-press-handler 1 (quote return) 0)

I haven't noticed this first message output just once on the previous reporting
time. It means I misunderstood the true starting point of infinite loop. If I
hit Enter key to commit, the loop starts.

> And is the problem firefox specific? or applicable to other GTK+ application?

I'm not sure.
Comment 3 Etsushi Kato 2006-11-13 03:50:30 UTC
Aha.  It is needed to press commit key (enter key) after toggling to latin mode
to reproduce the bug for me.  Please apply following patch.

Thanks for the report.

Index: prime.scm
===================================================================
--- prime.scm   (revision 3972)
+++ prime.scm   (working copy)
@@ -181,7 +181,7 @@
    (prime-backspace-key?      . prime-command-fund-backspace)
    (prime-delete-key?         . prime-command-fund-delete)
    (prime-cancel-key?         . prime-command-fund-cancel)
-   (prime-commit-key?         . prime-command-child-commit)
+   (prime-commit-key?         . prime-command-child-finish)
    (prime-go-left-key?        . prime-command-fund-cursor-left)
    (prime-go-right-key?       . prime-command-fund-cursor-right)
    (prime-go-left-edge-key?   . prime-command-fund-cursor-left-edge)


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.