unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Robert Marshall <robert.marshall@codethink.co.uk>
To: martin rudalics <rudalics@gmx.at>
Cc: 29661@debbugs.gnu.org
Subject: bug#29661: 27.0.50; emacs crashing on exchange-point-and-mark
Date: Wed, 13 Dec 2017 10:06:00 +0000	[thread overview]
Message-ID: <87d13j6iyf.fsf@ctlt579.codethink.co.uk> (raw)
In-Reply-To: <5A30E978.80708@gmx.at> (martin rudalics's message of "Wed, 13 Dec 2017 09:48:56 +0100")

martin rudalics <rudalics@gmx.at> writes:

>> Breakpoint 3, delete_frame (frame=<optimized out>, force=force@entry=XIL(0x98a0)) at frame.c:2062
>> 2062          FOR_EACH_FRAME (frames, frame1)
>> (gdb) p Vframe_list
>> $1 = XIL(0)
>> (gdb) c
>> Continuing.
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> delete_frame (frame=<optimized out>, force=force@entry=XIL(0x98a0)) at frame.c:2064
>> 2064              struct frame *f1 = XFRAME (frame1);
>
> Thanks.  The attached patch should fix that.  Please check.
>
> But I have no idea how to proceed with the x_reply_selection_request
> failure.
>
> martin
>
> diff --git a/src/frame.c b/src/frame.c
> index 5bafbed..66d1b5c 100644
> --- a/src/frame.c
> +++ b/src/frame.c
> @@ -2058,7 +2058,7 @@ of them (the selected terminal frame) is actually displayed.
>
>    /* If we've deleted the last_nonminibuf_frame, then try to find
>       another one.  */
> -  if (f == last_nonminibuf_frame)
> +  if (f == last_nonminibuf_frame && !NILP (Vframe_list))
>      {
>        last_nonminibuf_frame = 0;
>
> @@ -2076,7 +2076,7 @@ of them (the selected terminal frame) is actually displayed.
>
>    /* If there's no other frame on the same kboard, get out of
>       single-kboard state if we're in it for this kboard.  */
> -  if (kb != NULL)
> +  if (kb != NULL && !NILP (Vframe_list))
>      {
>        /* Some frame we found on the same kboard, or nil if there are none.  */
>        Lisp_Object frame_on_same_kboard = Qnil;
> @@ -2093,7 +2093,9 @@ of them (the selected terminal frame) is actually displayed.
>    /* If we've deleted this keyboard's default_minibuffer_frame, try to
>       find another one.  Prefer minibuffer-only frames, but also notice
>       frames with other windows.  */
> -  if (kb != NULL && EQ (frame, KVAR (kb, Vdefault_minibuffer_frame)))
> +  if (kb != NULL
> +      && EQ (frame, KVAR (kb, Vdefault_minibuffer_frame))
> +      && !NILP (Vframe_list))
>      {
>        /* The last frame we saw with a minibuffer, minibuffer-only or not.  */
>        Lisp_Object frame_with_minibuf = Qnil;

Thanks, it now no longer crashes there, but crashes elsewhere but looks
to about to terminate in a more controlled manner?

#1  check_glyph_memory () at dispnew.c:2264
        tail = XIL(0)
#2  0x00000000004ecead in shut_down_emacs (sig=sig@entry=0, stuff=stuff@entry=XIL(0)) at emacs.c:2107
No locals.
#3  0x00000000004bbdeb in x_connection_closed (dpy=dpy@entry=0x15e5800, error_message=<optimized out>, 
    error_message@entry=0x7fffffffcda0 "Connection lost to X server ':0'", ioerror=ioerror@entry=true) at xterm.c:9806
        tail = <optimized out>
#4  0x00000000004bbe96 in x_io_error_quitter (display=0x15e5800) at xterm.c:9915
        buf = "Connection lost to X server ':0'\000\315\377\377\377\177\000\000 \316\377\377\377\177\000\000\000X^\001\000\000\000\000\276-q\364\377\177\000\000Pj^\001\000\000\000\000\001\000\000\000\000\000\000\000\360\274^\001\000\000\000\000\240\330\240\364\377\177\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\300{\355\000\000\000\000\000\363\000@\005\000\000\000\000\000X^\001\000\000\000\000\367\237\336\367\377\177\000\000\005", '\000' <repeats 15 times>, "\340\177\373\000\000\000\000\000\000}m\364\377\177\000\000\000X^\001\000\000\000\000\000X^\001\000\000\000\000t\031@\002\000\000\000\000\025"...
#5  0x00007ffff47154fe in _XIOError () from /usr/lib/x86_64-linux-gnu/libX11.so.6
No symbol table info available.
#6  0x00007ffff4712e5d in _XEventsQueued () from /usr/lib/x86_64-linux-gnu/libX11.so.6
No symbol table info available.
#7  0x00007ffff46f465a in XFlush () from /usr/lib/x86_64-linux-gnu/libX11.so.6
No symbol table info available.
#8  0x00000000004d734c in x_reply_selection_request (dpyinfo=<optimized out>, event=<optimized out>) at xselect.c:694
        reply_base = {
          type = 31, 
          xany = {
            type = 31, 
            serial = 16882611, 
            send_event = 2, 
            display = 0x15e5800, 
            window = 88080627
          }, 
          xkey = {
            type = 31, 
            serial = 16882611, 
            send_event = 2, 
            display = 0x15e5800, 
            window = 88080627, 
            root = 1, 
            subwindow = 324, 
            time = 401, 
            x = 162228637, 
            y = 0, 
            x_root = 0, 
            y_root = 500000, 
            state = 0, 
etc 

I can reliably replicate this error by opening this large file,
searching for a string that only appears on the last line and
exchange-point-and-mark'ing

Robert





  reply	other threads:[~2017-12-13 10:06 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-11 15:22 bug#29661: 27.0.50; emacs crashing on exchange-point-and-mark Robert Marshall
2017-12-12  8:56 ` martin rudalics
2017-12-12  9:49   ` Robert Marshall
2017-12-12 10:28     ` martin rudalics
2017-12-12 10:55       ` Robert Marshall
2017-12-13  8:48         ` martin rudalics
2017-12-13 10:06           ` Robert Marshall [this message]
2017-12-13 14:01             ` Robert Marshall
2017-12-13 19:29               ` martin rudalics
2017-12-14  8:35                 ` Robert Marshall
2017-12-14 17:10                   ` Eli Zaretskii
2017-12-15  8:49                     ` martin rudalics
2017-12-15  9:24                     ` Robert Marshall
2017-12-15 10:39                       ` Eli Zaretskii
2017-12-15 10:58                         ` Robert Marshall
2017-12-15 11:11                           ` Eli Zaretskii
2017-12-15 13:00                             ` Robert Marshall
2017-12-22 10:07                               ` Eli Zaretskii
2017-12-22 14:04                                 ` Robert Marshall
2018-01-01 10:01                               ` Robert Marshall
2018-01-01 16:30                                 ` Eli Zaretskii
2018-01-01 19:11                                   ` Robert Marshall
2018-01-01 20:03                                     ` Eli Zaretskii
2017-12-13 19:29             ` martin rudalics
     [not found]               ` <87k1xp64uf.fsf@ctlt579.codethink.co.uk>
2017-12-15  8:49                 ` martin rudalics

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=87d13j6iyf.fsf@ctlt579.codethink.co.uk \
    --to=robert.marshall@codethink.co.uk \
    --cc=29661@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    /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).