From: Alan Mackenzie <acm@muc.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 44502@debbugs.gnu.org, acm@muc.de,
Andy Moreton <andrewjmoreton@gmail.com>
Subject: bug#44502: 28.0.50; Emacs crash using new frame
Date: Sun, 8 Nov 2020 13:37:21 +0000 [thread overview]
Message-ID: <20201108133721.GA18190@ACM> (raw)
In-Reply-To: <83blg96z40.fsf@gnu.org>
Hello, Eli and Andy.
On Sat, Nov 07, 2020 at 16:05:51 +0200, Eli Zaretskii wrote:
> > From: Andy Moreton <andrewjmoreton@gmail.com>
> > Date: Sat, 7 Nov 2020 13:27:30 +0000
> > Emacs crashed when using a new frame. After a bootstrap of master, I
> > could repeat the crash witht he following recipe:
> > - Run "emacs -Q"
> > - Type "C-x 5 2 RET" to create a new frame (which becomes selected)
> > - Type "C-x C-f" and emacs crashes
> > I bisected this using the recipe above, with:
> > git checkout master
> > git bisect start
> > git bisect bad
> > git bisect good c3a20804a8
> > Bisect reports the bad commit as:
> > 2ecbf4cfae Allow minibuffer to stay in its original frame.
> > (2020-11-05 Alan Mackenzie)
> Thanks. Yes, the above recipe causes an assertion violation. Alan,
> can you take a look, please?
Thanks for the backtrace, which was helpful. I've committed the
following patch, which appears to fix the bug:
commit cfe8a73cab5e7a9c6a6fcc212bd9df980f233895 (HEAD -> master,
origin/master, origin/HEAD)
Author: Alan Mackenzie <acm@muc.de>
Date: Sun Nov 8 13:28:55 2020 +0000
Don't set the selected window to the miniwindow on a frame change.
Intended to fix bug #44502.
* src/minibuf.c (move_minibuffer_onto_frame): Remove the lines of code which
set the selected window to the minibuffer.
diff --git a/src/minibuf.c b/src/minibuf.c
index 068086ead8..8c19559b08 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -142,10 +142,6 @@ void move_minibuffer_onto_frame (void)
set_window_buffer (sf->minibuffer_window, buffer, 0, 0);
minibuf_window = sf->minibuffer_window;
- if (EQ (XWINDOW (minibuf_window)->frame, selected_frame))
- /* The minibuffer might be on another frame. */
- Fset_frame_selected_window (selected_frame, sf->minibuffer_window,
- Qnil);
set_window_buffer (of->minibuffer_window, get_minibuffer (0), 0, 0);
}
}
> Here's a backtrace from an unoptimized build:
> window.c:554: Emacs fatal error: assertion failed: EQ (window, selected_window)
> Thread 1 hit Breakpoint 1, terminate_due_to_signal (sig=22,
> backtrace_limit=2147483647) at emacs.c:378
> 378 signal (sig, SIG_DFL);
[ .... ]
> Lisp Backtrace:
> "redisplay_internal (C function)" (0x0)
> "read-from-minibuffer" (0x82c8a0)
> "completing-read-default" (0x82cf00)
> "completing-read" (0x82d210)
> "read-file-name-default" (0x82d9c0)
> "read-file-name" (0x82dfa0)
> "find-file-read-args" (0x82e560)
> "byte-code" (0x82ea18)
> "call-interactively" (0x82ef80)
> "command-execute" (0x82f5c8)
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2020-11-08 13:37 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-07 13:27 bug#44502: 28.0.50; Emacs crash using new frame Andy Moreton
2020-11-07 13:51 ` Andy Moreton
2020-11-07 14:05 ` Eli Zaretskii
2020-11-08 13:37 ` Alan Mackenzie [this message]
2020-11-08 15:15 ` Eli Zaretskii
2020-11-08 15:36 ` Andy Moreton
2021-09-08 9:52 ` Lars Ingebrigtsen
2022-08-10 13:26 ` bug#44502: andrei.elkin--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-10 15:49 ` bug#44502: Eli Zaretskii
2022-08-11 18:19 ` bug#44502: andrei.elkin--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-11 18:41 ` bug#44502: Eli Zaretskii
2022-08-11 19:10 ` bug#44502: andrei.elkin--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-12 6:27 ` bug#44502: Eli Zaretskii
2022-08-12 8:34 ` bug#44502: Alan Mackenzie
2022-08-12 10:24 ` bug#44502: andrei.elkin--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-14 14:30 ` bug#44502: Alan Mackenzie
2022-08-19 10:45 ` bug#44502: Eli Zaretskii
2022-08-19 13:05 ` bug#44502: Alan Mackenzie
2022-08-19 13:20 ` bug#44502: Eli Zaretskii
2022-08-19 15:12 ` bug#44502: Alan Mackenzie
2022-08-19 16:10 ` bug#44502: andrei.elkin--- 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201108133721.GA18190@ACM \
--to=acm@muc.de \
--cc=44502@debbugs.gnu.org \
--cc=andrewjmoreton@gmail.com \
--cc=eliz@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.