GNU bug report logs - #23378
25.0.92; Enacs daemon "get-device-terminal" error

Previous Next

Package: emacs;

Reported by: Live System User <nyc4bos <at> aol.com>

Date: Tue, 26 Apr 2016 02:37:02 UTC

Severity: normal

Tags: moreinfo, wontfix

Merged with 22362, 29548

Found in versions 24.5, 25.0.92, 25.2

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Live System User <nyc4bos <at> aol.com>
Cc: 23378 <at> debbugs.gnu.org
Subject: bug#23378: 25.0.94; Enacs daemon "get-device-terminal" error
Date: Sat, 09 Jul 2016 13:47:06 +0300
> From: Live System User <nyc4bos <at> aol.com>
> Date: Sun, 03 Jul 2016 16:12:28 -0400
> 
>         This bug is still present in Emacs 25.0.94
> 
>         When trying to kill it via C-x C-c `save-buffers-kill-terminal'
>         I just see the message:
> 
> get-device-terminal: Invalid argument #<terminal 9> in
> 'get-device-terminal'
> 
>         Neither "File->Quit" or "File->Delete Frame" from the menubar
>         nor clicking on X to close the frame kills Emacs or closes
>         its frame -- the Emacs frame remains on the screen.

Does this happen only with Emacs started as a daemon?  If not, can you
show a recipe without the dameon?

Also, does this happen if you start Emacs with -Q?  If not, there's a
chance some of your customizations are an important factor here.

I looked at the code which signals this error, and the only way
forward with this bug seems to be to step with a debugger through the
code in terminal-live-p (Fterminal_live_p in terminal.c), and see what
happens there.  Presumably, this mysterious terminal belongs to a
frame that was already deleted or something, but I don't see how that
could happen, and your description is not detailed enough.

(Also, your Emacs build lacks the debugging symbols, so before you try
debugging it further, please rebuild with debugging information.)

In a merged bug #22362, you give the following procedure for
reproducing the bug:

  % emacs --daemon=daemon2
  % emacsclient -f ~/emacs.d/server/daemon2 -e "(daemonp)"
  (emacs pops up a window)

  From a gnome-terminal:
  % emacsclient -nw -f ~/emacs.d/server/daemon2 -e "(daemonp)"
  (I get an emacs terminal window)
  ^X^C
  ^Z
  % bg

Does the problem go away if you first type "fg" from the same terminal
where you typed "bg"?  Also, doesn't "C-x C-c" you type before "bg"
already close the terminal frame that the previous emacsclient command
created?  If so, what exactly does ^Z after it do?

>         I'll be able to keep the process around for a little while
>         (i.e. not kill it from the command line) if more info
>         is reqested to dbug this.

As mentioned above, your Emacs binary cannot be debugged, as it lacks
debugging info, so please prepare a build with that info first.

Thanks.




This bug report was last modified 6 years and 132 days ago.

Previous Next


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