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

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

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

stef204


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))






Reply | Threaded
Open this post in threaded view
|

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

Noam Postavsky
stef204 <[hidden email]> 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?



Reply | Threaded
Open this post in threaded view
|

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

stef204


11.03.2018, 12:58, "Noam Postavsky" <[hidden email]>:
> stef204 <[hidden email]> 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 (1M) Download Attachment
server-edit2-screenshot_2018-03-12-134858.png (57K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

stef204
In reply to this post by Noam Postavsky
11.03.2018, 12:58, "Noam Postavsky" <[hidden email]>:
> stef204 <[hidden email]> 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 (1M) Download Attachment
server-edit2-screenshot_2018-03-12-134858.png (57K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Noam Postavsky
stef204 <[hidden email]> 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





Reply | Threaded
Open this post in threaded view
|

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

stef204


12.03.2018, 19:10, "Noam Postavsky" <[hidden email]>:
> stef204 <[hidden email]> 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.



Reply | Threaded
Open this post in threaded view
|

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

Noam Postavsky
close 30769 26.0.91
quit

stef204 <[hidden email]> writes:

> 12.03.2018, 19:10, "Noam Postavsky" <[hidden email]>:
>> 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'.