Subject: Re: bug#43716: 28.0.50; Error with emacsclient <file>:

From: Tassilo Horn <[email-masked]>
Date: Wed, 30 Sep 2020 16:30:12 +0200

Lars Ingebrigtsen <[email-masked]> writes:

> It's unfortunate that there's no way to get Emacs to reliably give a
> backtrace -- I'm guessing there's a condition-case somewhere in the
> server code that inhibits the debugging?

Possibly.

> Does
>
> (setq debug-ignored-errors nil
>       debug-on-error t)
>
> help with getting a backtrace?  (It's a long shot...)
>
> (setq debug-on-message "arguments")
>
> may allow the backtrace to appear in some circumstances. 

Neither of those seems to work for this specific issue. :-(

>> Starting program: /home/horn/Repos/el/emacs/lib-src/emacsclient ~/tmp/test.aux
>> Waiting for Emacs...
>> *ERROR*: Wrong number of arguments: (1 . 4), 5
>
> I grepped for the string "*ERROR*" in the Emacs source tree, and
> couldn't find it, but perhaps it's composed differently.

I found it. :-)

lib-src/emacsclient.c
2095               fprintf (stderr, "*ERROR*: %s", str);

>> [Inferior 1 (process 23487) exited with code 01]
>> (gdb) bt
>> No stack.
>>
>> Any help?  My GDB foo is quite low but I can operate it when given
>> instructions.
>
> Setting a breakpoint on Fsignal could perhaps work?  My gdb-foo is
> low, too, though.

Hm, I come there at least 5 times when "emacsclient file" is run.  I've
looked at "bt", especially the lisp backtraces but those contained just
(error ...) or (signal ...) forms wheras I guess the error I get must
come from funcall or so...

Bye,
Tassilo