Summary: | uim-pref crashes when there's no ~/.uim.d directory | ||
---|---|---|---|
Product: | UIM | Reporter: | Kazuki Ohta <mover> |
Component: | helper: pref | Assignee: | YamaKen <yamaken> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | high | CC: | ashie, uim-bugs, yamaken |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Bug Depends on: | |||
Bug Blocks: | 2304 |
Description
Kazuki Ohta
2005-02-04 20:29:31 UTC
The problem is not reproduced in my environment (FreeBSD 5.3 and GTK+ 2.4.14) with uim-pref-gtk of r530. Please provide following information. - error log $ LIBUIM_VERBOSE=5 uim-pref-gtk 2>&1 | grep -10 ERROR - trace log of uim_scm_evals $ (cd tools; ./uim-trace.sh uim-pref-gtk) Please check. LIBUIM_VERBOSE=5 uim-pref-gtk 2>&1 | grep -10 ERROR debian% LIBUIM_VERBOSE=5 uim-pref-gtk 2>&1 | grep -10 ERROR (define direct-init-handler (lambda (id im arg) (let ((dc (direct-context-new id im))) dc))) (define direct-release-handler (lambda (dc) ())) (define direct-key-press-handler (lambda (dc key state) (im-commit-raw dc))) (define direct-key-release-handler (lambda (dc key state) (im-commit-raw dc))) (define direct-reset-handler (lambda (dc) ())) (define direct-get-candidate-handler (lambda (dc idx) ())) (define direct-set-candidate-index-handler (lambda (dc idx) ())) (direct-configure-widgets) (register-im (quote direct) "*" "UTF-8" (N_ "Direct") (N_ "Pass through all user input without any modification") () direct-init-handler direct-release-handler context-mode-handler direct-key-press-handler direct-key-release-handler direct- reset-handler direct-get-candidate-handler direct-set-candidate-index-handler co ntext-prop-activate-handler) done. ERROR: stub IM actualization failed *backtrace* >>(error "stub IM actualization failed") at /usr/local/share/uim/lazy-load.scm:4 8 >>(if (not (eq? init-handler stub-im-init-handler)) (init-handler id im arg) (be gin (error "stub IM actualization failed") ())) at /usr/local/share/uim/lazy-loa d.scm:44 >>(handler id im arg) at /usr/local/share/uim/im.scm:236 >>(create-context 0 (quote ()) (quote direct)) zsh: segmentation fault (core dumped) LIBUIM_VERBOSE=5 uim-pref-gtk 2>& 1 | zsh: done grep -10 ERROR ------------------------------------------------------------------ ./uim-trace.sh uim-pref-gtk (eq? (custom-type 'skk-go-right-key) 'boolean) (eq? (custom-type 'skk-go-right-key) 'integer) (eq? (custom-type 'skk-go-right-key) 'string) (eq? (custom-type 'skk-go-right-key) 'pathname) (eq? (custom-type 'skk-go-right-key) 'choice) (eq? (custom-type 'skk-go-right-key) 'ordered-list) (eq? (custom-type 'skk-go-right-key) 'key) Breakpoint 3, uim_scm_eval (obj=0x409e3218) at uim-scm.c:302 (uim-get-default-im-name \"C\") (create-context 0 '#f 'direct) uim-plugin-lib-load-path uim-plugin-scm-load-path It's weird. Show me result of following evaluations. $ uim-sh uim> (retrieve-im 'direct) (direct "*" "UTF-8" "Direct" "Pass through all user input without any modification" () #<CLOSURE (id fake-im fake-arg) (let* ((stub-im (retrieve-im name)) (stub-im-init-handler (and stub-im (im-init-handler stub-im)))) (and (require-module module-name) (let* ((im (retrieve-im name)) (init-handler (im-init-handler im)) (arg (im-init-arg im)) (context (if (not (eq? init-handler stub-im-init-handler)) (init-handler id im arg) (begin (error "stub IM actualization failed") ())))) context)))> () () () () () () () () "direct") uim> (and (create-context 0 #f 'direct) #t) 1 uim> (retrieve-im 'direct) (direct "*" "UTF-8" "Direct" "Pass through all user input without any modification" () #<CLOSURE (id im arg) (let-internal (dc) ((direct-context-new id im)) dc)> #<CLOSURE (dc) ()> #<CLOSURE (context mode) (let* ((mode-widget (context-find-mode-widget context)) (act-id (and mode-widget (widget-mode-value->action-id mode-widget mode)))) (and act-id (widget-activate! mode-widget act-id)))> #<CLOSURE (dc key state) (im-commit-raw dc)> #<CLOSURE (dc key state) (im-commit-raw dc)> #<CLOSURE (dc) ()> #<CLOSURE (dc idx) ()> #<CLOSURE (dc idx) ()> #<CLOSURE (context message) (let* ((widgets (context-widgets context)) (act-id (string->symbol message)) (activate! (lambda (widget) (let* ((actions (widget-actions widget)) (action (assq act-id actions)) (indicator (widget-indicator widget))) (or (widget-activate! widget action) (widget-activate! widget indicator)))))) (find activate! widgets))> "direct") The result of following evaluations. debian% uim-sh uim> (retrieve-im 'direct) (direct "*" "UTF-8" "Direct" "Pass through all user input without any modification" () #<CLOSURE (id fake-im fake-arg) (let* ((stub-im (retrieve-im name)) (stub-im-init-handler (and stub-im (im-init-handler stub-im)))) (and (require-module module-name) (let* ((im (retrieve-im name)) (init-handler (im-init-handler im)) (arg (im-init-arg im)) (context (if (not (eq? init-handler stub-im-init-handler)) (init-handler id im arg) (begin (error "stub IM actualization failed") ())))) context)))> () () () () () () () () "direct") uim> (and (create-context 0 #f 'direct) #t) 1 uim> (retrieve-im 'direct) (direct "*" "UTF-8" "Direct" "Pass through all user input without any modification" () #<CLOSURE (id im arg) (let-internal (dc) ((direct-context-new id im)) dc)> #<CLOSURE (dc) ()> #<CLOSURE (context mode) (let* ((mode-widget (context-find-mode-widget context)) (act-id (and mode-widget (widget-mode-value->action-id mode-widget mode)))) (and act-id (widget-activate! mode-widget act-id)))> #<CLOSURE (dc key state) (im-commit-raw dc)> #<CLOSURE (dc key state) (im-commit-raw dc)> #<CLOSURE (dc) ()> #<CLOSURE (dc idx) ()> #<CLOSURE (dc idx) ()> #<CLOSURE (context message) (let* ((widgets (context-widgets context)) (act-id (string->symbol message)) (activate! (lambda (widget) (let* ((actions (widget-actions widget)) (action (assq act-id actions)) (indicator (widget-indicator widget))) (or (widget-activate! widget action) (widget-activate! widget indicator)))))) (find activate! widgets))> "direct") Give me more debug information. Index: scm/lazy-load.scm =================================================================== --- scm/lazy-load.scm (revision 530) +++ scm/lazy-load.scm (working copy) @@ -46,6 +46,10 @@ (init-handler id im arg) (begin (error "stub IM actualization failed") + (print init-handler) + (print stub-im-init-handler) + (print im) + (print (map im-name im-list)) #f)))) context)))))) Use this patch. Index: lazy-load.scm =================================================================== --- lazy-load.scm (revision 523) +++ lazy-load.scm (working copy) @@ -45,6 +45,10 @@ stub-im-init-handler)) (init-handler id im arg) (begin + (print init-handler) + (print stub-im-init-handler) + (print im) + (print (map im-name im-list)) (error "stub IM actualization failed") #f)))) context)))))) --------------------------------------------------------------- debian% LIBUIM_VERBOSE=5 uim-pref-gtk 2>&1 | grep -10 ERROR (define direct-reset-handler (lambda (dc) ())) (define direct-get-candidate-handler (lambda (dc idx) ())) (define direct-set-candidate-index-handler (lambda (dc idx) ())) (direct-configure-widgets) (register-im (quote direct) "*" "UTF-8" (N_ "Direct") (N_ "Pass through all user input without any modification") () direct-init-handler direct-release-handler context-mode-handler direct-key-press-handler direct-key-release-handler direct- reset-handler direct-get-candidate-handler direct-set-candidate-index-handler co ntext-prop-activate-handler) done. #<CLOSURE (id fake-im fake-arg) (let-internal (stub-im) ((retrieve-im name)) (le t-internal (stub-im-init-handler) ((and stub-im (im-init-handler stub-im))) (and (require-module module-name) (let-internal (im) ((retrieve-im name)) (let-inter nal (init-handler) ((im-init-handler im)) (let-internal (arg) ((im-init-arg im)) (let-internal (context) ((if (not (eq? init-handler stub-im-init-handler)) (ini t-handler id im arg) (begin (print init-handler) (print stub-im-init-handler) (p rint im) (print (map im-name im-list)) (error "stub IM actualization failed") () ))) context)))))))> #<CLOSURE (id fake-im fake-arg) (let-internal (stub-im) ((retrieve-im name)) (le t-internal (stub-im-init-handler) ((and stub-im (im-init-handler stub-im))) (and (require-module module-name) (let-internal (im) ((retrieve-im name)) (let-inter nal (init-handler) ((im-init-handler im)) (let-internal (arg) ((im-init-arg im)) (let-internal (context) ((if (not (eq? init-handler stub-im-init-handler)) (ini t-handler id im arg) (begin (print init-handler) (print stub-im-init-handler) (p rint im) (print (map im-name im-list)) (error "stub IM actualization failed") () ))) context)))))))> (direct "*" "UTF-8" "Direct" "Pass through all user input without any modificati on" () #<CLOSURE (id fake-im fake-arg) (let-internal (stub-im) ((retrieve-im nam e)) (let-internal (stub-im-init-handler) ((and stub-im (im-init-handler stub-im) )) (and (require-module module-name) (let-internal (im) ((retrieve-im name)) (le t-internal (init-handler) ((im-init-handler im)) (let-internal (arg) ((im-init-a rg im)) (let-internal (context) ((if (not (eq? init-handler stub-im-init-handler )) (init-handler id im arg) (begin (print init-handler) (print stub-im-init-hand ler) (print im) (print (map im-name im-list)) (error "stub IM actualization fail ed") ()))) context)))))))> () () () () () () () () "direct") (direct latin ipa viqr romaja hangul3 hangul2 tutcode tcode skk prime anthy piny in-big5 pyunihan py) ERROR: stub IM actualization failed *backtrace* >>(error "stub IM actualization failed") at /usr/local/share/uim/lazy-load.scm:5 2 >>(if (not (eq? init-handler stub-im-init-handler)) (init-handler id im arg) (be gin (print init-handler) (print stub-im-init-handler) (print im) (print (map im- name im-list)) (error "stub IM actualization failed") ())) at /usr/local/share/u im/lazy-load.scm:44 >>(handler id im arg) at /usr/local/share/uim/im.scm:236 >>(create-context 0 (quote ()) (quote direct)) zsh: segmentation fault (core dumped) LIBUIM_VERBOSE=5 uim-pref-gtk 2>& 1 | zsh: done grep -10 ERROR Mmm... Once again. Index: scm/im.scm =================================================================== --- scm/im.scm (revision 534) +++ scm/im.scm (working copy) @@ -109,6 +109,10 @@ (lambda (name lang encoding name-label short-desc init-arg init release mode key-press key-release reset get-candidate set-candidate-index prop) + (puts (string-append "register-im has been invoked: im=" + (symbol->string (im-name args)) + "\n")) + (print (im-init-handler args)) (and (or (null? enabled-im-list) ;; bootstrap (memq name enabled-im-list)) (let ((im (im-new name lang encoding name-label short-desc Index: scm/lazy-load.scm =================================================================== --- scm/lazy-load.scm (revision 534) +++ scm/lazy-load.scm (working copy) @@ -45,6 +45,11 @@ stub-im-init-handler)) (init-handler id im arg) (begin + (print init-handler) + (print stub-im-init-handler) + (print im) + (print (map im-name im-list)) + (print enabled-im-list) (error "stub IM actualization failed") #f)))) context)))))) Oops, please ignore previous patch. Index: scm/im.scm =================================================================== --- scm/im.scm (revision 534) +++ scm/im.scm (working copy) @@ -109,6 +109,8 @@ (lambda (name lang encoding name-label short-desc init-arg init release mode key-press key-release reset get-candidate set-candidate-index prop) + (puts (string-append "register-im has been invoked: im=" name "\n")) + (print (im-init-handler args)) (and (or (null? enabled-im-list) ;; bootstrap (memq name enabled-im-list)) (let ((im (im-new name lang encoding name-label short-desc Index: scm/lazy-load.scm =================================================================== --- scm/lazy-load.scm (revision 534) +++ scm/lazy-load.scm (working copy) @@ -45,6 +45,11 @@ stub-im-init-handler)) (init-handler id im arg) (begin + (print init-handler) + (print stub-im-init-handler) + (print im) + (print (map im-name im-list)) + (print enabled-im-list) (error "stub IM actualization failed") #f)))) context)))))) + (puts (string-append "register-im has been invoked: im=" + (symbol->string name) + "\n")) Use following patch, The output result from im.scm seems to be written in loader.scm and installed-modules.scm. Anyway, I noticed that installed-modules.scm doesn't contain "direct" input method. Is this ok? Index: lazy-load.scm =================================================================== --- lazy-load.scm (revision 523) +++ lazy-load.scm (working copy) @@ -45,6 +45,11 @@ stub-im-init-handler)) (init-handler id im arg) (begin + (print init-handler) + (print stub-im-init-handler) + (print im) + (print (map im-name im-list)) + (print enabled-im-list) (error "stub IM actualization failed") #f)))) context)))))) ----------------------------------- debian% LIBUIM_VERBOSE=5 uim-pref-gtk 2>&1 | grep -10 ERROR (define direct-get-candidate-handler (lambda (dc idx) ())) (define direct-set-candidate-index-handler (lambda (dc idx) ())) (direct-configure-widgets) (register-im (quote direct) "*" "UTF-8" (N_ "Direct") (N_ "Pass through all user input without any modification") () direct-init-handler direct-release-handler context-mode-handler direct-key-press-handler direct-key-release-handler direct-reset-handler direct-get-candidate-handler direct-set-candidate-index-handler context-prop-activate-handler) done. #<CLOSURE (id fake-im fake-arg) (let-internal (stub-im) ((retrieve-im name)) (let-internal (stub-im-init-handler) ((and stub-im (im-init-handler stub-im))) (and (require-module module-name) (let-internal (im) ((retrieve-im name)) (let-internal (init-handler) ((im-init-handler im)) (let-internal (arg) ((im-init-arg im)) (let-internal (context) ((if (not (eq? init-handler stub-im-init-handler)) (init-handler id im arg) (begin (print init-handler) (print stub-im-init-handler) (print im) (print (map im-name im-list)) (print enabled-im-list) (error "stub IM actualization failed") ()))) context)))))))> #<CLOSURE (id fake-im fake-arg) (let-internal (stub-im) ((retrieve-im name)) (let-internal (stub-im-init-handler) ((and stub-im (im-init-handler stub-im))) (and (require-module module-name) (let-internal (im) ((retrieve-im name)) (let-internal (init-handler) ((im-init-handler im)) (let-internal (arg) ((im-init-arg im)) (let-internal (context) ((if (not (eq? init-handler stub-im-init-handler)) (init-handler id im arg) (begin (print init-handler) (print stub-im-init-handler) (print im) (print (map im-name im-list)) (print enabled-im-list) (error "stub IM actualization failed") ()))) context)))))))> (direct "*" "UTF-8" "Direct" "Pass through all user input without any modification" () #<CLOSURE (id fake-im fake-arg) (let-internal (stub-im) ((retrieve-im name)) (let-internal (stub-im-init-handler) ((and stub-im (im-init-handler stub-im))) (and (require-module module-name) (let-internal (im) ((retrieve-im name)) (let-internal (init-handler) ((im-init-handler im)) (let-internal (arg) ((im-init-arg im)) (let-internal (context) ((if (not (eq? init-handler stub-im-init-handler)) (init-handler id im arg) (begin (print init-handler) (print stub-im-init-handler) (print im) (print (map im-name im-list)) (print enabled-im-list) (error "stub IM actualization failed") ()))) context)))))))> () () () () () () () () "direct") (direct latin ipa viqr romaja hangul3 hangul2 tutcode tcode skk prime anthy pinyin-big5 pyunihan py) (py pyunihan pinyin-big5 anthy prime skk tcode tutcode hangul2 hangul3 romaja viqr ipa latin) ERROR: stub IM actualization failed *backtrace* >>(error "stub IM actualization failed") at /usr/local/share/uim/lazy-load.scm:53 >>(if (not (eq? init-handler stub-im-init-handler)) (init-handler id im arg) (begin (print init-handler) (print stub-im-init-handler) (print im) (print (map im-name im-list)) (print enabled-im-list) (error "stub IM actualization failed") ())) at /usr/local/share/uim/lazy-load.scm:44 >>(handler id im arg) at /usr/local/share/uim/im.scm:236 >>(create-context 0 (quote ()) (quote direct)) zsh: segmentation fault (core dumped) LIBUIM_VERBOSE=5 uim-pref-gtk 2>& 1 | zsh: done grep -10 ERROR Index: Makefile.am =================================================================== --- Makefile.am (revision 535) +++ Makefile.am (working copy) @@ -30,7 +30,8 @@ endif -module_names = "pyload" +module_names = "direct" +module_names += "pyload" if ANTHY module_names += "anthy" This patch solved the problem on my environment. If this is valid, please commit, Yamaken. I've found what caused the problem. load-modules of init.scm does not work as intended about enabled-im-list handling. Is your init.scm fresh enough? > The output result from im.scm seems to be written in loader.scm and > installed-modules.scm. Oops, use following patch. > Anyway, I noticed that installed-modules.scm doesn't contain "direct" > input method. Is this ok? OK. Don't add "direct" to installed-modules.scm. Give me information again without your patch to Makefile.am. Index: scm/im.scm =================================================================== --- scm/im.scm (revision 534) +++ scm/im.scm (working copy) @@ -109,6 +109,10 @@ (lambda (name lang encoding name-label short-desc init-arg init release mode key-press key-release reset get-candidate set-candidate-index prop) + (print (string-append "register-im has been invoked: im=" + (symbol->string name) + "\n")) + (print (im-init-handler args)) (and (or (null? enabled-im-list) ;; bootstrap (memq name enabled-im-list)) (let ((im (im-new name lang encoding name-label short-desc Index: scm/lazy-load.scm =================================================================== --- scm/lazy-load.scm (revision 534) +++ scm/lazy-load.scm (working copy) @@ -45,6 +45,13 @@ stub-im-init-handler)) (init-handler id im arg) (begin + (print "stub IM actualization failed") + (print load-modules) + (print init-handler) + (print stub-im-init-handler) + (print im) + (print (map im-name im-list)) + (print enabled-im-list) (error "stub IM actualization failed") #f)))) context)))))) $cd scm; svn diff shows nothing about the changes of init.scm I've found how to reproduce this bug. Please set default IM to "direct" inputmethod from uim-pref-gtk. If not reproduced, please reply. And previous patch also seems to write the output to loader.scm > I've found how to reproduce this bug. > Please set default IM to "direct" inputmethod from uim-pref-gtk. > If not reproduced, please reply. Reproduced and fixed. Thank you for cooperation. (In reply to comment #13) > $cd scm; svn diff > shows nothing about the changes of init.scm What I meant is whether the file is actually installed or not (although rare condition). > And previous patch also seems to write the output to loader.scm Put into loader.scm is intended behavior. But I had forgotten forming the closure as comment... Index: scm/im.scm =================================================================== --- scm/im.scm (revision 536) +++ scm/im.scm (working copy) @@ -109,8 +109,14 @@ (lambda (name lang encoding name-label short-desc init-arg init release mode key-press key-release reset get-candidate set-candidate-index prop) + (print (string-append "register-im has been invoked: im=" + (symbol->string name) + "\n")) + (puts ";; ") + (print init) (and (or (null? enabled-im-list) ;; bootstrap - (memq name enabled-im-list)) + (memq name enabled-im-list) + (eq? name 'direct)) ;; direct IM must always be enabled (let ((im (im-new name lang encoding name-label short-desc init-arg init release mode key-press key-release reset The fix has been committed as r540. Fixed, thank you!:-) |
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.