Hello Eli, Thank you. I had to set first the breakpoint, as GDB prompt would not come back if I run emacs. OK, here it is attached. On Thu, Jul 27, 2017 at 08:18:00PM +0300, Eli Zaretskii wrote: > > Date: Thu, 27 Jul 2017 10:38:27 +0300 > > From: Jean Louis > > Cc: 27816@debbugs.gnu.org > > > > I am starting Emacs through screen, without X windows. So I started as: > > > > gdb screen > > > > then I do: > > > > breakpoint x_error_quitter > > > > It asks me for future loaded libraries, I said y. > > > > Then I "run" and get screen and bash. > > > > Then I start emacs as > > > > emacs --user admin --chdir /home/data1/protected (that is my home dir) > > No, I think this is a mistake. You should first start screen, then > start GDB from that like this: > > gdb emacs > > Then when GDB shows its prompt, type > > (gdb) break x_error_quitter > (gdb) run --user admin --chdir /home/data1/protected > > (The "(gdb)" part is the GDB prompt, you don't need to type it.) > And then continue as you usually would: > > > And then I connect to emacs as emacsclient > > > > and evaluate (x-synchronize t) > > > > and then if I connect each 4th or 5th time, not clearly known why, > > then I get that bug, and X frame of new emacsclient is not appearing. > > > > But back in debugger I do not see much, emacs as server is still > > running. > > If you start Emacs as above, you should see GDB take control when the > problem happens. Then type > > (gdb) thread apply all bt > > and post here everything it displays.