Subject: bug#63312: 29.0.90; set-frame-parameter sometimes called with dead frame when quitting ediff

From: Eli Zaretskii <[email-masked]>
Date: Fri, 05 May 2023 20:50:16 +0300

> Date: Fri, 5 May 2023 19:02:10 +0200
> From: Tobias Bading <[email-masked]>
> 
> 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!
> 

Can you set debug-on-error non-nil, and post the full Lisp backtrace
from the error?

Thanks.