Subject: bug#16674: 24.3.50; crash: redisplay_internal, update_frame, using client-daemon in tmux

From: Mark Oteiza <[email-masked]>
Date: Sat, 26 Jul 2014 12:23:12 -0400

Eli Zaretskii <[email-masked]> writes:

>> From: Mark Oteiza <[email-masked]>
>> Date: Sun, 09 Feb 2014 02:39:09 -0500
>> 
>> I found 0cd28af (references Bug#15025).
>
> Dmitry, this is bzr revision 113891.  Perhaps the new code in
> delete_frame should include a few more tests from candidate_frame?
> (That's just a wild guess, though: I don't really understand what does
> tmux do to Emacs -- are we selecting a frame that is no longer
> displayed or something?)

New recipe for crash (guided by Eli's comment on #18112):

Open a terminal emulator (TE) window.  In that window:

  emacs --daemon -Q
  emacsclient -t
  C-x 2

In another TE window,

  emacsclient -t
  C-x C-c

Go back to the first TE.  Widen it, and shorten it so that the top
buffer is no longer visible.  Send input -- now emacs should have crashed.

For the record, here is the original recipe I had found for the crash:

1. emacs --daemon -Q
2. Split vertically the tmux window into two panes: <prefix> %
3. Start a client in one of the tmux panes: emacsclient -t
4. C-x 2
5. Break out the tmux pane containing the client to a new window:
   <prefix>-!
6. Split vertically the tmux window into two panes: <prefix> %
7. Open a new client.
8. Exit the new client.
9. Close the new tmux pane (^D).  Now the first client occupies half
    the tmux window and is unfocused
10. Shrink the terminal emulator.  Things should look bad now.
11. Send input to the client.