GNU bug report logs - #30769
25.3; server-delete-client:X protocol error using Lucid

Previous Next

Package: emacs;

Reported by: stef204 <stef204 <at> yandex.com>

Date: Sun, 11 Mar 2018 18:27:01 UTC

Severity: normal

Found in version 25.3

Fixed in version 26.0.91

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 30769 in the body.
You can then email your comments to 30769 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#30769; Package emacs. (Sun, 11 Mar 2018 18:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to stef204 <stef204 <at> yandex.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 11 Mar 2018 18:27:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: stef204 <stef204 <at> yandex.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.3; server-delete-client:X protocol error using Lucid
Date: Sun, 11 Mar 2018 12:12:30 -0600

Using --with-x-toolkit=lucid results in error:

server-delete-client: X protocol error: BadFont (invalid Font parameter)
on protocol request 46

one of the results is that the command server-edit no longer works as
expected; it does not exit cleanly.  One has to resort to Ctrl+c to get
the terminal back which leaves the server buffer open.



In GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, X toolkit, Xaw scroll bars)
 of 2018-03-11 built on user
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --with-x-toolkit=lucid --with-xft --with-modules
 --without-pop --with-sound=no --without-gconf --without-gsettings
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe
 -fstack-protector-strong' CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK GPM DBUS NOTIFY ACL GNUTLS
LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11
MODULES

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8

Major mode: Messages

Minor modes in effect:
  global-flycheck-mode: t
  electric-pair-mode: t
  window-number-meta-mode: t
  window-number-mode: t
  global-whitespace-mode: t
  company-quickhelp-mode: t
  company-quickhelp-local-mode: t
  global-company-mode: t
  company-mode: t
  show-paren-mode: t
  which-key-mode: t
  savehist-mode: t
  helm-descbinds-mode: t
  recentf-mode: t
  helm-mode: t
  async-bytecomp-package-mode: t
  helm-autoresize-mode: t
  winner-mode: t
  wc-mode: t
  my-global-wc-mode: t
  global-hl-line-mode: t
  beacon-mode: t
  ivy-mode: t
  delete-selection-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: (only . t)
  abbrev-mode: t

Recent messages:
Loading /home/user/.emacs.d/recentf...done
Cleaning up the recentf list...done (0 removed)
All done, user.
Starting Emacs daemon.
When done with a buffer, type C-x #
C-x C-g is undefined
server-delete-client: X protocol error: BadFont (invalid Font parameter) on protocol request 46
When done with this frame, type C-x 5 0
Mark set
delete-backward-char: Text is read-only
Quit

Load-path shadows:
~/.emacs.d/lisp/dash hides /home/user/.emacs.d/elpa/dash-20180206.2124/dash
~/.emacs.d/lisp/custom hides /usr/share/emacs/25.3/lisp/custom
/home/user/.emacs.d/elpa/seq-20151028.759/seq hides /usr/share/emacs/25.3/lisp/emacs-lisp/seq
/home/user/.emacs.d/elpa/let-alist-1.0.5/let-alist hides /usr/share/emacs/25.3/lisp/emacs-lisp/let-alist

Features:
(shadow sort mail-extr warnings emacsbug message idna format-spec rfc822
mml mml-sec epg mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mail-utils helm-command helm-elisp helm-eval edebug helm-info colir
cycle-buffer two-column iso-transl ido dired server flycheck-haskell
haskell-cabal haskell-utils company-files company-keywords
company-dabbrev-code company-dabbrev company-capf company-nxml flycheck
json map find-func subr-x dash .emacs elec-pair multi-term term
disp-table ehelp window-number whitespace rainbow-delimiters
company-quickhelp pos-tip company paren tbemail rx which-key undo-tree
diff savehist helm-descbinds recentf tree-widget wid-edit helm-mode
helm-files helm-buffers helm-tags helm-locate helm-grep helm-regexp
helm-utils helm-help helm-types helm-config helm-easymenu async-bytecomp
helm helm-source eieio-compat helm-multi-match helm-lib async
multiple-cursors mc-hide-unmatched-lines-mode mc-separate-operations
rectangular-region-mode mc-mark-pop mc-mark-more mc-cycle-cursors
mc-edit-lines multiple-cursors-core rect winner ring wc-mode easy-mmode
my_alias edmacro kmacro hl-line hlinum linum smart-mode-line-dark-theme
smart-mode-line rich-minority beacon hc-zenburn-theme ivy delsel
ivy-overlay ffap thingatpt url-parse auth-source eieio eieio-core
gnus-util time-date mm-util help-fns mail-prsvr password-cache url-vars
cus-start cus-load word-perfect-theme moe-theme powerline advice
powerline-separators color powerline-themes finder-inf info cl-seq
cl-macs cl package epg-config seq byte-opt gv bytecomp byte-compile
cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote dbusbind inotify dynamic-setting
font-render-setting x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 383702 270242)
 (symbols 48 38594 13)
 (miscs 40 263 996)
 (strings 32 91143 104622)
 (string-bytes 1 2799545)
 (vectors 16 39044)
 (vector-slots 8 739069 103244)
 (floats 8 617 1942)
 (intervals 56 825 812)
 (buffers 976 24))







Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30769; Package emacs. (Sun, 11 Mar 2018 18:59:01 GMT) Full text and rfc822 format available.

Message #8 received at 30769 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: stef204 <stef204 <at> yandex.com>
Cc: 30769 <at> debbugs.gnu.org
Subject: Re: bug#30769: 25.3; server-delete-client:X protocol error using Lucid
Date: Sun, 11 Mar 2018 14:58:02 -0400
stef204 <stef204 <at> yandex.com> writes:

> Using --with-x-toolkit=lucid results in error:
>
> server-delete-client: X protocol error: BadFont (invalid Font parameter)
> on protocol request 46

What do you do exactly to get this error?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30769; Package emacs. (Mon, 12 Mar 2018 15:31:01 GMT) Full text and rfc822 format available.

Message #11 received at 30769 <at> debbugs.gnu.org (full text, mbox):

From: stef204 <stef204 <at> yandex.com>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: "30769 <at> debbugs.gnu.org" <30769 <at> debbugs.gnu.org>
Subject: Re: bug#30769: 25.3; server-delete-client:X protocol error using Lucid
Date: Mon, 12 Mar 2018 07:00:07 -0600
[Message part 1 (text/plain, inline)]

11.03.2018, 12:58, "Noam Postavsky" <npostavs <at> gmail.com>:
> stef204 <stef204 <at> yandex.com> writes:
> this point.
The problems starts now where, once DONE editing the file, I SHOULD use "server-edit" or "C-x #" to exit/close this buffer and get my terminal "back".
AT THAT POINT, emacsclient SEEMS to close but in reality does not exit cleanly, i.e. the frame is destroyed, etc., I get back to terminal but it is still waiting for emacsclient to terminate and release terminal.  Also, the buffer is still open, it does not get killed.
I have to use Ctrl+c to get my terminal back; THEN open emacsclient again, look for the buffer for xyz.txt (which is still open) and kill it with "C-x k"

Using emacs compiled with gtk3, I do not run into any of that.  ONLY with lucid (and i do prefer lucid over gtk3 so this is important.)

Screenshots attached so you can see the state after using "server-edit" with Lucid.

file: server-edit1-screenshot_2018-03-12-134754.png is state AFTER using "server-edit" to exit server buffer.  You can see how terminal still waiting (and THAT is when the "server-delete-client: X protocol error: BadFont (invalid Font parameter)
>>  on protocol request 46" gets written to Message buffer.

file: server-edit2-screenshot_2018-03-12-134754.png is AFTER I get my terminal back using Ctrl-c and then restart emacsclient and look at what buffers are opened.  You can see the file "PKGBUILD" still open, it never got killed.

Please let me know if you need anything else so I can help troubleshoot.

Thank you.

Stephen
>>  Using --with-x-toolkit=lucid results in error:
>>
>>  server-delete-client: X protocol error: BadFont (invalid Font parameter)
>>  on protocol request 46
>
> What do you do exactly to get this error?

Noam,

My setup is as such:

- emacs server+client
- I start emacs on every boot using a systemd --user unit:

% cat ~/.config/systemd/user/emacs.service
[Unit]
Description=Emacs: the extensible, self-documenting text editor

[Service]
Type=forking
ExecStart=/usr/bin/emacs --daemon
ExecStop=/usr/bin/emacsclient --eval "(kill-emacs)"
Environment=SSH_AUTH_SOCK=%t/keyring/ssh
Restart=always

[Install]
WantedBy=default.target

THEN, let's say I want to work or edit file xyz.txt.  I run:
% ec xyz,txt

ec is a script I use to run emacsclient
% whence ec | xargs cat
#!/bin/sh
exec /usr/bin/env emacsclient -a "" -c "$@"

THEN I edit the file, etc.
All is fine up to this point.

The problem starts now where, once DONE editing the file, I SHOULD use "server-edit" or "C-x #" to exit/close this buffer and get my terminal "back".
AT THAT POINT, emacsclient SEEMS to close but in reality does not exit cleanly, i.e. the frame is destroyed, etc., I get back to terminal but it is still waiting for emacsclient to terminate and release terminal.  Also, the buffer is still open, it does not get killed.
I have to use Ctrl+c to get my terminal back; THEN open emacsclient again, look for the buffer for xyz.txt (which is still open) and kill it with "C-x k"

Using emacs compiled with gtk3, I do not run into any of that.  ONLY with lucid (and i do prefer lucid over gtk3 so this is important.)

Screenshots attached so you can see the state after using "server-edit" with Lucid.

file 1: server-edit1-screenshot_2018-03-12-134754.png is state AFTER using "server-edit" to exit server buffer.  You can see how terminal still waiting (and THAT seems to be when the "server-delete-client: X protocol error: BadFont (invalid Font parameter) on protocol request 46" gets written to Message buffer.

file 2: server-edit2-screenshot_2018-03-12-134754.png is AFTER I get my terminal back using Ctrl-c and then restart emacsclient and look at what buffers are opened.  You can see the file "PKGBUILD" still open, it never got killed.

Please let me know if you need anything else so I can help troubleshoot.

Thank you.

Stephen



 
[server-edit1-screenshot_2018-03-12-134754.png (image/png, attachment)]
[server-edit2-screenshot_2018-03-12-134858.png (image/png, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30769; Package emacs. (Mon, 12 Mar 2018 16:00:03 GMT) Full text and rfc822 format available.

Message #14 received at 30769 <at> debbugs.gnu.org (full text, mbox):

From: stef204 <stef204 <at> yandex.com>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: "30769 <at> debbugs.gnu.org" <30769 <at> debbugs.gnu.org>
Subject: Re: bug#30769: 25.3; server-delete-client:X protocol error using Lucid
Date: Mon, 12 Mar 2018 09:40:08 -0600
[Message part 1 (text/plain, inline)]
11.03.2018, 12:58, "Noam Postavsky" <npostavs <at> gmail.com>:
> stef204 <stef204 <at> yandex.com> writes:
>
>>  Using --with-x-toolkit=lucid results in error:
>>
>>  server-delete-client: X protocol error: BadFont (invalid Font parameter)
>>  on protocol request 46
>
> What do you do exactly to get this error?

*Edit:*  In my previous email, it looks like I inadvertently pasted part of the text in the wrong sequence, making it hard to understand.
Please cancel (delete) that reply and replace with this one.

Reply starts here:

Noam,

My setup is as such:

- emacs server+client
- I start emacs on every boot using a systemd --user unit:

% cat ~/.config/systemd/user/emacs.service
[Unit]
Description=Emacs: the extensible, self-documenting text editor

[Service]
Type=forking
ExecStart=/usr/bin/emacs --daemon
ExecStop=/usr/bin/emacsclient --eval "(kill-emacs)"
Environment=SSH_AUTH_SOCK=%t/keyring/ssh
Restart=always

[Install]
WantedBy=default.target

THEN, let's say I want to work or edit file xyz.txt. I run:
% ec xyz,txt

ec is a script I use to run emacsclient
% whence ec | xargs cat
#!/bin/sh
exec /usr/bin/env emacsclient -a "" -c "$@"

THEN I edit the file, etc.
All is fine up to this point.

The problem starts now where, once DONE editing the file, I SHOULD use "server-edit" or "C-x #" to exit/close this buffer and get my terminal "back".
AT THAT POINT, emacsclient SEEMS to close but in reality does not exit cleanly, i.e. the frame is destroyed, etc., I get back to terminal but it is still waiting for emacsclient to terminate and release terminal. Also, the buffer is still open, it does not get killed.
I have to use Ctrl+c to get my terminal back; THEN open emacsclient again, look for the buffer for xyz.txt (which is still open) and kill it with "C-x k"

Using emacs compiled with gtk3, I do not run into any of that. ONLY with lucid (and i do prefer lucid over gtk3 so this is important.)

Screenshots attached so you can see the state after using "server-edit" with Lucid.

file 1: server-edit1-screenshot_2018-03-12-134754.png is state AFTER using "server-edit" to exit server buffer. You can see how terminal still waiting (and THAT seems to be when the "server-delete-client: X protocol error: BadFont (invalid Font parameter) on protocol request 46" gets written to Message buffer.

file 2: server-edit2-screenshot_2018-03-12-134754.png is AFTER I get my terminal back using Ctrl-c and then restart emacsclient and look at what buffers are opened. You can see the file "PKGBUILD" (e.g. the "xyz.txt" mentioned above, any file at all) still open, it never got killed.

Please let me know if you need anything else so I can help troubleshoot.

Thank you.

Stephen
[server-edit1-screenshot_2018-03-12-134754.png (image/png, attachment)]
[server-edit2-screenshot_2018-03-12-134858.png (image/png, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30769; Package emacs. (Tue, 13 Mar 2018 01:11:02 GMT) Full text and rfc822 format available.

Message #17 received at 30769 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: stef204 <stef204 <at> yandex.com>
Cc: "30769 <at> debbugs.gnu.org" <30769 <at> debbugs.gnu.org>
Subject: Re: bug#30769: 25.3; server-delete-client:X protocol error using Lucid
Date: Mon, 12 Mar 2018 21:10:09 -0400
stef204 <stef204 <at> yandex.com> writes:

> Please let me know if you need anything else so I can help troubleshoot.

Chould you check if it still occurs with an Emacs 26 pretest?  I think
there were some fixes around terminal deletion that *may* be relevant.

Also, just to rule things things out, check if it happens with

    emacs -Q --eval '(setq server-name "foo")' -f server-start

    emacsclient -s foo xyz.txt






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30769; Package emacs. (Wed, 14 Mar 2018 10:34:01 GMT) Full text and rfc822 format available.

Message #20 received at 30769 <at> debbugs.gnu.org (full text, mbox):

From: stef204 <stef204 <at> yandex.com>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: "30769 <at> debbugs.gnu.org" <30769 <at> debbugs.gnu.org>
Subject: Re: bug#30769: 25.3; server-delete-client:X protocol error using Lucid
Date: Wed, 14 Mar 2018 04:33:41 -0600

12.03.2018, 19:10, "Noam Postavsky" <npostavs <at> gmail.com>:
> stef204 <stef204 <at> yandex.com> writes:
>
>>  Please let me know if you need anything else so I can help troubleshoot.
>
> Chould you check if it still occurs with an Emacs 26 pretest? I think
> there were some fixes around terminal deletion that *may* be relevant.
>

The problem does NOT occur in  pretest 26.0.91-1

> Also, just to rule things things out, check if it happens with
>
>     emacs -Q --eval '(setq server-name "foo")' -f server-start
>
This does not start a server on my box

>     emacsclient -s foo xyz.txt

Can't execute this one if no server started with above command.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30769; Package emacs. (Wed, 14 Mar 2018 10:55:02 GMT) Full text and rfc822 format available.

Message #23 received at 30769 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: stef204 <stef204 <at> yandex.com>
Cc: "30769 <at> debbugs.gnu.org" <30769 <at> debbugs.gnu.org>
Subject: Re: bug#30769: 25.3; server-delete-client:X protocol error using Lucid
Date: Wed, 14 Mar 2018 06:54:11 -0400
close 30769 26.0.91
quit

stef204 <stef204 <at> yandex.com> writes:

> 12.03.2018, 19:10, "Noam Postavsky" <npostavs <at> gmail.com>:
>> Chould you check if it still occurs with an Emacs 26 pretest? I think
>> there were some fixes around terminal deletion that *may* be relevant.
>>
>
> The problem does NOT occur in  pretest 26.0.91-1

Nice, that's good news.

>>     emacs -Q --eval '(setq server-name "foo")' -f server-start
>>
> This does not start a server on my box

It doesn't give any indication, but if you check with M-:
(server-running-p) you should get `t'.




bug marked as fixed in version 26.0.91, send any further explanations to 30769 <at> debbugs.gnu.org and stef204 <stef204 <at> yandex.com> Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 14 Mar 2018 10:55:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 11 Apr 2018 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 65 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.