Subject: bug#29726: 25.1; SIGSEGV in find-file

From: Eli Zaretskii <[email-masked]>
Date: Sat, 23 Dec 2017 14:07:56 +0200

> Date: Sun, 17 Dec 2017 19:23:32 +0200
> From: Eli Zaretskii <[email-masked]>
> Cc: [email-masked]
> 
> OK, I've succeeded in reproducing the crash.  The immediate reason is
> clear, but I need to look a bit deeper to understand how did that
> reason come into existence.  Stay tuned.

The reason for the crash is that the ':eval' form which you have on
the header-line can delete the frame whose header-line Emacs is
redrawing!  The Lisp-level backtrace below shows how delete-frame is
called from your code; hopefully, this backtrace will allow you to fix
your code so it doesn't do such nonsensical things.

I installed a protection against such calamities in the emacs-26
branch, which displays a backtrace with an error message instead of
crashing.  If you can build the Emacs's emacs-26 release branch,
please do and see that the crashes are gone.

Here's the backtrace I promised:

  "delete-frame" (0x824d00)
  "if" (0x824f28)
  0x6ecf880 Lisp type 6
  "mapc" (0x825280)
  "progn" (0x825468)
  "if" (0x825608)
  "save-current-buffer" (0x8257e8)
  "let" (0x825a68)
  "k-frame::kill-buffer" (0x825cc0)
  "kill-buffer" (0x825e40)
  "and" (0x826028)
  "unwind-protect" (0x826308)
  "save-current-buffer" (0x8264e8)
  "let" (0x826758)
  "k-tabbar::element-to-wrap" (0x8268c0)
  "let" (0x826cb8)
  "k-tabbar::tabbar-add-scroll" (0x826e20)
  "let" (0x827238)
  "k-tabbar::tabbar-line" (0x8274c8)
  "apply" (0x8274c0)
  "set-window-parameter" (0x827708)
  "or" (0x8278a8)
  "k-tabbar::window-cache-get" (0x827b38)
  "apply" (0x827b30)
  "k-tabbar::cache-get" (0x827d80)
  "k-tabbar::generate-tabbar-line" (0x828090)
  "eval" (0x828478)
  "redisplay_internal (C function)" (0x0)
  "read-from-minibuffer" (0x82c8b0)
  "completing-read-default" (0x82cdc0)
  0x1386fc0 PVEC_SUBR
  "apply" (0x82d070)
  "k::completing-read-adv-fn" (0x82d318)
  "apply" (0x82d558)
  "completing-read" (0x82da30)
  "read-file-name-default" (0x82e0b0)
  "read-file-name" (0x82e550)
  "find-file-read-args" (0x82e9c0)
  "byte-code" (0x82edf0)
  "call-interactively" (0x82f230)
  "command-execute" (0x82f748)