Subject: bug#21428: 24.5; Crash of emacs on OS X, installed via homebrew cask

From: Eli Zaretskii <[email-masked]>
Date: Wed, 30 Sep 2015 21:49:07 +0300

> From: Rainer M Krug <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Wed, 30 Sep 2015 12:36:40 +0200
> 
> > I guess we are down to using the brute-force approach after all.  I
> > will prepare a series of GDB commands that you need to invoke before
> > running a new Emacs session under GDB.  The output will be recorded in
> > a file, which I will ask you to send me for analysis when a crash
> > happens.
> 
> OK - no problem.
> 
> >
> > To prepare those GDB commands, I need to know how many different
> > frames you are normally using.  If only one, the job of preparing
> > those commands is easier.
> 
> Now we have luck: very seldom more than one, and the crashes occured all
> with only one frame used during the whole session.

OK.  Here are the GDB commands you need to type after entering GDB and
before running Emacs:

  set logging on
  break xfaces.c:4189
  commands
  bt
  continue
  end
  break xfaces.c:4310
  commands
  bt
  p c->used+1
  continue
  end
  break xfaces.c:4334
  commands
  bt
  p c->used-1
  continue
  end

Please verify that the 2 line numbers are correct for the version of
xfaces.c that you have: these are the lines that increment, decrement,
and zero out the 'used' count of the frame's face cache.

It is better to put those commands on a file, so that you could only
type "source that-file" instead of the whole sequence.

Then type "run" to run Emacs as usual (no need to set the inhibit-*
variables).  When the crash happens, type the commands to display the
backtrace, the face cache's 'used' count, and the "pgrow" command.
Then type this command:

  set logging off

and send me the file gdb.txt which GDB created during that session.
It will probably a very large file, so please compress it.  Don't exit
the GDB session, because I might need you to tell me values of some
variables.

Let's hope the stuff you collect will point to the problem's cause.

Thanks.