[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: endless loop in w3m-process-with-wait-handler
>>>>> In [emacs-w3m : No.02318]
>>>>> TSUCHIYA Masatoshi <tsuchiya@pine.kuee.kyoto-u.ac.jp> wrote:
土> これでも固まってしまう場合は、かなり真面目に考えてデバッグしないといけ
土> ないと思うので、環境と状況の報告お願いします。
XEmacs-21.4.5 で画像の多いページで `w3m-toggle-inline-images'
を実行し、カーソルを動かすと返ってきません。(C-g は効きます)
;; カーソルを動かしたりしなければ、問題ありません…。
w3m のプロセスは、Linux では zombie となっていました。
また、Solaris では w3m のプロセスは動いていませんでした。
debug-on-quit をしかけて C-g で止めると、以下のようになりました。
Signaling: (quit)
(eq (process-status --process--5637) (quote run))
(while (eq (process-status --process--5637) (quote run)) (sit-for 0.2) (and w3m-process-timeout (< w3m-process-timeout ...) (progn ... ... ...)))
(let ((w3m-current-process --process--5637) w3m-process-inhibit-quit inhibit-quit) (w3m-process-start-process --process--5637) (setq --process--5637 (aref ... 2)) (while (eq ... ...) (sit-for 0.2) (and w3m-process-timeout ... ...)) (setq --start--5639 0) (while (and ... ...) (sit-for 0.2) (setq --start--5639 ...)) (if (eq ... ...) (signal ... nil)) (symbol-value ----result--5638--5640))
(if (w3m-process-p (setq --process--5637 ...)) (let (... w3m-process-inhibit-quit inhibit-quit) (w3m-process-start-process --process--5637) (setq --process--5637 ...) (while ... ... ...) (setq --start--5639 0) (while ... ... ...) (if ... ...) (symbol-value ----result--5638--5640)) --process--5637)
(let ((--process--5637) (--start--5639 ...) (handler ...)) (if (w3m-process-p ...) (let ... ... ... ... ... ... ... ...) --process--5637))
(let ((----result--5638--5640 ...)) (setf (symbol-value ----result--5638--5640) (quote --result--5638)) (let (... ... ...) (if ... ... --process--5637)))
(lexical-let ((--result--5638 ...)) (let (... ... ...) (if ... ... --process--5637)))
(w3m-process-with-wait-handler (w3m-retrieve url no-decode no-cache post-data referer handler))
(condition-case nil (w3m-process-with-wait-handler (w3m-retrieve url no-decode no-cache post-data referer handler)) (w3m-process-error nil))
(if (not handler) (condition-case nil (w3m-process-with-wait-handler ...) (w3m-process-error nil)) (unless (and w3m-safe-url-regexp ...) (when ... ...) (set-buffer-multibyte nil) (cond ... ... ... ...)))
w3m-retrieve("http://localhost/ari/tmp/c/2426.png" raw nil nil "http://localhost/ari/tmp/c/")
(condition-case err (w3m-retrieve url (quote raw) no-cache nil referer) (error (message "While retrieving %s: %s" url err) nil))
(save-current-buffer (set-buffer --temp-buffer--5622) (condition-case err (w3m-retrieve url ... no-cache nil referer) (error ... nil)))
(let ((handler ...)) (save-current-buffer (set-buffer --temp-buffer--5622) (condition-case err ... ...)))
(let ((type ...)) (if (w3m-process-p type) (if --this-handler--5621 type ...) (if ... ... type)))
(progn (progn (set --G5624--5625 ...) (set --G5623--5626 ...)) (let (...) (if ... ... ...)))
(let ((--G5624--5625 ...) (--G5623--5626 ...)) (progn (set --G5624--5625 nil) (set --G5623--5626 nil)) (progn (progn ... ...) (let ... ...)))
(labels ((post-body ... ...) (post-handler ... ...)) (let (...) (if ... ... ...)))
(let ((--this-handler--5621 handler) (--temp-buffer--5622 ...)) (labels (... ...) (let ... ...)))
(w3m-process-do-with-temp-buffer (type (condition-case err ... ...)) (when (w3m-image-type-available-p ...) (let ... ...)))
(if (not handler) (w3m-process-with-wait-handler (w3m-create-image url no-cache referer handler)) (w3m-process-do-with-temp-buffer (type ...) (when ... ...)))
w3m-create-image("http://localhost/ari/tmp/c/2426.png" nil "http://localhost/ari/tmp/c/" (lambda (image) ((lambda ... "\nCommon Lisp lambda list:\n (cl-none IMAGE HANDLER)\n\n" ...) image #<subr identity>)))
(let ((w3m-current-buffer ...)) (w3m-create-image iurl no-cache w3m-current-url handler))
(let ((handler ...)) (let (...) (w3m-create-image iurl no-cache w3m-current-url handler)))
(let ((image ...)) (if (w3m-process-p image) (if --this-handler--5592 image ...) (if ... ... image)))
(progn (progn (set --G5594--5595 ...) (set --G5593--5596 ...)) (let (...) (if ... ... ...)))
(let ((--G5594--5595 ...) (--G5593--5596 ...)) (progn (set --G5594--5595 nil) (set --G5593--5596 nil)) (progn (progn ... ...) (let ... ...)))
(let ((--this-handler--5592 handler)) (let (... ...) (progn ... ...) (progn ... ...)))
(let ((--start--5589 ...) (--end--5590 ...) (--url--5591 ...)) (setf (symbol-value --start--5589) (set-marker ... point) (symbol-value --end--5590) (set-marker ... end) (symbol-value --url--5591) w3m-current-url) (let (...) (let ... ... ...)))
(lexical-let ((start ...) (end ...) (url w3m-current-url)) (w3m-process-do (image ...) (when ... ... ... ...)))
(let ((handler ...)) (lexical-let (... ... ...) (w3m-process-do ... ...)) (w3m-process-start-queued-processes))
(w3m-process-with-null-handler (lexical-let (... ... ...) (w3m-process-do ... ...)))
(if iurl (w3m-process-with-null-handler (lexical-let ... ...)))
(when iurl (w3m-process-with-null-handler (lexical-let ... ...)))
(save-excursion (goto-char cur-point) (when iurl (w3m-process-with-null-handler ...)))
(if (get-text-property point (quote w3m-image-redundant)) (progn (setq image ...) (w3m-add-text-properties point end ...) (setq point ...) (insert image) (w3m-add-text-properties point ... ...)) (save-excursion (goto-char cur-point) (when iurl ...)))
(progn (if (get-text-property point ...) (progn ... ... ... ... ...) (save-excursion ... ...)) (w3m-add-text-properties beg end (quote ...)))
(if (and (or ... ...) (not ...)) (progn (if ... ... ...) (w3m-add-text-properties beg end ...)))
(when (and (or ... ...) (not ...)) (if (get-text-property point ...) (progn ... ... ... ... ...) (save-excursion ... ...)) (w3m-add-text-properties beg end (quote ...)))
(while (if (get-text-property ... ...) (setq point ...) (setq point ...)) (setq beg point end (or ... ...)) (goto-char end) (setq iurl (w3m-image point)) (when (and ... ...) (if ... ... ...) (w3m-add-text-properties beg end ...)))
(save-excursion (goto-char (point-min)) (while (if ... ... ...) (setq beg point end ...) (goto-char end) (setq iurl ...) (when ... ... ...)))
(if (equal status (quote off)) (save-excursion (goto-char ...) (while ... ... ... ... ...)) (save-excursion (goto-char ...) (while ... ... ... ... ...)))
(let ((cur-point ...) (buffer-read-only) point beg end iurl image) (if (equal status ...) (save-excursion ... ...) (save-excursion ... ...)))
w3m-toggle-inline-images-internal(off nil nil)
(unwind-protect (w3m-toggle-inline-images-internal (if w3m-display-inline-images ... ...) no-cache nil) (unless (setq w3m-display-inline-images ...) (w3m-process-stop ...)) (set-buffer-modified-p nil) (force-mode-line-update))
(let ((status w3m-display-inline-images)) (unless (w3m-display-graphic-p) (error "Can't display images in this environment")) (if force (setq w3m-display-inline-images nil status nil)) (unwind-protect (w3m-toggle-inline-images-internal ... no-cache nil) (unless ... ...) (set-buffer-modified-p nil) (force-mode-line-update)))
w3m-toggle-inline-images(nil)
call-interactively(w3m-toggle-inline-images)
サンプルは http://www.nijino.com/ari/tmp/c/ に置いてます。
;; w3m-proc.el を眺めてみたけど、サッパリ(^^;
--
有沢 明宏