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

From: Eli Zaretskii <[email-masked]>
Date: Sat, 16 Dec 2017 11:35:22 +0200

> From: Marc Munro <[email-masked]>
> Date: Fri, 15 Dec 2017 13:48:18 -0800
> 
> emacs crashes when I attempt to do a find-file with completion.
> 
> [I am writing some quite intrusive emacs-lisp that hacks things like
> display-buffer and creates a pretty sophisticated tabbar.  I haven't
> figured out which of my extensive collection of elisp hacks are
> implicated.  I include a gziped file of my .emacs and the appropriate
> emacs directories.  Let me know if I can help you track this down.]
> 
> To reproduce (the directories and files necessary are attached):
> 
> $ cd emacs/k
> $ emacs k-frame.el
> 
> F2 (find-file)
> k-<TAB> (completions frame opens)
> [navigate back to open minibufer]
> s<TAB>e<TAB> (kaboom!)

I cannot reproduce the crash, but this could be because the above
recipe or the files you sent are incomplete.  First, I've found that
one needs to set HOME to the directory created by unpacking the
archive you sent, because your .emacs file is there.  One also needs
to modify the load-path settings in your .emacs to be consistent with
where the files were unpacked.  Then one needs to install tabbar-mode,
and add (require 'tabbar) to your k-tabbar.el, otherwise Emacs fails
at startup because tabbar-mode is not a known symbol.  After that, I
still have problems reproducing the recipe, because typing

  F2
  k-<TAB>

doesn't pop up a completions frame, but instead shows this in the
mininbufer:

  DISPLAY BUFFER ACTOR *Backtrace* nil

Maybe some other file/package is missing?  And what version of
tabbar-mode do you have, downloaded from where?

Would it be possible for you to prepare a clean archive with only the
files that are required, or, better, an explicit recipe starting from
"emacs -Q"?  Doing that will ensure this bug is identified and fixed
much faster.  If that's not something you can afford, please at least
provide an archive with all the required files and settings.

> (gdb) bt full
> #0  0x00000000004bfe64 in face_at_string_position (w=<optimized out>, string=39440100, pos=<optimized out>, bufpos=bufpos@entry=0, endptr=endptr@entry=0x7fff7a7aeea0, base_face_id=HEADER_LINE_FACE_ID, mouse_p=false) at xfaces.c:6096
>         prop = 39596355
>         end = <optimized out>
>         attrs = {10, 5989993, 140735248264880, 2, 0, 0, 10, 39440100, 0, 140735248264880, 140735248264888, 6012141, 39632451, 140735248264896, 39265896, 140735248266064, 0, 0, 0}
>         base_face = <optimized out>
>         prop_name = 20256

Due to an optimized build, this backtrace is not very helpful, as lots
of relevant variables are "optimized out".

Thanks.