GNU bug report logs - #22438
24.5; Orphaned tooltip kills daemon (Lucid)

Previous Next

Package: emacs;

Reported by: Nicole Edwards <nnnnnn <at> posteo.net>

Date: Fri, 22 Jan 2016 22:22:01 UTC

Severity: normal

Found in version 24.5

Done: Óscar Fuentes <ofv <at> wanadoo.es>

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 22438 in the body.
You can then email your comments to 22438 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#22438; Package emacs. (Fri, 22 Jan 2016 22:22:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicole Edwards <nnnnnn <at> posteo.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 22 Jan 2016 22:22:02 GMT) Full text and rfc822 format available.

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

From: Nicole Edwards <nnnnnn <at> posteo.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.5; Orphaned tooltip kills daemon (Lucid)
Date: Fri, 22 Jan 2016 17:04:36 -0500
If I call up (or dismiss all but) one frame, ask it to display
a tooltip, then destroy it while the tooltip is open, the tooltip
remains open, and unless I create a new frame within a few seconds,
Emacs dies.  (Mercifully, so does the tooltip.)

This only happens as a daemon (as otherwise there's no way to delete
the last frame) and only with the Lucid toolkit (with GTK+, the
tooltip disappears with the frame).

In recipe form:

    emacs --daemon -Q
    emacsclient -c

In the resulting *scratch* buffer, type

    (if (sit-for 7) (delete-frame))

Now type C-j to evaluate and, while Emacs is sitting, hover your
mouse pointer over the mode line until a tooltip appears.  Leave the
pointer where it is, so that the tooltip remains open, and wait for
the frame to be deleted.  The tooltip should persist.  Wait a little
longer -- five or six seconds? -- and the tooltip should disappear.
Back at the terminal, confirm that Emacs is no longer running.

    $ pgrep emacs
    $

In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll 
bars)
 of 2016-01-22 on tikva
Windowing system distributor `The X.Org Foundation', version 
11.0.11604000
System Description:	Debian GNU/Linux 8.2 (jessie)

Configured using:
 `configure --prefix=/home/n/.local/stow/emacs-24.5
 --with-x-toolkit=lucid'

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

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-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
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Starting Emacs daemon.
When done with this frame, type C-x 5 0

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util help-fns mail-prsvr mail-utils server time-date edmacro kmacro
cl-loaddefs cl-lib ido tooltip electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer 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 make-network-process dbusbind
gfilenotify dynamic-setting system-font-setting font-render-setting
x-toolkit x multi-tty emacs)

Memory information:
((conses 16 76439 3869)
 (symbols 48 18479 0)
 (miscs 40 53 99)
 (strings 32 11586 4813)
 (string-bytes 1 354764)
 (vectors 16 10065)
 (vector-slots 8 387163 6532)
 (floats 8 80 51)
 (intervals 56 169 1)
 (buffers 960 12)
 (heap 1024 24129 988))





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22438; Package emacs. (Fri, 22 Jan 2016 23:57:01 GMT) Full text and rfc822 format available.

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

From: Óscar Fuentes <ofv <at> wanadoo.es>
To: Nicole Edwards <nnnnnn <at> posteo.net>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 22438 <at> debbugs.gnu.org
Subject: Re: bug#22438: 24.5; Orphaned tooltip kills daemon (Lucid)
Date: Sat, 23 Jan 2016 00:56:03 +0100
Nicole Edwards <nnnnnn <at> posteo.net> writes:

> If I call up (or dismiss all but) one frame, ask it to display
> a tooltip, then destroy it while the tooltip is open, the tooltip
> remains open, and unless I create a new frame within a few seconds,
> Emacs dies.  (Mercifully, so does the tooltip.)

[snip]

The problem is in src/xfns.c:6087. Emacs explicitly redisplays the
current frame's menu bar without testing that it is alive. The patch
below solves the problem. Eli, ok to commit?

diff --git a/src/xfns.c b/src/xfns.c
index aad9680..9624ac5 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -6084,16 +6084,19 @@ Value is t if tooltip was open, nil otherwise.  */)
 	 items is unmapped.  Redisplay the menu manually...  */
       {
         Widget w;
-	struct frame *f = SELECTED_FRAME ();
-	w = f->output_data.x->menubar_widget;
+        struct frame *f = SELECTED_FRAME ();
+        if (FRAME_X_P (f) && FRAME_LIVE_P (f))
+          {
+          w = f->output_data.x->menubar_widget;
 
-	if (!DoesSaveUnders (FRAME_DISPLAY_INFO (f)->screen)
-	    && w != NULL)
-	  {
-	    block_input ();
-	    xlwmenu_redisplay (w);
-	    unblock_input ();
-	  }
+          if (!DoesSaveUnders (FRAME_DISPLAY_INFO (f)->screen)
+              && w != NULL)
+            {
+              block_input ();
+              xlwmenu_redisplay (w);
+              unblock_input ();
+            }
+        }
       }
 #endif /* USE_LUCID */
     }




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22438; Package emacs. (Sat, 23 Jan 2016 06:15:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Óscar Fuentes <ofv <at> wanadoo.es>
Cc: nnnnnn <at> posteo.net, 22438 <at> debbugs.gnu.org
Subject: Re: bug#22438: 24.5; Orphaned tooltip kills daemon (Lucid)
Date: Sat, 23 Jan 2016 08:14:21 +0200
> From: Óscar Fuentes <ofv <at> wanadoo.es>
> Cc: 22438 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
> Date: Sat, 23 Jan 2016 00:56:03 +0100
> 
> Nicole Edwards <nnnnnn <at> posteo.net> writes:
> 
> > If I call up (or dismiss all but) one frame, ask it to display
> > a tooltip, then destroy it while the tooltip is open, the tooltip
> > remains open, and unless I create a new frame within a few seconds,
> > Emacs dies.  (Mercifully, so does the tooltip.)
> 
> [snip]
> 
> The problem is in src/xfns.c:6087. Emacs explicitly redisplays the
> current frame's menu bar without testing that it is alive. The patch
> below solves the problem. Eli, ok to commit?

Yes, thanks.  To the emacs-25 branch, please.




Reply sent to Óscar Fuentes <ofv <at> wanadoo.es>:
You have taken responsibility. (Sat, 23 Jan 2016 13:23:01 GMT) Full text and rfc822 format available.

Notification sent to Nicole Edwards <nnnnnn <at> posteo.net>:
bug acknowledged by developer. (Sat, 23 Jan 2016 13:23:01 GMT) Full text and rfc822 format available.

Message #16 received at 22438-done <at> debbugs.gnu.org (full text, mbox):

From: Óscar Fuentes <ofv <at> wanadoo.es>
To: 22438-done <at> debbugs.gnu.org
Subject: Re: bug#22438: 24.5; Orphaned tooltip kills daemon (Lucid)
Date: Sat, 23 Jan 2016 14:22:28 +0100
Fixed on 76045f7d6f654ea20e09412e5054f9159d1bb142 (emacs-25).




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 21 Feb 2016 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 180 days ago.

Previous Next


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