GNU bug report logs -
#63312
29.0.90; set-frame-parameter sometimes called with dead frame when quitting ediff
Previous Next
Reported by: Tobias Bading <tbading <at> web.de>
Date: Fri, 5 May 2023 17:03:01 UTC
Severity: normal
Found in version 29.0.90
Done: Po Lu <luangruo <at> yahoo.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Date: Fri, 5 May 2023 19:02:10 +0200
> From: Tobias Bading <tbading <at> web.de>
>
> 1. emacs -Q
>
> 2. Open a file under version control, e.g. lisp/vc/ediff-util.el
>
> 3. Selecting some text with the mouse seems to increase the chance of the
> error occurring, maybe even select some text in another application
>
> 4. M-x ediff-revision RET RET RET RET
>
> 5. q RET
>
> Sometimes this results in error
>
> set-frame-parameter: Wrong type argument: frame-live-p, #<dead frame Ediff 0x560ee1b46200>
>
> With
>
> (trace-function-background 'set-frame-parameter)
> (trace-function-background 'x-dnd-after-move-frame)
> (trace-function-background 'handle-move-frame)
>
> prior to quitting ediff, the error is logged as
>
> 1 -> (handle-move-frame (move-frame (#<dead frame Ediff 0x5643a7425888>)))
> | 2 -> (x-dnd-after-move-frame #<dead frame Ediff 0x5643a7425888>)
> | | 3 -> (set-frame-parameter #<dead frame Ediff 0x5643a7425888> dnd-root-window-position nil)
> | | 3 <- set-frame-parameter: !non-local\ exit!
> | 2 <- x-dnd-after-move-frame: !non-local\ exit!
> 1 <- handle-move-frame: !non-local\ exit!
Does the patch below give good results?
diff --git a/lisp/x-dnd.el b/lisp/x-dnd.el
index 9286a18..acfbbed 100644
--- a/lisp/x-dnd.el
+++ b/lisp/x-dnd.el
@@ -609,8 +609,9 @@ x-dnd-init-xdnd-for-frame
(defun x-dnd-after-move-frame (frame)
"Handle FRAME moving to a different position.
Clear any cached root window position."
- (set-frame-parameter frame 'dnd-root-window-position
- nil))
+ (and (frame-live-p frame)
+ (set-frame-parameter frame 'dnd-root-window-position
+ nil)))
(add-hook 'move-frame-functions #'x-dnd-after-move-frame)
This bug report was last modified 2 years and 72 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.