From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <838re1hk45.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31783"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63312@debbugs.gnu.org To: Tobias Bading Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 06 11:42:23 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pvEQp-00085x-9Z for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 May 2023 11:42:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pvEQc-0000tc-4Y; Sat, 06 May 2023 05:42:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pvEQa-0000tP-MO for bug-gnu-emacs@gnu.org; Sat, 06 May 2023 05:42:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pvEQT-0006oZ-PW for bug-gnu-emacs@gnu.org; Sat, 06 May 2023 05:42:08 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pvEQT-0007ef-Iv for bug-gnu-emacs@gnu.org; Sat, 06 May 2023 05:42:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 May 2023 09:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63312 X-GNU-PR-Package: emacs Original-Received: via spool by 63312-submit@debbugs.gnu.org id=B63312.168336607729369 (code B ref 63312); Sat, 06 May 2023 09:42:01 +0000 Original-Received: (at 63312) by debbugs.gnu.org; 6 May 2023 09:41:17 +0000 Original-Received: from localhost ([127.0.0.1]:59437 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvEPk-0007dd-FW for submit@debbugs.gnu.org; Sat, 06 May 2023 05:41:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60808) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvEPg-0007dM-6W for 63312@debbugs.gnu.org; Sat, 06 May 2023 05:41:15 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pvEPa-0006aI-Vs; Sat, 06 May 2023 05:41:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=xXH6ZUXJNZZjN99KqYlQ6X5j84XB7hJQwC6XL7Vq3hw=; b=V+qbfpNyEBIz6hgmKHci ZYP18ffL8GFCzTR/+1Og6Qt5CINY7NolmoTNpSqNilMVZg8WWdiGkKSGZlo7LRH5McKJEC0L2rEAv DmOId3qhw/KC5AyyqzFFgEyymEANaGpMnRjFZmLBzeUA5vKcBIWpGnJraJU8MTa4zx/A6v6v+McQQ dbuKJ6tG0p3a2Vloqa/zVyXvfpjrJq0kjScfjPyFdx/qQDLX/Lv9iK0ZO2DFrYWsWgIKXk5iMJsHl Pp558jrXYRthD3yR4eh2HmJpXHACja80iFdL8uU44QRy2rzqcS1Z4971dSMt2fY+UZ/MuwjV+tVUn K58ZvUEbX9NbBA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pvEPa-0002Lv-Fb; Sat, 06 May 2023 05:41:06 -0400 In-Reply-To: (message from Tobias Bading on Fri, 5 May 2023 19:02:10 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:261172 Archived-At: > Date: Fri, 5 May 2023 19:02:10 +0200 > From: Tobias Bading > > 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, # > > 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 (#))) > | 2 -> (x-dnd-after-move-frame #) > | | 3 -> (set-frame-parameter # 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)