From: Eli Zaretskii <eliz@gnu.org>
To: Tobias Bading <tbading@web.de>
Cc: 63312@debbugs.gnu.org
Subject: bug#63312: 29.0.90; set-frame-parameter sometimes called with dead frame when quitting ediff
Date: Sat, 06 May 2023 12:42:02 +0300 [thread overview]
Message-ID: <838re1hk45.fsf@gnu.org> (raw)
In-Reply-To: <d7ada88d-8eca-b6ce-8874-6d6ccfe5a866@web.de> (message from Tobias Bading on Fri, 5 May 2023 19:02:10 +0200)
> Date: Fri, 5 May 2023 19:02:10 +0200
> From: Tobias Bading <tbading@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)
next prev parent reply other threads:[~2023-05-06 9:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-05 17:02 bug#63312: 29.0.90; set-frame-parameter sometimes called with dead frame when quitting ediff Tobias Bading
2023-05-05 17:50 ` Eli Zaretskii
2023-05-06 7:27 ` Tobias Bading
2023-05-06 9:42 ` Eli Zaretskii [this message]
2023-05-06 10:10 ` Tobias Bading
2023-05-06 10:34 ` Eli Zaretskii
2023-05-06 11:12 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-06 11:17 ` Eli Zaretskii
2023-05-06 12:01 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=838re1hk45.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=63312@debbugs.gnu.org \
--cc=tbading@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).